mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 07:59:01 +00:00
* Shader -> SPIR-V at CTS build time (#1849) Instead of relying on prebuilt checked-in SPIR-V files, compile available shaders at CTS build time. * Add dependency on glslc (available as part of VULKAN_SDK). * Add optional build flag BUILD_GLSL_SHADERS, OFF by default. * Remove pre-built SPIR-V files * Compile Shader -> SPIR-V at CTS build time * Use glslangValidator for shader -> spirv * Add glslangValidator tool for shader -> spirv * Refactor glslangValidator tool retrieval * Address review comments * Use add_subdirectory() instead of include() * Use glslang instead of glslangValidator * Update Github actions CI to install Vulkan SDK
This commit is contained in:
@@ -10,7 +10,7 @@ layout(binding = 0) buffer Params
|
||||
{
|
||||
uint32_t numImage2DDescriptors;
|
||||
};
|
||||
layout(binding = 1, rgba32f ) uniform image2D image2DList[ MAX_2D_IMAGE_DESCRIPTORS ];
|
||||
layout(binding = 1, GLSL_FORMAT ) uniform GLSL_TYPE_PREFIXimage2D image2DList[ MAX_2D_IMAGE_DESCRIPTORS ];
|
||||
layout(local_size_x = 32, local_size_y = 32) in;
|
||||
void main() {
|
||||
uvec3 numThreads = gl_NumWorkGroups * gl_WorkGroupSize;
|
||||
@@ -21,8 +21,8 @@ void main() {
|
||||
for (uint32_t col = gl_GlobalInvocationID.x; col < imageDim.x; col += numThreads.x) {
|
||||
ivec2 coordsA = ivec2(col, row);
|
||||
ivec2 coordsB = ivec2(col, imageDim.y - row - 1);
|
||||
vec4 dataA = imageLoad(image2DList[image2DIdx], coordsA);
|
||||
vec4 dataB = imageLoad(image2DList[image2DIdx], coordsB);
|
||||
GLSL_TYPE_PREFIXvec4 dataA = imageLoad(image2DList[image2DIdx], coordsA);
|
||||
GLSL_TYPE_PREFIXvec4 dataB = imageLoad(image2DList[image2DIdx], coordsB);
|
||||
imageStore(image2DList[image2DIdx], coordsA, dataB);
|
||||
imageStore(image2DList[image2DIdx], coordsB, dataA);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user