cl21: Add image access qualifier for spirv_new binaries (#272)

The OpenCL SPIR-V Environment Specification v2.2-10, Section 2.1
states that:

    For all OpTypeImage type-declaration instructions:
    The optional image Access Qualifier must be present.

Add the ReadOnly or WriteOnly qualifier as appropriate to the .spvasm
files, and regenerate the .spv files using

    spirv-as --target-env spv1.0
This commit is contained in:
Sven van Haastregt
2019-05-15 19:02:06 +01:00
committed by Kévin Petit
parent 4f71ca382b
commit caae56d32c
8 changed files with 4 additions and 4 deletions

View File

@@ -32,7 +32,7 @@
%3 = OpTypeVector %2 3
%4 = OpTypePointer UniformConstant %3
%7 = OpTypeVoid
%8 = OpTypeImage %7 2D 0 0 0 0 Unknown
%8 = OpTypeImage %7 2D 0 0 0 0 Unknown WriteOnly
%9 = OpTypeVector %2 4
%10 = OpTypePointer CrossWorkgroup %9
%11 = OpTypeFunction %7 %8 %10

View File

@@ -40,7 +40,7 @@
%3 = OpTypeVector %2 3
%4 = OpTypePointer UniformConstant %3
%7 = OpTypeVoid
%8 = OpTypeImage %7 2D 0 0 0 0 Unknown
%8 = OpTypeImage %7 2D 0 0 0 0 Unknown WriteOnly
%10 = OpTypeVector %9 4
%11 = OpTypePointer CrossWorkgroup %10
%12 = OpTypeFunction %7 %8 %11

View File

@@ -41,7 +41,7 @@
%10 = OpTypeVoid
%11 = OpTypeVector %2 4
%12 = OpTypePointer CrossWorkgroup %11
%13 = OpTypeImage %10 2D 0 0 0 0 Unknown
%13 = OpTypeImage %10 2D 0 0 0 0 Unknown ReadOnly
%14 = OpTypeFunction %10 %12 %13
%27 = OpTypeVector %2 2
%31 = OpTypeSampler

View File

@@ -49,7 +49,7 @@
%11 = OpTypeVoid
%12 = OpTypeVector %2 4
%13 = OpTypePointer CrossWorkgroup %12
%14 = OpTypeImage %11 2D 0 0 0 0 Unknown
%14 = OpTypeImage %11 2D 0 0 0 0 Unknown ReadOnly
%15 = OpTypeFunction %11 %13 %14
%31 = OpTypeVector %2 2
%35 = OpTypeSampler