Skip to content

spirv-opt: OpAccessChain without indices is not supported #3643

@Vasniktel

Description

@Vasniktel

The following SPIR-V passes spirv-val's checks

               OpCapability Shader
          %1 = OpExtInstImport "GLSL.std.450"
               OpMemoryModel Logical GLSL450
               OpEntryPoint Fragment %4 "main"
               OpExecutionMode %4 OriginUpperLeft
               OpSource ESSL 310
          %2 = OpTypeVoid
          %3 = OpTypeFunction %2
          %6 = OpTypeBool
          %7 = OpTypePointer Function %6
          %4 = OpFunction %2 None %3
          %5 = OpLabel
         %10 = OpVariable %7 Function
         %11 = OpAccessChain %7 %10
               OpReturn
               OpFunctionEnd

In this code, the Base operand of the OpAccessChain is not a pointer to a composite. Also, indices operands are missing. The same issue arises with OpInBoundsAccessChain.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions