mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 14:09:03 +00:00
Using `local_size_x = 512` in the shader used in the Vulkan interop tests fails on older hardware because this exceeds the maximum barrier size limit. Changed to 256, which is still a multiple of 32 and 64, and is below the hardware limitations. The tests are not performance tests anyways, so the performance penalty, if any, is acceptable. Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
28 lines
782 B
Plaintext
28 lines
782 B
Plaintext
#version 450
|
|
#extension GL_ARB_separate_shader_objects : enable
|
|
#extension GL_EXT_shader_explicit_arithmetic_types_int8 : enable
|
|
#extension GL_EXT_shader_explicit_arithmetic_types_int32 : enable
|
|
|
|
#define MAX_BUFFERS 5
|
|
|
|
layout(binding = 0) buffer Params
|
|
{
|
|
uint32_t numBuffers;
|
|
uint32_t bufferSize;
|
|
uint32_t interBufferOffset;
|
|
};
|
|
layout(binding = 1) buffer Buffer
|
|
{
|
|
uint8_t ptr[];
|
|
} bufferPtrList[MAX_BUFFERS];
|
|
layout(local_size_x = 256) in;
|
|
void main() {
|
|
for (uint32_t bufIdx = 0; bufIdx < numBuffers; bufIdx++) {
|
|
uint32_t ptrIdx = gl_GlobalInvocationID.x;
|
|
uint32_t limit = bufferSize;
|
|
while (ptrIdx < limit) {
|
|
bufferPtrList[bufIdx].ptr[ptrIdx]++;
|
|
ptrIdx += (gl_NumWorkGroups.x * gl_WorkGroupSize.x);
|
|
}
|
|
}
|
|
} |