dEQP-GLES31.functional.ssbo.layout.random.*: Add check for
GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS

Commit 237916d03377a469e30dd36087738b069f83a19a
(gles31:es31fSSBOLayoutTests limit m_maxBlocks and m_maxBlockMembers
for low ram device) disturbs the random number generator for this set
of tests.

This causes:

dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers.45

to require implementation support for 9 SSBO binding points, more
than the spec requires.

Fixed by adding check for GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS and
marking this test as unsupported

Bug: b/125134085
Change-Id: I17dc2063675ace06bc7e7763cff8bd46bd397b8c
diff --git a/modules/gles31/functional/es31fSSBOLayoutCase.cpp b/modules/gles31/functional/es31fSSBOLayoutCase.cpp
index 226c9eb..a9e0e6e 100644
--- a/modules/gles31/functional/es31fSSBOLayoutCase.cpp
+++ b/modules/gles31/functional/es31fSSBOLayoutCase.cpp
@@ -1282,12 +1282,15 @@
 	}
 }
 
-string generateComputeShader (glu::GLSLVersion glslVersion, const ShaderInterface& interface, const BufferLayout& layout, const vector<BlockDataPtr>& comparePtrs, const vector<BlockDataPtr>& writePtrs)
+string generateComputeShader (const glw::Functions& gl, glu::GLSLVersion glslVersion, const ShaderInterface& interface, const BufferLayout& layout, const vector<BlockDataPtr>& comparePtrs, const vector<BlockDataPtr>& writePtrs)
 {
 	std::ostringstream src;
+	glw::GLint maxShaderStorageBufferBindings;
 
 	DE_ASSERT(glslVersion == glu::GLSL_VERSION_310_ES || glslVersion == glu::GLSL_VERSION_430);
 
+	gl.getIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxShaderStorageBufferBindings);
+
 	src << glu::getGLSLVersionDeclaration(glslVersion) << "\n";
 	src << "layout(local_size_x = 1) in;\n";
 	src << "\n";
@@ -1307,6 +1310,11 @@
 
 			bindingPoint += block.isArray() ? block.getArraySize() : 1;
 		}
+
+		if (bindingPoint > maxShaderStorageBufferBindings)
+		{
+			throw tcu::NotSupportedError("Test requires support for more SSBO bindings than implementation exposes");
+		}
 	}
 
 	// Atomic counter for counting passed invocations.
@@ -2109,7 +2117,7 @@
 	generateValues			(refLayout, writeData.pointers, deStringHash(getName()) ^ 0x25ca4e7);
 	copyNonWrittenData		(m_interface, refLayout, initialData.pointers, writeData.pointers);
 
-	const glu::ShaderProgram program(m_renderCtx, glu::ProgramSources() << glu::ComputeSource(generateComputeShader(m_glslVersion, m_interface, refLayout, initialData.pointers, writeData.pointers)));
+	const glu::ShaderProgram program(m_renderCtx, glu::ProgramSources() << glu::ComputeSource(generateComputeShader(gl, m_glslVersion, m_interface, refLayout, initialData.pointers, writeData.pointers)));
 	log << program;
 
 	if (!program.isOk())