mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
Delete GL_LOAD_OP_DISABLE_ANGLE from PLS
This load op makes the PLS spec and WebGL implementations unnecessarily complex. Bug: chromium:1421437 Change-Id: Iab02a8b02083899c6cc345ecb25b88c5871611c9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4335148 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Chris Dalton <chris@rive.app> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
committed by
Angle LUCI CQ
parent
5103c3e60f
commit
513ca72369
@@ -172,34 +172,33 @@ New Tokens
|
||||
LOAD_OP_ZERO_ANGLE 0x96E4
|
||||
LOAD_OP_CLEAR_ANGLE 0x96E5
|
||||
LOAD_OP_LOAD_ANGLE 0x96E6
|
||||
LOAD_OP_DISABLE_ANGLE 0x96E7
|
||||
|
||||
Accepted as array elements in the <storeops> parameter of
|
||||
EndPixelLocalStorageANGLE():
|
||||
|
||||
STORE_OP_STORE_ANGLE 0x96E8
|
||||
STORE_OP_STORE_ANGLE 0x96E7
|
||||
|
||||
Accepted by the <pname> parameter of
|
||||
GetFramebufferPixelLocalStorageParameterivANGLE() and
|
||||
GetFramebufferPixelLocalStorageParameterivRobustANGLE():
|
||||
|
||||
PIXEL_LOCAL_FORMAT_ANGLE 0x96E9
|
||||
PIXEL_LOCAL_TEXTURE_NAME_ANGLE 0x96EA
|
||||
PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE 0x96EB
|
||||
PIXEL_LOCAL_TEXTURE_LAYER_ANGLE 0x96EC
|
||||
PIXEL_LOCAL_FORMAT_ANGLE 0x96E8
|
||||
PIXEL_LOCAL_TEXTURE_NAME_ANGLE 0x96E9
|
||||
PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE 0x96EA
|
||||
PIXEL_LOCAL_TEXTURE_LAYER_ANGLE 0x96EB
|
||||
|
||||
Accepted by the <pname> parameter of
|
||||
GetFramebufferPixelLocalStorageParameterfvANGLE() and
|
||||
GetFramebufferPixelLocalStorageParameterfvRobustANGLE():
|
||||
|
||||
PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE 0x96ED
|
||||
PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE 0x96EC
|
||||
|
||||
Accepted by the <pname> parameter of
|
||||
GetFramebufferPixelLocalStorageParameterivANGLE() and
|
||||
GetFramebufferPixelLocalStorageParameterivRobustANGLE():
|
||||
|
||||
PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE 0x96EE
|
||||
PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE 0x96EF
|
||||
PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE 0x96ED
|
||||
PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE 0x96EE
|
||||
|
||||
New GLSL Opaque Types
|
||||
|
||||
@@ -277,19 +276,14 @@ Additions to the OpenGL ES Specification, Version 3.0.6
|
||||
with the caveat that they are _not_ leaked from
|
||||
outside the current draw framebuffer.
|
||||
|
||||
LOAD_OP_DISABLE_ANGLE Leave this plane disabled.
|
||||
|
||||
Note that all pixel local storage planes on or
|
||||
after index <n> are disabled implicitly.
|
||||
|
||||
Table X.1: Pixel local storage Load Operations.
|
||||
|
||||
* <storeops> specifies an array of <n> pixel local storage "Store
|
||||
Operations", whose ith element describes the Store Operation
|
||||
to perform on the backing texture of the ith pixel local
|
||||
storage plane. The store operation is ignored if its plane is
|
||||
memoryless or disabled. Supported Store Operations are listed
|
||||
in Table X.2.
|
||||
memoryless. Supported Store Operations are listed in Table
|
||||
X.2.
|
||||
|
||||
Store Operation Description
|
||||
-----------------------------------------------------------------------
|
||||
@@ -342,9 +336,8 @@ Additions to the OpenGL ES Specification, Version 3.0.6
|
||||
* INVALID_ENUM is generated if <loadops>[0..<n>-1] is not one of the Load
|
||||
Operations enumerated in Table X.1.
|
||||
|
||||
* INVALID_OPERATION is generated if <loadops>[0..<n>-1] is not
|
||||
LOAD_OP_DISABLE_ANGLE, and the pixel local storage plane at that same
|
||||
index is in a deinitialized state.
|
||||
* INVALID_OPERATION is generated if a pixel local storage plane at index
|
||||
[0..<n>-1] is in a deinitialized state.
|
||||
|
||||
* INVALID_OPERATION is generated if <loadops>[0..<n>-1] is
|
||||
LOAD_OP_LOAD_ANGLE and the pixel local storage plane at that same index
|
||||
@@ -385,17 +378,17 @@ Additions to the OpenGL ES Specification, Version 3.0.6
|
||||
the Store Operations enumerated in Table X.2.
|
||||
|
||||
After a successful call to BeginPixelLocalStorageANGLE(), the pixel local
|
||||
storage planes indexed in the range [0..<n>-1] (except those whose Load
|
||||
Operation was LOAD_OP_DISABLE_ANGLE) are fully activated, initialized and
|
||||
available for fragment shaders to read and write.
|
||||
PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE is also updated to equal <n>. Pixel
|
||||
local storage data will persist across all fragment invocations and across
|
||||
all draws issued until the application calls EndPixelLocalStorageANGLE(),
|
||||
even if the application binds different shader programs. In order to make
|
||||
this guarantee, the the OpenGL ES API only allows a limited set of commands
|
||||
while PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE is nonzero. All other commands
|
||||
generate INVALID_OPERATION. Valid commands while pixel local storage is
|
||||
active are listed in Table X.3.
|
||||
storage planes indexed in the range [0..<n>-1] are fully activated,
|
||||
initialized and available for fragment shaders to read and write.
|
||||
PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE is also updated to equal <n>.
|
||||
|
||||
Pixel local storage data will persist across all fragment invocations and
|
||||
across all draws issued until the application calls
|
||||
EndPixelLocalStorageANGLE(), even if the application binds different shader
|
||||
programs. In order to make this guarantee, the the OpenGL ES API only allows
|
||||
a limited set of commands while PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE is
|
||||
nonzero. All other commands generate INVALID_OPERATION. Valid commands while
|
||||
pixel local storage is active are listed in Table X.3.
|
||||
|
||||
ActiveTexture DepthMask MapBufferRange
|
||||
BindBuffer DepthRangef PixelLocalStorageBarrierANGLE
|
||||
@@ -1099,3 +1092,13 @@ Issues
|
||||
doesn't come from another context, and that needs to be specified. Similar
|
||||
decisions have been made previously in performance-critical areas of the
|
||||
spec.
|
||||
|
||||
(3) Should we support the ability to enable/disable pixel local storage
|
||||
planes on an individual basis? (e.g., "GL_LOAD_OP_DISABLE_ANGLE.)
|
||||
|
||||
RESOLVED: No. Some implementations need to reserve color attachments for
|
||||
internal use. Allowing any combination of planes to be enabled or disabled
|
||||
would make this specification unnecessarily complex. Furthermore, browsers
|
||||
implementing WebGL will need the ability to interrupt pixel local storage
|
||||
rendering passes, which would also be more complicated if we were to
|
||||
support enabling and disabling planes individually.
|
||||
|
||||
@@ -612,15 +612,14 @@ GL_APICALL void GL_APIENTRY glReleaseTexturesANGLE(GLuint numTexture, const GLui
|
||||
#define GL_LOAD_OP_ZERO_ANGLE 0x96E4
|
||||
#define GL_LOAD_OP_CLEAR_ANGLE 0x96E5
|
||||
#define GL_LOAD_OP_LOAD_ANGLE 0x96E6
|
||||
#define GL_LOAD_OP_DISABLE_ANGLE 0x96E7
|
||||
#define GL_STORE_OP_STORE_ANGLE 0x96E8
|
||||
#define GL_PIXEL_LOCAL_FORMAT_ANGLE 0x96E9
|
||||
#define GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE 0x96EA
|
||||
#define GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE 0x96EB
|
||||
#define GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE 0x96EC
|
||||
#define GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE 0x96ED
|
||||
#define GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE 0x96EE
|
||||
#define GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE 0x96EF
|
||||
#define GL_STORE_OP_STORE_ANGLE 0x96E7
|
||||
#define GL_PIXEL_LOCAL_FORMAT_ANGLE 0x96E8
|
||||
#define GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE 0x96E9
|
||||
#define GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE 0x96EA
|
||||
#define GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE 0x96EB
|
||||
#define GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE 0x96EC
|
||||
#define GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE 0x96ED
|
||||
#define GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE 0x96EE
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERMEMORYLESSPIXELLOCALSTORAGEANGLEPROC) (GLint plane, GLenum internalformat);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREPIXELLOCALSTORAGEANGLEPROC) (GLint plane, GLuint backingtexture, GLint level, GLint layer);
|
||||
typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALCLEARVALUEFVANGLEPROC) (GLint plane, const GLfloat value[]);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"scripts/extension_data/swiftshader_win10_gles1.json":
|
||||
"bea8e2106d62e1ea0e8938f150865a37",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
"c8a57cb36ffaef4b8f11317bddd89376",
|
||||
"a529bc9810e3c3d23e47944465d849f4",
|
||||
"scripts/registry_xml.py":
|
||||
"8dc1bcf2e8324094c19c41613897b212",
|
||||
"src/libANGLE/gen_extensions.py":
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"scripts/generate_loader.py":
|
||||
"93c78a8d11323fa311fed5118fbcf083",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
"c8a57cb36ffaef4b8f11317bddd89376",
|
||||
"a529bc9810e3c3d23e47944465d849f4",
|
||||
"scripts/registry_xml.py":
|
||||
"8dc1bcf2e8324094c19c41613897b212",
|
||||
"src/libEGL/egl_loader_autogen.cpp":
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"scripts/generate_entry_points.py":
|
||||
"9938b48a9bbf813dd245e453ff2fc0cc",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
"c8a57cb36ffaef4b8f11317bddd89376",
|
||||
"a529bc9810e3c3d23e47944465d849f4",
|
||||
"scripts/registry_xml.py":
|
||||
"8dc1bcf2e8324094c19c41613897b212",
|
||||
"src/common/entry_points_enum_autogen.cpp":
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
"scripts/gen_gl_enum_utils.py":
|
||||
"3bab69a4a3555ab1551a6e5008534cec",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
"c8a57cb36ffaef4b8f11317bddd89376",
|
||||
"a529bc9810e3c3d23e47944465d849f4",
|
||||
"scripts/registry_xml.py":
|
||||
"8dc1bcf2e8324094c19c41613897b212",
|
||||
"src/common/gl_enum_utils_autogen.cpp":
|
||||
"2791550a6939fe3a1fee174236521b98",
|
||||
"707566f71285a34af9586baeef980b9f",
|
||||
"src/common/gl_enum_utils_autogen.h":
|
||||
"85dea9edf87ad08c322868823e61a40c",
|
||||
"third_party/OpenGL-Registry/src/xml/gl.xml":
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"scripts/gen_interpreter_utils.py":
|
||||
"10ba16ee78604763fc883525dd275de8",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
"c8a57cb36ffaef4b8f11317bddd89376",
|
||||
"a529bc9810e3c3d23e47944465d849f4",
|
||||
"scripts/registry_xml.py":
|
||||
"8dc1bcf2e8324094c19c41613897b212",
|
||||
"third_party/EGL-Registry/src/api/egl.xml":
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"scripts/gen_proc_table.py":
|
||||
"073351265b085943f816498cecaa281c",
|
||||
"scripts/gl_angle_ext.xml":
|
||||
"c8a57cb36ffaef4b8f11317bddd89376",
|
||||
"a529bc9810e3c3d23e47944465d849f4",
|
||||
"scripts/registry_xml.py":
|
||||
"8dc1bcf2e8324094c19c41613897b212",
|
||||
"src/libGLESv2/proc_table_cl_autogen.cpp":
|
||||
|
||||
@@ -1276,7 +1276,6 @@
|
||||
<enum name="GL_LOAD_OP_ZERO_ANGLE"/>
|
||||
<enum name="GL_LOAD_OP_CLEAR_ANGLE"/>
|
||||
<enum name="GL_LOAD_OP_LOAD_ANGLE"/>
|
||||
<enum name="GL_LOAD_OP_DISABLE_ANGLE"/>
|
||||
<enum name="GL_STORE_OP_STORE_ANGLE"/>
|
||||
<enum name="GL_PIXEL_LOCAL_FORMAT_ANGLE"/>
|
||||
<enum name="GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE"/>
|
||||
@@ -1372,15 +1371,14 @@
|
||||
<enum value="0x96E4" name="GL_LOAD_OP_ZERO_ANGLE"/>
|
||||
<enum value="0x96E5" name="GL_LOAD_OP_CLEAR_ANGLE"/>
|
||||
<enum value="0x96E6" name="GL_LOAD_OP_LOAD_ANGLE"/>
|
||||
<enum value="0x96E7" name="GL_LOAD_OP_DISABLE_ANGLE"/>
|
||||
<enum value="0x96E8" name="GL_STORE_OP_STORE_ANGLE"/>
|
||||
<enum value="0x96E9" name="GL_PIXEL_LOCAL_FORMAT_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EA" name="GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EB" name="GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EC" name="GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96ED" name="GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE" group="PLSQueryFloat"/>
|
||||
<enum value="0x96EE" name="GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EF" name="GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96E7" name="GL_STORE_OP_STORE_ANGLE"/>
|
||||
<enum value="0x96E8" name="GL_PIXEL_LOCAL_FORMAT_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96E9" name="GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EA" name="GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EB" name="GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EC" name="GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE" group="PLSQueryFloat"/>
|
||||
<enum value="0x96ED" name="GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE" group="PLSQueryInt"/>
|
||||
<enum value="0x96EE" name="GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE" group="PLSQueryInt"/>
|
||||
</enums>
|
||||
|
||||
<enums namespace="GL" group="CreateFlagMask" type="bitmask" vendor="ANGLE">
|
||||
|
||||
@@ -2744,22 +2744,20 @@ const char *GLenumToString(GLESEnum enumGroup, unsigned int value)
|
||||
case 0x96E6:
|
||||
return "GL_LOAD_OP_LOAD_ANGLE";
|
||||
case 0x96E7:
|
||||
return "GL_LOAD_OP_DISABLE_ANGLE";
|
||||
case 0x96E8:
|
||||
return "GL_STORE_OP_STORE_ANGLE";
|
||||
case 0x96E9:
|
||||
case 0x96E8:
|
||||
return "GL_PIXEL_LOCAL_FORMAT_ANGLE";
|
||||
case 0x96EA:
|
||||
case 0x96E9:
|
||||
return "GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE";
|
||||
case 0x96EB:
|
||||
case 0x96EA:
|
||||
return "GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE";
|
||||
case 0x96EC:
|
||||
case 0x96EB:
|
||||
return "GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE";
|
||||
case 0x96ED:
|
||||
case 0x96EC:
|
||||
return "GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE";
|
||||
case 0x96EE:
|
||||
case 0x96ED:
|
||||
return "GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE";
|
||||
case 0x96EF:
|
||||
case 0x96EE:
|
||||
return "GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE";
|
||||
case 0xFFFFFFFF:
|
||||
return "GL_INVALID_INDEX";
|
||||
@@ -5911,7 +5909,7 @@ const char *GLenumToString(GLESEnum enumGroup, unsigned int value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0x96ED:
|
||||
case 0x96EC:
|
||||
return "GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE";
|
||||
default:
|
||||
return UnknownEnumToString(value);
|
||||
@@ -5922,17 +5920,17 @@ const char *GLenumToString(GLESEnum enumGroup, unsigned int value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case 0x96E9:
|
||||
case 0x96E8:
|
||||
return "GL_PIXEL_LOCAL_FORMAT_ANGLE";
|
||||
case 0x96EA:
|
||||
case 0x96E9:
|
||||
return "GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE";
|
||||
case 0x96EB:
|
||||
case 0x96EA:
|
||||
return "GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE";
|
||||
case 0x96EC:
|
||||
case 0x96EB:
|
||||
return "GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE";
|
||||
case 0x96EE:
|
||||
case 0x96ED:
|
||||
return "GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE";
|
||||
case 0x96EF:
|
||||
case 0x96EE:
|
||||
return "GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE";
|
||||
default:
|
||||
return UnknownEnumToString(value);
|
||||
@@ -28197,10 +28195,6 @@ unsigned int StringToGLenum(const char *str)
|
||||
{
|
||||
return 0x96E5;
|
||||
}
|
||||
if (strcmp(str, "GL_LOAD_OP_DISABLE_ANGLE") == 0)
|
||||
{
|
||||
return 0x96E7;
|
||||
}
|
||||
if (strcmp(str, "GL_LOAD_OP_LOAD_ANGLE") == 0)
|
||||
{
|
||||
return 0x96E6;
|
||||
@@ -33247,19 +33241,19 @@ unsigned int StringToGLenum(const char *str)
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE") == 0)
|
||||
{
|
||||
return 0x96ED;
|
||||
return 0x96EC;
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE") == 0)
|
||||
{
|
||||
return 0x96EE;
|
||||
return 0x96ED;
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE") == 0)
|
||||
{
|
||||
return 0x96EF;
|
||||
return 0x96EE;
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_FORMAT_ANGLE") == 0)
|
||||
{
|
||||
return 0x96E9;
|
||||
return 0x96E8;
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE") == 0)
|
||||
{
|
||||
@@ -33267,15 +33261,15 @@ unsigned int StringToGLenum(const char *str)
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE") == 0)
|
||||
{
|
||||
return 0x96EC;
|
||||
return 0x96EB;
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE") == 0)
|
||||
{
|
||||
return 0x96EB;
|
||||
return 0x96EA;
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE") == 0)
|
||||
{
|
||||
return 0x96EA;
|
||||
return 0x96E9;
|
||||
}
|
||||
if (strcmp(str, "GL_PIXEL_MAG_FILTER_EXT") == 0)
|
||||
{
|
||||
@@ -38079,7 +38073,7 @@ unsigned int StringToGLenum(const char *str)
|
||||
}
|
||||
if (strcmp(str, "GL_STORE_OP_STORE_ANGLE") == 0)
|
||||
{
|
||||
return 0x96E8;
|
||||
return 0x96E7;
|
||||
}
|
||||
if (strcmp(str, "GL_STREAM_COPY") == 0)
|
||||
{
|
||||
|
||||
@@ -468,10 +468,6 @@ void PixelLocalStorage::begin(Context *context, GLsizei n, const GLenum loadops[
|
||||
bool hasPLSExtents = false;
|
||||
for (GLsizei i = 0; i < n; ++i)
|
||||
{
|
||||
if (loadops[i] == GL_LOAD_OP_DISABLE_ANGLE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
PixelLocalStoragePlane &plane = mPlanes[i];
|
||||
if (plane.isTextureIDDeleted(context))
|
||||
{
|
||||
@@ -495,10 +491,6 @@ void PixelLocalStorage::begin(Context *context, GLsizei n, const GLenum loadops[
|
||||
}
|
||||
for (GLsizei i = 0; i < n; ++i)
|
||||
{
|
||||
if (loadops[i] == GL_LOAD_OP_DISABLE_ANGLE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
PixelLocalStoragePlane &plane = mPlanes[i];
|
||||
if (mPLSOptions.type == ShPixelLocalStorageType::ImageLoadStore ||
|
||||
mPLSOptions.type == ShPixelLocalStorageType::FramebufferFetch)
|
||||
@@ -599,15 +591,7 @@ class PixelLocalStorageImageLoadStore : public PixelLocalStorage
|
||||
}
|
||||
|
||||
// Attach one of the PLS textures to GL_COLOR_ATTACHMENT0.
|
||||
for (GLsizei i = 0; i < n; ++i)
|
||||
{
|
||||
if (loadops[i] == GL_LOAD_OP_DISABLE_ANGLE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
getPlane(i).attachToDrawFramebuffer(context, GL_COLOR_ATTACHMENT0);
|
||||
break;
|
||||
}
|
||||
getPlane(0).attachToDrawFramebuffer(context, GL_COLOR_ATTACHMENT0);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -650,11 +634,7 @@ class PixelLocalStorageImageLoadStore : public PixelLocalStorage
|
||||
DrawBuffersVector<int> pendingClears;
|
||||
for (; pendingClears.size() < maxDrawBuffers && i < n; ++i)
|
||||
{
|
||||
GLenum loadop = loadops[i];
|
||||
if (loadop == GL_LOAD_OP_DISABLE_ANGLE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
GLenum loadop = loadops[i];
|
||||
const PixelLocalStoragePlane &plane = getPlane(i);
|
||||
ASSERT(!plane.isDeinitialized());
|
||||
plane.bindToImage(context, i, !mPLSOptions.supportsNativeRGBA8ImageFormats);
|
||||
@@ -828,14 +808,8 @@ class PixelLocalStorageFramebufferFetch : public PixelLocalStorage
|
||||
|
||||
for (GLsizei i = 0; i < n; ++i)
|
||||
{
|
||||
GLuint drawBufferIdx = GetDrawBufferIdx(caps, i);
|
||||
GLenum loadop = loadops[i];
|
||||
if (loadop == GL_LOAD_OP_DISABLE_ANGLE)
|
||||
{
|
||||
plsDrawBuffers[drawBufferIdx] = GL_NONE;
|
||||
continue;
|
||||
}
|
||||
|
||||
GLuint drawBufferIdx = GetDrawBufferIdx(caps, i);
|
||||
GLenum loadop = loadops[i];
|
||||
const PixelLocalStoragePlane &plane = getPlane(i);
|
||||
ASSERT(!plane.isDeinitialized());
|
||||
|
||||
@@ -879,7 +853,7 @@ class PixelLocalStorageFramebufferFetch : public PixelLocalStorage
|
||||
for (GLsizei i = 0; i < n; ++i)
|
||||
{
|
||||
GLenum loadop = loadops[i];
|
||||
if (loadop != GL_LOAD_OP_DISABLE_ANGLE && loadop != GL_LOAD_OP_LOAD_ANGLE)
|
||||
if (loadop != GL_LOAD_OP_LOAD_ANGLE)
|
||||
{
|
||||
GLuint drawBufferIdx = GetDrawBufferIdx(caps, i);
|
||||
getPlane(i).issueClearCommand(&clearBufferCommands, drawBufferIdx, loadop);
|
||||
|
||||
@@ -1057,8 +1057,7 @@ angle::Result ContextGL::drawPixelLocalStorageEXTEnable(gl::Context *context,
|
||||
const gl::PixelLocalStoragePlane &plane = planes[i];
|
||||
GLenum loadop = loadops[i];
|
||||
bool preserved = loadop == GL_LOAD_OP_LOAD_ANGLE;
|
||||
b.prependPlane(loadop != GL_LOAD_OP_DISABLE_ANGLE ? plane.getInternalformat() : GL_NONE,
|
||||
preserved);
|
||||
b.prependPlane(plane.getInternalformat(), preserved);
|
||||
if (preserved)
|
||||
{
|
||||
const gl::ImageIndex &idx = plane.getTextureImageIndex();
|
||||
|
||||
@@ -1724,7 +1724,6 @@ bool ValidatePLSLoadOperation(const Context *context, angle::EntryPoint entryPoi
|
||||
case GL_LOAD_OP_CLEAR_ANGLE:
|
||||
case GL_LOAD_OP_LOAD_ANGLE:
|
||||
case GL_DONT_CARE:
|
||||
case GL_LOAD_OP_DISABLE_ANGLE:
|
||||
return true;
|
||||
default:
|
||||
context->validationErrorF(entryPoint, GL_INVALID_ENUM, kPLSInvalidLoadOperation,
|
||||
@@ -2015,13 +2014,8 @@ bool ValidateBeginPixelLocalStorageANGLE(const Context *context,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (loadops[i] == GL_LOAD_OP_DISABLE_ANGLE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// INVALID_OPERATION is generated if <loadops>[0..<n>-1] is not LOAD_OP_DISABLE_ANGLE, and
|
||||
// the pixel local storage plane at that same index is is in a deinitialized state.
|
||||
// INVALID_OPERATION is generated if a pixel local storage plane at index [0..<n>-1] is in a
|
||||
// deinitialized state.
|
||||
if (pls == nullptr || pls->getPlane(i).isDeinitialized())
|
||||
{
|
||||
context->validationError(entryPoint, GL_INVALID_OPERATION,
|
||||
|
||||
@@ -825,24 +825,21 @@ TEST_P(PixelLocalStorageTest, ClearValues_r32)
|
||||
PLSTestTexture tex32f(GL_R32F);
|
||||
PLSTestTexture tex32ui(GL_R32UI);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(0, tex32f, 0, 0);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(2, tex32ui, 0, 0);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(1, tex32ui, 0, 0);
|
||||
glFramebufferPixelLocalClearValuefvANGLE(0, ClearF(100.5, 0, 0, 0));
|
||||
glFramebufferPixelLocalClearValueuivANGLE(2, ClearUI(0xbaadbeef, 1, 1, 0));
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
3, GLenumArray({GL_LOAD_OP_CLEAR_ANGLE, GL_LOAD_OP_DISABLE_ANGLE, GL_LOAD_OP_CLEAR_ANGLE}));
|
||||
glFramebufferPixelLocalClearValueuivANGLE(1, ClearUI(0xbaadbeef, 1, 1, 0));
|
||||
glBeginPixelLocalStorageANGLE(2, GLenumArray({GL_LOAD_OP_CLEAR_ANGLE, GL_LOAD_OP_CLEAR_ANGLE}));
|
||||
EXPECT_PIXEL_LOCAL_CLEAR_VALUE_FLOAT(0, ({100.5f, 0, 0, 0}));
|
||||
EXPECT_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT(2, ({0xbaadbeef, 1, 1, 0}));
|
||||
glEndPixelLocalStorageANGLE(
|
||||
3, GLenumArray({GL_STORE_OP_STORE_ANGLE, GL_DONT_CARE, GL_STORE_OP_STORE_ANGLE}));
|
||||
EXPECT_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT(1, ({0xbaadbeef, 1, 1, 0}));
|
||||
glEndPixelLocalStorageANGLE(2, GLenumArray({GL_STORE_OP_STORE_ANGLE, GL_STORE_OP_STORE_ANGLE}));
|
||||
attachTextureToScratchFBO(tex32f);
|
||||
EXPECT_PIXEL_RECT32F_EQ(0, 0, 1, 1, GLColor32F(100.5f, 0, 0, 1));
|
||||
attachTextureToScratchFBO(tex32ui);
|
||||
EXPECT_PIXEL_RECT32UI_EQ(0, 0, 1, 1, GLColor32UI(0xbaadbeef, 0, 0, 1));
|
||||
}
|
||||
|
||||
// Check proper support of GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_CLEAR_ANGLE, and
|
||||
// GL_LOAD_OP_DISABLE_ANGLE loadOps. Also verify that it works do draw with
|
||||
// GL_MAX_LOCAL_STORAGE_PLANES_ANGLE planes.
|
||||
// Check proper support of GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_LOAD_ANGLE, and GL_LOAD_OP_CLEAR_ANGLE
|
||||
// loadOps. Also verify that it works do draw with GL_MAX_LOCAL_STORAGE_PLANES_ANGLE planes.
|
||||
TEST_P(PixelLocalStorageTest, LoadOps)
|
||||
{
|
||||
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_ANGLE_shader_pixel_local_storage"));
|
||||
@@ -917,26 +914,27 @@ TEST_P(PixelLocalStorageTest, LoadOps)
|
||||
// Detach the last read pls texture from the framebuffer.
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
||||
|
||||
// Now test GL_LOAD_OP_DISABLE_ANGLE and GL_LOAD_OP_ZERO_ANGLE.
|
||||
for (int i = 0; i < MAX_PIXEL_LOCAL_STORAGE_PLANES; ++i)
|
||||
// Now test GL_LOAD_OP_ZERO_ANGLE, and leaving a plane deinitialized.
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
loadOps[i] =
|
||||
loadOps[i] == GL_LOAD_OP_CLEAR_ANGLE ? GL_LOAD_OP_ZERO_ANGLE : GL_LOAD_OP_DISABLE_ANGLE;
|
||||
loadOps[i] = GL_LOAD_OP_ZERO_ANGLE;
|
||||
}
|
||||
|
||||
// Execute a pls pass without a draw.
|
||||
glBeginPixelLocalStorageANGLE(MAX_PIXEL_LOCAL_STORAGE_PLANES, loadOps.data());
|
||||
glEndPixelLocalStorageANGLE(MAX_PIXEL_LOCAL_STORAGE_PLANES, storeOps.data());
|
||||
glBeginPixelLocalStorageANGLE(3, loadOps.data());
|
||||
glEndPixelLocalStorageANGLE(3, storeOps.data());
|
||||
|
||||
for (int i = 0; i < MAX_PIXEL_LOCAL_STORAGE_PLANES; ++i)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texs[i], 0);
|
||||
if (loadOps[i] == GL_LOAD_OP_ZERO_ANGLE)
|
||||
if (i < 2)
|
||||
{
|
||||
ASSERT(loadOps[i] == GL_LOAD_OP_ZERO_ANGLE);
|
||||
EXPECT_PIXEL_RECT_EQ(0, 0, W, H, GLColor(0, 0, 0, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Should have been left unchanged.
|
||||
EXPECT_PIXEL_RECT_EQ(0, 0, 20, H, GLColor(255, 255, 0, 255));
|
||||
EXPECT_PIXEL_RECT_EQ(20, 0, W - 20, H, GLColor(255, 0, 0, 255));
|
||||
}
|
||||
@@ -1401,7 +1399,7 @@ TEST_P(PixelLocalStorageTest, ProgramCache)
|
||||
PLSTestTexture pls1(GL_RGBA8UI, 1, 1);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(1, pls1, 0, 0);
|
||||
PLSTestTexture pls3(GL_RGBA8UI, 1, 1);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(3, pls3, 0, 0);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(2, pls3, 0, 0);
|
||||
glDrawBuffers(0, nullptr);
|
||||
glViewport(0, 0, 1, 1);
|
||||
|
||||
@@ -1411,7 +1409,7 @@ TEST_P(PixelLocalStorageTest, ProgramCache)
|
||||
mProgram.compile(R"(
|
||||
layout(binding=0, rgba8ui) uniform highp upixelLocalANGLE pls0;
|
||||
layout(binding=1, rgba8ui) uniform highp upixelLocalANGLE pls1;
|
||||
layout(binding=3, rgba8ui) uniform highp upixelLocalANGLE pls3;
|
||||
layout(binding=2, rgba8ui) uniform highp upixelLocalANGLE pls3;
|
||||
void main()
|
||||
{
|
||||
pixelLocalStoreANGLE(pls0, uvec4(color) - uvec4(aux1));
|
||||
@@ -1423,12 +1421,11 @@ TEST_P(PixelLocalStorageTest, ProgramCache)
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
4, GLenumArray({GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_DISABLE_ANGLE,
|
||||
GL_LOAD_OP_ZERO_ANGLE}));
|
||||
3, GLenumArray({GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_ZERO_ANGLE}));
|
||||
mProgram.drawBoxes({{FULLSCREEN, {255, 254, 253, 252}, {0, 1, 2, 3}, {4, 5, 6, 7}}});
|
||||
glEndPixelLocalStorageANGLE(
|
||||
4, GLenumArray({GL_STORE_OP_STORE_ANGLE, GL_STORE_OP_STORE_ANGLE, GL_DONT_CARE,
|
||||
GL_STORE_OP_STORE_ANGLE}));
|
||||
3, GLenumArray(
|
||||
{GL_STORE_OP_STORE_ANGLE, GL_STORE_OP_STORE_ANGLE, GL_STORE_OP_STORE_ANGLE}));
|
||||
|
||||
attachTextureToScratchFBO(pls0);
|
||||
EXPECT_PIXEL_RECT32UI_EQ(0, 0, 1, 1,
|
||||
@@ -1540,6 +1537,7 @@ TEST_P(PixelLocalStorageTest, LoadOnly)
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
mProgram.compile(R"(
|
||||
layout(binding=0, r32f) uniform highp pixelLocalANGLE memoryless;
|
||||
layout(binding=1, rgba8) uniform highp pixelLocalANGLE tex;
|
||||
out vec4 fragcolor;
|
||||
void main()
|
||||
@@ -1547,14 +1545,14 @@ TEST_P(PixelLocalStorageTest, LoadOnly)
|
||||
fragcolor = 1.0 - pixelLocalLoadANGLE(tex);
|
||||
})");
|
||||
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
2, GLenumArray({GL_LOAD_OP_DISABLE_ANGLE, GL_LOAD_OP_LOAD_ANGLE}));
|
||||
glBeginPixelLocalStorageANGLE(2, GLenumArray({GL_DONT_CARE, GL_LOAD_OP_LOAD_ANGLE}));
|
||||
}
|
||||
else
|
||||
{
|
||||
glFramebufferTexturePixelLocalStorageANGLE(2, tex2, 0, 0);
|
||||
|
||||
mProgram.compile(R"(
|
||||
layout(binding=0, r32f) uniform highp pixelLocalANGLE memoryless;
|
||||
layout(binding=1, rgba8) uniform highp pixelLocalANGLE tex;
|
||||
layout(binding=2, rgba8) uniform highp pixelLocalANGLE fragcolor;
|
||||
void main()
|
||||
@@ -1563,8 +1561,7 @@ TEST_P(PixelLocalStorageTest, LoadOnly)
|
||||
})");
|
||||
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
3,
|
||||
GLenumArray({GL_LOAD_OP_DISABLE_ANGLE, GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_ZERO_ANGLE}));
|
||||
3, GLenumArray({GL_DONT_CARE, GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_ZERO_ANGLE}));
|
||||
}
|
||||
|
||||
mProgram.drawBoxes({{FULLSCREEN}});
|
||||
@@ -3147,14 +3144,14 @@ TEST_P(PixelLocalStorageValidationTest, FramebufferTexturePixelLocalStorageANGLE
|
||||
// INVALID_OPERATION is generated if PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE is nonzero.
|
||||
{
|
||||
PLSTestTexture tmp(GL_RGBA8);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(1, tex, 0, 0);
|
||||
glBeginPixelLocalStorageANGLE(2, GLenumArray({GL_LOAD_OP_DISABLE_ANGLE, GL_DONT_CARE}));
|
||||
glFramebufferTexturePixelLocalStorageANGLE(0, tmp, 0, 0);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(0, tex, 0, 0);
|
||||
glBeginPixelLocalStorageANGLE(1, GLenumArray({GL_DONT_CARE}));
|
||||
glFramebufferTexturePixelLocalStorageANGLE(1, tmp, 0, 0);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_OPERATION);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Operation not permitted while pixel local storage is active.");
|
||||
// The store operation is ignored if its plane is memoryless or disabled.
|
||||
glEndPixelLocalStorageANGLE(2, GLenumArray({GL_STORE_OP_STORE_ANGLE, GL_DONT_CARE}));
|
||||
glFramebufferTexturePixelLocalStorageANGLE(1, 0, 0, 0);
|
||||
glEndPixelLocalStorageANGLE(1, GLenumArray({GL_DONT_CARE}));
|
||||
glFramebufferTexturePixelLocalStorageANGLE(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// INVALID_VALUE is generated if <plane> < 0 or <plane> >= MAX_PIXEL_LOCAL_STORAGE_PLANES_ANGLE.
|
||||
@@ -3484,7 +3481,7 @@ TEST_P(PixelLocalStorageValidationTest, BeginPixelLocalStorageANGLE_framebuffer_
|
||||
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
MAX_PIXEL_LOCAL_STORAGE_PLANES + 1,
|
||||
std::vector<GLenum>(MAX_PIXEL_LOCAL_STORAGE_PLANES + 1, GL_LOAD_OP_DISABLE_ANGLE).data());
|
||||
std::vector<GLenum>(MAX_PIXEL_LOCAL_STORAGE_PLANES + 1, GL_DONT_CARE).data());
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_VALUE);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG(
|
||||
"Planes must be less than or equal to GL_MAX_PIXEL_LOCAL_STORAGE_PLANES_ANGLE.");
|
||||
@@ -3504,7 +3501,7 @@ TEST_P(PixelLocalStorageValidationTest, BeginPixelLocalStorageANGLE_framebuffer_
|
||||
PLSTestTexture tmp(GL_RGBA8, 100, 100);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + reservedAttachment,
|
||||
GL_TEXTURE_2D, tmp, 0);
|
||||
glBeginPixelLocalStorageANGLE(1, GLenumArray({GL_LOAD_OP_DISABLE_ANGLE}));
|
||||
glBeginPixelLocalStorageANGLE(1, GLenumArray({GL_DONT_CARE}));
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_FRAMEBUFFER_OPERATION);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG(
|
||||
"Framebuffer cannot have images attached to color attachment points on or after "
|
||||
@@ -3530,8 +3527,7 @@ TEST_P(PixelLocalStorageValidationTest, BeginPixelLocalStorageANGLE_framebuffer_
|
||||
GL_TEXTURE_2D, tmp, 0);
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
MAX_PIXEL_LOCAL_STORAGE_PLANES,
|
||||
std::vector<GLenum>(MAX_PIXEL_LOCAL_STORAGE_PLANES, GL_LOAD_OP_DISABLE_ANGLE)
|
||||
.data());
|
||||
std::vector<GLenum>(MAX_PIXEL_LOCAL_STORAGE_PLANES, GL_DONT_CARE).data());
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_FRAMEBUFFER_OPERATION);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG(
|
||||
"Framebuffer cannot have images attached to color attachment points on or after "
|
||||
@@ -3564,12 +3560,20 @@ TEST_P(PixelLocalStorageValidationTest, BeginPixelLocalStorageANGLE_loadops)
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Invalid pixel local storage Load Operation: 0x1E01.");
|
||||
ASSERT_GL_INTEGER(GL_PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE, 0);
|
||||
|
||||
std::vector<GLenum> loadops(MAX_PIXEL_LOCAL_STORAGE_PLANES, GL_LOAD_OP_DISABLE_ANGLE);
|
||||
for (int i = 1; i < MAX_PIXEL_LOCAL_STORAGE_PLANES; ++i)
|
||||
{
|
||||
glFramebufferMemorylessPixelLocalStorageANGLE(i, GL_RGBA8);
|
||||
}
|
||||
std::vector<GLenum> loadops(MAX_PIXEL_LOCAL_STORAGE_PLANES, GL_DONT_CARE);
|
||||
loadops.back() = GL_SCISSOR_BOX;
|
||||
glBeginPixelLocalStorageANGLE(MAX_PIXEL_LOCAL_STORAGE_PLANES, loadops.data());
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Invalid pixel local storage Load Operation: 0x0C10.");
|
||||
ASSERT_GL_INTEGER(GL_PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE, 0);
|
||||
for (int i = 1; i < MAX_PIXEL_LOCAL_STORAGE_PLANES; ++i)
|
||||
{
|
||||
glFramebufferMemorylessPixelLocalStorageANGLE(i, GL_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
// INVALID_OPERATION is generated if <loadops>[0..<n>-1] is not DISABLE_ANGLE, and the pixel
|
||||
@@ -3632,22 +3636,19 @@ TEST_P(PixelLocalStorageValidationTest, BeginPixelLocalStorageANGLE_pls_planes)
|
||||
// INVALID_OPERATION is generated if all enabled, texture-backed pixel local storage planes do
|
||||
// not have the same width and height.
|
||||
{
|
||||
GLTexture pls1;
|
||||
glBindTexture(GL_TEXTURE_2D, pls1);
|
||||
PLSTestTexture pls1(GL_RGBA8, 100, 100);
|
||||
GLTexture pls2;
|
||||
glBindTexture(GL_TEXTURE_2D, pls2);
|
||||
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, 100, 101);
|
||||
PLSTestTexture pls2(GL_RGBA8, 100, 100);
|
||||
|
||||
glFramebufferTexturePixelLocalStorageANGLE(0, pls0, 0, 0);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(1, pls1, 0, 0);
|
||||
glFramebufferTexturePixelLocalStorageANGLE(2, pls2, 0, 0);
|
||||
|
||||
// Disabling the mismatched size plane is fine.
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
3,
|
||||
GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_DISABLE_ANGLE, GL_LOAD_OP_LOAD_ANGLE}));
|
||||
glBeginPixelLocalStorageANGLE(2, GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_DONT_CARE}));
|
||||
EXPECT_GL_NO_ERROR();
|
||||
glEndPixelLocalStorageANGLE(
|
||||
3, GLenumArray({GL_DONT_CARE, GL_STORE_OP_STORE_ANGLE, GL_DONT_CARE}));
|
||||
glEndPixelLocalStorageANGLE(2, GLenumArray({GL_DONT_CARE, GL_STORE_OP_STORE_ANGLE}));
|
||||
EXPECT_GL_NO_ERROR();
|
||||
|
||||
// Enabling the mismatched size plane errors.
|
||||
@@ -3658,9 +3659,9 @@ TEST_P(PixelLocalStorageValidationTest, BeginPixelLocalStorageANGLE_pls_planes)
|
||||
ASSERT_GL_INTEGER(GL_PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE, 0);
|
||||
|
||||
// Converting the mismatched size plane to memoryless also works.
|
||||
pls1.reset();
|
||||
pls2.reset();
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
3, GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_LOAD_ANGLE}));
|
||||
3, GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_ZERO_ANGLE, GL_LOAD_OP_CLEAR_ANGLE}));
|
||||
EXPECT_GL_NO_ERROR();
|
||||
glEndPixelLocalStorageANGLE(
|
||||
3, GLenumArray(
|
||||
@@ -3709,9 +3710,13 @@ TEST_P(PixelLocalStorageValidationTest, BeginPixelLocalStorageANGLE_pls_planes)
|
||||
// INVALID_OPERATION is generated if the draw framebuffer has no attachments and no enabled,
|
||||
// texture-backed pixel local storage planes.
|
||||
{
|
||||
for (int i = 0; i < MAX_PIXEL_LOCAL_STORAGE_PLANES; ++i)
|
||||
{
|
||||
glFramebufferMemorylessPixelLocalStorageANGLE(i, GL_RGBA8);
|
||||
}
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
MAX_PIXEL_LOCAL_STORAGE_PLANES,
|
||||
std::vector<GLenum>(MAX_PIXEL_LOCAL_STORAGE_PLANES, GL_LOAD_OP_DISABLE_ANGLE).data());
|
||||
std::vector<GLenum>(MAX_PIXEL_LOCAL_STORAGE_PLANES, GL_LOAD_OP_ZERO_ANGLE).data());
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_OPERATION);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG(
|
||||
"Draw framebuffer has no attachments and no enabled, texture-backed pixel local "
|
||||
@@ -3814,8 +3819,7 @@ TEST_P(PixelLocalStorageValidationTest, EndAndBarrierANGLE)
|
||||
ASSERT_GL_NO_ERROR();
|
||||
|
||||
// INVALID_VALUE is generated if <n> != PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE.
|
||||
glBeginPixelLocalStorageANGLE(2,
|
||||
GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_DISABLE_ANGLE}));
|
||||
glBeginPixelLocalStorageANGLE(2, GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_CLEAR_ANGLE}));
|
||||
ASSERT_GL_NO_ERROR();
|
||||
|
||||
glEndPixelLocalStorageANGLE(3, GLenumArray({GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE}));
|
||||
@@ -3832,7 +3836,7 @@ TEST_P(PixelLocalStorageValidationTest, EndAndBarrierANGLE)
|
||||
// INVALID_ENUM is generated if <storeops>[0..PIXEL_LOCAL_STORAGE_ACTIVE_PLANES_ANGLE-1] is not
|
||||
// one of the Store Operations enumerated in Table X.2.
|
||||
glBeginPixelLocalStorageANGLE(
|
||||
3, GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_LOAD_OP_DISABLE_ANGLE, GL_LOAD_OP_CLEAR_ANGLE}));
|
||||
3, GLenumArray({GL_LOAD_OP_LOAD_ANGLE, GL_DONT_CARE, GL_LOAD_OP_CLEAR_ANGLE}));
|
||||
ASSERT_GL_NO_ERROR();
|
||||
|
||||
glEndPixelLocalStorageANGLE(
|
||||
@@ -3841,9 +3845,9 @@ TEST_P(PixelLocalStorageValidationTest, EndAndBarrierANGLE)
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Invalid pixel local storage Store Operation: 0x96E5.");
|
||||
|
||||
glEndPixelLocalStorageANGLE(
|
||||
3, GLenumArray({GL_DONT_CARE, GL_LOAD_OP_DISABLE_ANGLE, GL_STORE_OP_STORE_ANGLE}));
|
||||
3, GLenumArray({GL_DONT_CARE, GL_LOAD_OP_LOAD_ANGLE, GL_STORE_OP_STORE_ANGLE}));
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Invalid pixel local storage Store Operation: 0x96E7.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Invalid pixel local storage Store Operation: 0x96E6.");
|
||||
|
||||
glEndPixelLocalStorageANGLE(
|
||||
3, GLenumArray({GL_DONT_CARE, GL_STORE_OP_STORE_ANGLE, GL_LOAD_OP_ZERO_ANGLE}));
|
||||
@@ -3939,11 +3943,11 @@ TEST_P(PixelLocalStorageValidationTest, GetFramebufferPixelLocalStorageParameter
|
||||
glGetFramebufferPixelLocalStorageParameterivRobustANGLE(
|
||||
0, GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE, 4, &length, ints);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96ED is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EC is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterivANGLE(0, GL_PIXEL_LOCAL_CLEAR_VALUE_FLOAT_ANGLE,
|
||||
ints);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96ED is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EC is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterivRobustANGLE(
|
||||
0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, 4, &length, ints);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
@@ -3955,49 +3959,49 @@ TEST_P(PixelLocalStorageValidationTest, GetFramebufferPixelLocalStorageParameter
|
||||
glGetFramebufferPixelLocalStorageParameterfvRobustANGLE(1, GL_PIXEL_LOCAL_FORMAT_ANGLE, 4,
|
||||
&length, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96E9 is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96E8 is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvANGLE(1, GL_PIXEL_LOCAL_FORMAT_ANGLE, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96E9 is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96E8 is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvRobustANGLE(1, GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE, 1,
|
||||
&length, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EA is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96E9 is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvANGLE(1, GL_PIXEL_LOCAL_TEXTURE_NAME_ANGLE, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EA is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96E9 is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvRobustANGLE(1, GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE,
|
||||
1, &length, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EB is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EA is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvANGLE(1, GL_PIXEL_LOCAL_TEXTURE_LEVEL_ANGLE,
|
||||
floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EB is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EA is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvRobustANGLE(1, GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE,
|
||||
1, &length, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EC is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EB is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvANGLE(1, GL_PIXEL_LOCAL_TEXTURE_LAYER_ANGLE,
|
||||
floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EC is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EB is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvRobustANGLE(1, GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE,
|
||||
1, &length, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EE is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96ED is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvANGLE(1, GL_PIXEL_LOCAL_CLEAR_VALUE_INT_ANGLE,
|
||||
floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EE is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96ED is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvRobustANGLE(
|
||||
1, GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE, 1, &length, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EF is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EE is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvANGLE(
|
||||
1, GL_PIXEL_LOCAL_CLEAR_VALUE_UNSIGNED_INT_ANGLE, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EF is currently not supported.");
|
||||
EXPECT_GL_SINGLE_ERROR_MSG("Enum 0x96EE is currently not supported.");
|
||||
glGetFramebufferPixelLocalStorageParameterfvRobustANGLE(
|
||||
1, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, 1, &length, floats);
|
||||
EXPECT_GL_SINGLE_ERROR(GL_INVALID_ENUM);
|
||||
|
||||
Reference in New Issue
Block a user