ES31: Add BUFFER_VARIABLE and SHADER_STORAGE_BLOCK program interfaces
This patch collects the shader storage block members information.
It implements getShaderStorageBlockMemberInfo and getShaderStorageBlockSize
for OpenGL backend. Meanwhile, it implements BUFFER_VARIABLE and SHADER_STORAGE_BLOCK
interfaces for program query.
BUG=angleproject:1920
TEST=angle_end2end_tests:ProgramInterfaceTest*
dEQP-GLES31.functional.layout_binding.ssbo*
dEQP-GLES31.functional.compute.basic.empty
dEQP-GLES31.functional.compute.basic.ssbo_rw*
dEQP-GLES31.functional.compute.basic.ssbo_local_barrier*
dEQP-GLES31.functional.compute.basic.copy_image_to_ssbo_small
dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_groups
dEQP-GLES31.functional.compute.basic.copy_ssbo_multiple_invocations
dEQP-GLES31.functional.compute.basic.copy_ssbo_single_invocation
dEQP-GLES31.functional.compute.basic.copy_ssbo_to_image_small
dEQP-GLES31.functional.compute.basic.shared_var*
dEQP-GLES31.functional.compute.basic.ubo_to_ssbo*
dEQP-GLES31.functional.compute.basic.write_multiple_arr*
dEQP-GLES31.functional.compute.shared_var.basic_type.*
dEQP-GLES31.functional.compute.shared_var.work_group_size.*
dEQP-GLES31.functional.atomic_counter.*
Change-Id: Ie8b81fde5a2e919aab77adb3d137c9ff2f193409
Reviewed-on: https://chromium-review.googlesource.com/712235
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index 86cf371..7db0856 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -260,6 +260,12 @@
case GL_UNIFORM:
return (index < static_cast<GLuint>(programObject->getActiveUniformCount()));
+ case GL_BUFFER_VARIABLE:
+ return (index < static_cast<GLuint>(programObject->getActiveBufferVariableCount()));
+
+ case GL_SHADER_STORAGE_BLOCK:
+ return (index < static_cast<GLuint>(programObject->getActiveShaderStorageBlockCount()));
+
case GL_UNIFORM_BLOCK:
return (index < programObject->getActiveUniformBlockCount());
@@ -268,8 +274,6 @@
// TODO(jie.a.chen@intel.com): more interfaces.
case GL_TRANSFORM_FEEDBACK_VARYING:
- case GL_BUFFER_VARIABLE:
- case GL_SHADER_STORAGE_BLOCK:
UNIMPLEMENTED();
return false;