Skip to content

Commit

Permalink
Extra testing for layouts
Browse files Browse the repository at this point in the history
This change extends layout tests with tests that use
VK_EXT_descriptor_indexing.

Components: Vulkan

VK-GL-CTS issue: 1453

Affects:
dEQP-VK.ssbo.*
dEQP-VK.ubo.*

Change-Id: I320ba9b46d08605dd98a60d9bbc4000a664da6b8
  • Loading branch information
piby authored and alegal-arm committed Dec 17, 2019
1 parent 26000a5 commit f2bc4a2
Show file tree
Hide file tree
Showing 11 changed files with 1,483 additions and 55 deletions.
450 changes: 450 additions & 0 deletions android/cts/master/vk-master.txt

Large diffs are not rendered by default.

29 changes: 26 additions & 3 deletions external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,17 @@ bool usesScalarLayout (const ShaderInterface& interface)
return false;
}

bool usesDescriptorIndexing(const ShaderInterface& interface)
{
// If any of blocks has DESCRIPTOR_INDEXING flag
for (int ndx = 0; ndx < interface.getNumBlocks(); ++ndx)
{
if (interface.getBlock(ndx).getFlags() & LAYOUT_DESCRIPTOR_INDEXING)
return true;
}
return false;
}

struct Indent
{
int level;
Expand Down Expand Up @@ -1111,7 +1122,9 @@ void generateDeclaration (std::ostream& src, const BufferBlock& block, int bindi
if (block.getInstanceName() != DE_NULL)
{
src << " " << block.getInstanceName();
if (block.isArray())
if (block.getFlags() & LAYOUT_DESCRIPTOR_INDEXING)
src << "[]";
else if (block.isArray())
src << "[" << block.getArraySize() << "]";
}
else
Expand Down Expand Up @@ -1275,7 +1288,9 @@ string getShaderName (const BufferBlock& block, int instanceNdx, const BufferVar
{
name << block.getInstanceName();

if (block.isArray())
if (block.getFlags() & LAYOUT_DESCRIPTOR_INDEXING)
name << "[nonuniformEXT(" << instanceNdx << ")]";
else if (block.isArray())
name << "[" << instanceNdx << "]";

name << ".";
Expand Down Expand Up @@ -1502,15 +1517,21 @@ string generateComputeShader (const ShaderInterface& interface, const BufferLayo
{
std::ostringstream src;

if (uses16BitStorage(interface) || uses8BitStorage(interface) || usesRelaxedLayout(interface) || usesScalarLayout(interface))
if (uses16BitStorage(interface) || uses8BitStorage(interface) ||
usesRelaxedLayout(interface) || usesScalarLayout(interface) ||
usesDescriptorIndexing(interface))
{
src << "#version 450\n";
}
else
src << "#version 310 es\n";


src << "#extension GL_EXT_shader_16bit_storage : enable\n";
src << "#extension GL_EXT_shader_8bit_storage : enable\n";
src << "#extension GL_EXT_scalar_block_layout : enable\n";
src << "#extension GL_EXT_buffer_reference : enable\n";
src << "#extension GL_EXT_nonuniform_qualifier : enable\n";
src << "layout(local_size_x = 1) in;\n";
src << "\n";

Expand Down Expand Up @@ -2558,6 +2579,8 @@ TestInstance* SSBOLayoutCase::createInstance (Context& context) const
TCU_THROW(NotSupportedError, "scalarBlockLayout not supported");
if (m_usePhysStorageBuffer && !context.isBufferDeviceAddressSupported())
TCU_THROW(NotSupportedError, "Physical storage buffer pointers not supported");
if (!context.getDescriptorIndexingFeatures().shaderStorageBufferArrayNonUniformIndexing && usesDescriptorIndexing(m_interface))
TCU_THROW(NotSupportedError, "Descriptor indexing over storage buffer not supported");
return new SSBOLayoutCaseInstance(context, m_bufferMode, m_interface, m_refLayout, m_initialData, m_writeData, m_usePhysStorageBuffer);
}

Expand Down
21 changes: 11 additions & 10 deletions external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ enum BufferVarFlags
LAYOUT_MASK = LAYOUT_STD430|LAYOUT_STD140|LAYOUT_ROW_MAJOR|LAYOUT_COLUMN_MAJOR|LAYOUT_SCALAR,

// \todo [2013-10-14 pyry] Investigate adding these.
/* QUALIFIER_COHERENT = (1<<4),
QUALIFIER_VOLATILE = (1<<5),
QUALIFIER_RESTRICT = (1<<6),
QUALIFIER_READONLY = (1<<7),
QUALIFIER_WRITEONLY = (1<<8),*/
ACCESS_READ = (1<<9), //!< Buffer variable is read in the shader.
ACCESS_WRITE = (1<<10), //!< Buffer variable is written in the shader.
LAYOUT_RELAXED = (1<<11), //!< Support VK_KHR_relaxed_block_layout extension
LAYOUT_16BIT_STORAGE= (1<<12), //!< Support VK_KHR_16bit_storage extension
LAYOUT_8BIT_STORAGE = (1<<13), //!< Support VK_KHR_8bit_storage extension
/* QUALIFIER_COHERENT = (1<<4),
QUALIFIER_VOLATILE = (1<<5),
QUALIFIER_RESTRICT = (1<<6),
QUALIFIER_READONLY = (1<<7),
QUALIFIER_WRITEONLY = (1<<8),*/
ACCESS_READ = (1<<9), //!< Buffer variable is read in the shader.
ACCESS_WRITE = (1<<10), //!< Buffer variable is written in the shader.
LAYOUT_RELAXED = (1<<11), //!< Support VK_KHR_relaxed_block_layout extension
LAYOUT_16BIT_STORAGE = (1<<12), //!< Support VK_KHR_16bit_storage extension
LAYOUT_8BIT_STORAGE = (1 << 13), //!< Support VK_KHR_8bit_storage extension
LAYOUT_DESCRIPTOR_INDEXING = (1 << 14), //!< Support VK_KHR_descriptor_indexing extension
};

enum MatrixLoadFlags
Expand Down
45 changes: 27 additions & 18 deletions external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ enum FeatureBits
FEATURE_16BIT_STORAGE = (1<<14),
FEATURE_8BIT_STORAGE = (1<<15),
FEATURE_SCALAR_LAYOUT = (1<<16),
FEATURE_DESCRIPTOR_INDEXING = (1<<17),
};

class RandomSSBOLayoutCase : public SSBOLayoutCase
Expand Down Expand Up @@ -105,10 +106,10 @@ class RandomSSBOLayoutCase : public SSBOLayoutCase
RandomSSBOLayoutCase::RandomSSBOLayoutCase (tcu::TestContext& testCtx, const char* name, const char* description, BufferMode bufferMode, deUint32 features, deUint32 seed, bool usePhysStorageBuffer)
: SSBOLayoutCase (testCtx, name, description, bufferMode, LOAD_FULL_MATRIX, usePhysStorageBuffer)
, m_features (features)
, m_maxBlocks (4)
, m_maxInstances ((features & FEATURE_INSTANCE_ARRAYS) ? 3 : 0)
, m_maxArrayLength ((features & FEATURE_ARRAYS) ? 8 : 1)
, m_maxStructDepth ((features & FEATURE_STRUCTS) ? 2 : 0)
, m_maxBlocks ((features & FEATURE_DESCRIPTOR_INDEXING) ? 1 : 4)
, m_maxInstances ((features & FEATURE_INSTANCE_ARRAYS) ? 3 : 0)
, m_maxArrayLength ((features & FEATURE_ARRAYS) ? 8 : 1)
, m_maxStructDepth ((features & FEATURE_STRUCTS) ? 2 : 0)
, m_maxBlockMembers (5)
, m_maxStructMembers (4)
, m_seed (seed)
Expand All @@ -135,6 +136,9 @@ void RandomSSBOLayoutCase::generateBlock (de::Random& rnd, deUint32 layoutFlags)
int numInstances = (m_maxInstances > 0 && rnd.getFloat() < instanceArrayWeight) ? rnd.getInt(0, m_maxInstances) : 0;
int numVars = rnd.getInt(1, m_maxBlockMembers);

if (m_features & FEATURE_DESCRIPTOR_INDEXING)
numInstances = rnd.getInt(2, 4);

if (numInstances > 0)
block.setArraySize(numInstances);

Expand All @@ -153,14 +157,17 @@ void RandomSSBOLayoutCase::generateBlock (de::Random& rnd, deUint32 layoutFlags)
if (m_features & FEATURE_RELAXED_LAYOUT)
layoutFlagCandidates.push_back(LAYOUT_RELAXED);

if (m_features & FEATURE_SCALAR_LAYOUT)
layoutFlagCandidates.push_back(LAYOUT_SCALAR);

if (m_features & FEATURE_16BIT_STORAGE)
layoutFlags |= LAYOUT_16BIT_STORAGE;

if (m_features & FEATURE_8BIT_STORAGE)
layoutFlags |= LAYOUT_8BIT_STORAGE;

if (m_features & FEATURE_SCALAR_LAYOUT)
layoutFlagCandidates.push_back(LAYOUT_SCALAR);
if (m_features & FEATURE_DESCRIPTOR_INDEXING)
layoutFlags |= LAYOUT_DESCRIPTOR_INDEXING;

DE_ASSERT(!layoutFlagCandidates.empty());

Expand Down Expand Up @@ -1688,14 +1695,15 @@ void SSBOLayoutTests::init (void)

// ssbo.random
{
const deUint32 allStdLayouts = FEATURE_STD140_LAYOUT|FEATURE_STD430_LAYOUT;
const deUint32 allBasicTypes = FEATURE_VECTORS|FEATURE_MATRICES;
const deUint32 unused = FEATURE_UNUSED_MEMBERS|FEATURE_UNUSED_VARS;
const deUint32 unsized = FEATURE_UNSIZED_ARRAYS;
const deUint32 matFlags = FEATURE_MATRIX_LAYOUT;
const deUint32 allButRelaxed = ~FEATURE_RELAXED_LAYOUT & ~FEATURE_16BIT_STORAGE & ~FEATURE_8BIT_STORAGE & ~FEATURE_SCALAR_LAYOUT;
const deUint32 allRelaxed = FEATURE_VECTORS|FEATURE_RELAXED_LAYOUT|FEATURE_INSTANCE_ARRAYS;
const deUint32 allScalar = ~FEATURE_RELAXED_LAYOUT & ~allStdLayouts & ~FEATURE_16BIT_STORAGE & ~FEATURE_8BIT_STORAGE;
const deUint32 allStdLayouts = FEATURE_STD140_LAYOUT|FEATURE_STD430_LAYOUT;
const deUint32 allBasicTypes = FEATURE_VECTORS|FEATURE_MATRICES;
const deUint32 unused = FEATURE_UNUSED_MEMBERS|FEATURE_UNUSED_VARS;
const deUint32 unsized = FEATURE_UNSIZED_ARRAYS;
const deUint32 matFlags = FEATURE_MATRIX_LAYOUT;
const deUint32 allButRelaxed = ~FEATURE_RELAXED_LAYOUT & ~FEATURE_16BIT_STORAGE & ~FEATURE_8BIT_STORAGE & ~FEATURE_SCALAR_LAYOUT & ~FEATURE_DESCRIPTOR_INDEXING;
const deUint32 allRelaxed = FEATURE_VECTORS|FEATURE_RELAXED_LAYOUT|FEATURE_INSTANCE_ARRAYS;
const deUint32 allScalar = ~FEATURE_RELAXED_LAYOUT & ~allStdLayouts & ~FEATURE_16BIT_STORAGE & ~FEATURE_8BIT_STORAGE & ~FEATURE_DESCRIPTOR_INDEXING;
const deUint32 descriptorIndexing = allStdLayouts|FEATURE_RELAXED_LAYOUT|FEATURE_SCALAR_LAYOUT|FEATURE_DESCRIPTOR_INDEXING|allBasicTypes|unused|matFlags;

tcu::TestCaseGroup* randomGroup = new tcu::TestCaseGroup(m_testCtx, "random", "Random Uniform Block cases");
addChild(randomGroup);
Expand All @@ -1711,7 +1719,7 @@ void SSBOLayoutTests::init (void)
}
else if (i == 2)
{
group = new tcu::TestCaseGroup(m_testCtx, "8bit", "18bit storage");
group = new tcu::TestCaseGroup(m_testCtx, "8bit", "8bit storage");
randomGroup->addChild(group);
}
const deUint32 use16BitStorage = i == 1 ? FEATURE_16BIT_STORAGE : 0;
Expand All @@ -1722,7 +1730,7 @@ void SSBOLayoutTests::init (void)
createRandomCaseGroup(group, m_testCtx, "vector_types", "Scalar and vector types only, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allStdLayouts|unused|FEATURE_VECTORS, 25, 25, m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "basic_types", "All basic types, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allStdLayouts|unused|allBasicTypes|matFlags, 25, 50, m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "basic_arrays", "Arrays, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allStdLayouts|unused|allBasicTypes|matFlags|FEATURE_ARRAYS, 25, 50, m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "unsized_arrays", "Unsized arrays, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allStdLayouts|unused|allBasicTypes|matFlags|unsized|FEATURE_ARRAYS, 25, 50, m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "unsized_arrays", "Unsized arrays, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allStdLayouts|unused|allBasicTypes|matFlags|unsized|FEATURE_ARRAYS, 25, 50, m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "arrays_of_arrays", "Arrays of arrays, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allStdLayouts|unused|allBasicTypes|matFlags|unsized|FEATURE_ARRAYS|FEATURE_ARRAYS_OF_ARRAYS, 25, 950, m_usePhysStorageBuffer);

createRandomCaseGroup(group, m_testCtx, "basic_instance_arrays", "Basic instance arrays, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allStdLayouts|unused|allBasicTypes|matFlags|unsized|FEATURE_INSTANCE_ARRAYS, 25, 75, m_usePhysStorageBuffer);
Expand All @@ -1733,8 +1741,9 @@ void SSBOLayoutTests::init (void)
createRandomCaseGroup(group, m_testCtx, "all_per_block_buffers", "All random features, per-block buffers", SSBOLayoutCase::BUFFERMODE_PER_BLOCK, use8BitStorage|use16BitStorage|allButRelaxed, 50, 200, m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "all_shared_buffer", "All random features, shared buffer", SSBOLayoutCase::BUFFERMODE_SINGLE, use8BitStorage|use16BitStorage|allButRelaxed, 50, 250, m_usePhysStorageBuffer);

createRandomCaseGroup(group, m_testCtx, "relaxed", "VK_KHR_relaxed_block_layout", SSBOLayoutCase::BUFFERMODE_SINGLE, use8BitStorage|use16BitStorage|allRelaxed, 100, deInt32Hash(313), m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "scalar", "VK_EXT_scalar_block_layout", SSBOLayoutCase::BUFFERMODE_SINGLE, use8BitStorage|use16BitStorage|allScalar, 100, deInt32Hash(313), m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "relaxed", "VK_KHR_relaxed_block_layout", SSBOLayoutCase::BUFFERMODE_SINGLE, use8BitStorage|use16BitStorage|allRelaxed, 100, deInt32Hash(313), m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "scalar", "VK_EXT_scalar_block_layout", SSBOLayoutCase::BUFFERMODE_SINGLE, use8BitStorage|use16BitStorage|allScalar, 100, deInt32Hash(313), m_usePhysStorageBuffer);
createRandomCaseGroup(group, m_testCtx, "descriptor_indexing", "VK_EXT_descriptor_indexing", SSBOLayoutCase::BUFFERMODE_SINGLE, use8BitStorage|use16BitStorage|descriptorIndexing, 50, 123, m_usePhysStorageBuffer);
}
}
}
Expand Down
50 changes: 36 additions & 14 deletions external/vulkancts/modules/vulkan/ubo/vktRandomUniformBlockCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,34 @@ RandomUniformBlockCase::RandomUniformBlockCase (tcu::TestContext& testCtx,
BufferMode bufferMode,
deUint32 features,
deUint32 seed)
: UniformBlockCase (testCtx, name, description, bufferMode, LOAD_FULL_MATRIX, (features & FEATURE_OUT_OF_ORDER_OFFSETS) != 0u)
, m_features (features)
, m_maxVertexBlocks ((features & FEATURE_VERTEX_BLOCKS) ? 4 : 0)
, m_maxFragmentBlocks ((features & FEATURE_FRAGMENT_BLOCKS) ? 4 : 0)
, m_maxSharedBlocks ((features & FEATURE_SHARED_BLOCKS) ? 4 : 0)
, m_maxInstances ((features & FEATURE_INSTANCE_ARRAYS) ? 3 : 0)
, m_maxArrayLength ((features & FEATURE_ARRAYS) ? 8 : 0)
, m_maxStructDepth ((features & FEATURE_STRUCTS) ? 2 : 0)
, m_maxBlockMembers (5)
, m_maxStructMembers (4)
, m_seed (seed)
, m_blockNdx (1)
, m_uniformNdx (1)
, m_structNdx (1)
: UniformBlockCase (testCtx, name, description, bufferMode, LOAD_FULL_MATRIX, (features & FEATURE_OUT_OF_ORDER_OFFSETS) != 0u)
, m_features (features)
, m_maxVertexBlocks ((features & FEATURE_VERTEX_BLOCKS) ? 4 : 0)
, m_maxFragmentBlocks ((features & FEATURE_FRAGMENT_BLOCKS) ? 4 : 0)
, m_maxSharedBlocks ((features & FEATURE_SHARED_BLOCKS) ? 4 : 0)
, m_maxInstances ((features & FEATURE_INSTANCE_ARRAYS) ? 3 : 0)
, m_maxArrayLength ((features & FEATURE_ARRAYS) ? 8 : 0)
, m_maxStructDepth ((features & FEATURE_STRUCTS) ? 2 : 0)
, m_maxBlockMembers (5)
, m_maxStructMembers (4)
, m_seed (seed)
, m_blockNdx (1)
, m_uniformNdx (1)
, m_structNdx (1)
, m_availableDescriptorUniformBuffers (12)
{
de::Random rnd(m_seed);

int numShared = m_maxSharedBlocks > 0 ? rnd.getInt(1, m_maxSharedBlocks) : 0;
int numVtxBlocks = m_maxVertexBlocks-numShared > 0 ? rnd.getInt(1, m_maxVertexBlocks - numShared) : 0;
int numFragBlocks = m_maxFragmentBlocks-numShared > 0 ? rnd.getInt(1, m_maxFragmentBlocks - numShared): 0;

// calculate how many additional descriptors we can use for arrays
// this is needed for descriptor_indexing testing as we need to take in to account
// maxPerStageDescriptorUniformBuffers limit and we can't query it as we need to
// generate shaders before Context is created; minimal value of this limit is 12
m_availableDescriptorUniformBuffers -= numVtxBlocks + numFragBlocks;

for (int ndx = 0; ndx < numShared; ndx++)
generateBlock(rnd, DECLARE_VERTEX | DECLARE_FRAGMENT);

Expand All @@ -100,6 +107,18 @@ void RandomUniformBlockCase::generateBlock (de::Random& rnd, deUint32 layoutFlag
int numInstances = (m_maxInstances > 0 && rnd.getFloat() < instanceArrayWeight) ? rnd.getInt(0, m_maxInstances) : 0;
int numUniforms = rnd.getInt(1, m_maxBlockMembers);

if (m_features & FEATURE_DESCRIPTOR_INDEXING)
{
// generate arrays only when we are within the limit
if (m_availableDescriptorUniformBuffers > 3)
numInstances = rnd.getInt(2, 4);
else if (m_availableDescriptorUniformBuffers > 1)
numInstances = m_availableDescriptorUniformBuffers;
else
numInstances = 0;
m_availableDescriptorUniformBuffers -= numInstances;
}

if (numInstances > 0)
block.setArraySize(numInstances);

Expand All @@ -125,6 +144,9 @@ void RandomUniformBlockCase::generateBlock (de::Random& rnd, deUint32 layoutFlag
if (m_features & FEATURE_8BIT_STORAGE)
layoutFlags |= LAYOUT_8BIT_STORAGE;

if (m_features & FEATURE_DESCRIPTOR_INDEXING)
layoutFlags |= LAYOUT_DESCRIPTOR_INDEXING;

layoutFlags |= rnd.choose<deUint32>(layoutFlagCandidates.begin(), layoutFlagCandidates.end());

if (m_features & FEATURE_MATRIX_LAYOUT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum FeatureBits
FEATURE_8BIT_STORAGE = (1<<19),
FEATURE_STD430_LAYOUT = (1<<20),
FEATURE_SCALAR_LAYOUT = (1<<21),
FEATURE_DESCRIPTOR_INDEXING = (1<<22),
};

class RandomUniformBlockCase : public UniformBlockCase
Expand Down Expand Up @@ -90,6 +91,7 @@ class RandomUniformBlockCase : public UniformBlockCase
int m_blockNdx;
int m_uniformNdx;
int m_structNdx;
int m_availableDescriptorUniformBuffers;
};

} // ubo
Expand Down
21 changes: 19 additions & 2 deletions external/vulkancts/modules/vulkan/ubo/vktUniformBlockCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,12 @@ void generateDeclaration (std::ostringstream& src, int blockNdx, const UniformBl
{
src << " " << block.getInstanceName();
if (block.isArray())
src << "[" << block.getArraySize() << "]";
{
if (block.getFlags() & LAYOUT_DESCRIPTOR_INDEXING)
src << "[]";
else
src << "[" << block.getArraySize() << "]";
}
}
else
DE_ASSERT(!block.isArray());
Expand Down Expand Up @@ -1547,7 +1552,15 @@ void generateCompareSrc (std::ostringstream& src,

for (int instanceNdx = 0; instanceNdx < numInstances; instanceNdx++)
{
std::string instancePostfix = isArray ? std::string("[") + de::toString(instanceNdx) + "]" : std::string("");
std::string instancePostfix = "";
if (isArray)
{
std::string indexStr = de::toString(instanceNdx);
if (interface.usesBlockLayout(LAYOUT_DESCRIPTOR_INDEXING))
indexStr = std::string("nonuniformEXT(") + indexStr + ")";
instancePostfix = std::string("[") + indexStr + "]";
}

std::string blockInstanceName = block.getBlockName() + instancePostfix;
std::string srcPrefix = hasInstanceName ? block.getInstanceName() + instancePostfix + "." : std::string("");
int blockLayoutNdx = layout.getBlockLayoutIndex(blockNdx, instanceNdx);
Expand Down Expand Up @@ -1575,6 +1588,7 @@ std::string generateVertexShader (const ShaderInterface& interface, const Unifor
src << "#extension GL_EXT_shader_16bit_storage : enable\n";
src << "#extension GL_EXT_shader_8bit_storage : enable\n";
src << "#extension GL_EXT_scalar_block_layout : enable\n";
src << "#extension GL_EXT_nonuniform_qualifier : enable\n";

src << "layout(location = 0) in highp vec4 a_position;\n";
src << "layout(location = 0) out mediump float v_vtxResult;\n";
Expand Down Expand Up @@ -1618,6 +1632,7 @@ std::string generateFragmentShader (const ShaderInterface& interface, const Unif
src << "#extension GL_EXT_shader_16bit_storage : enable\n";
src << "#extension GL_EXT_shader_8bit_storage : enable\n";
src << "#extension GL_EXT_scalar_block_layout : enable\n";
src << "#extension GL_EXT_nonuniform_qualifier : enable\n";

src << "layout(location = 0) in mediump float v_vtxResult;\n";
src << "layout(location = 0) out mediump vec4 dEQP_FragColor;\n";
Expand Down Expand Up @@ -2222,6 +2237,8 @@ TestInstance* UniformBlockCase::createInstance (Context& context) const
TCU_THROW(NotSupportedError, "std430 not supported");
if (!context.getScalarBlockLayoutFeatures().scalarBlockLayout && usesBlockLayout(LAYOUT_SCALAR))
TCU_THROW(NotSupportedError, "scalarBlockLayout not supported");
if (!context.getDescriptorIndexingFeatures().shaderUniformBufferArrayNonUniformIndexing && usesBlockLayout(LAYOUT_DESCRIPTOR_INDEXING))
TCU_THROW(NotSupportedError, "Descriptor indexing over uniform buffer not supported");

return new UniformBlockCaseInstance(context, m_bufferMode, m_uniformLayout, m_blockPointers);
}
Expand Down
Loading

0 comments on commit f2bc4a2

Please sign in to comment.