Skip to content

OpConditionalEntryPointINTEL not handled by spirv-opt #6277

@Keenuts

Description

@Keenuts

This is to track some disabled tests in spirv-opt.
The support for SPV_INTEL_function_variants being quite recent, seems like some part are missing in spirv-opt.

Can repro at 6c6152b by running:

./build/tools/spirv-as /tmp/1.spv -o - | ./build/tools/spirv-opt -Os - -o /tmp/1
error: line 0: Unhandled inst type (opcode: 6249) found outside function definition.

with the following code:

               OpCapability Shader
               OpCapability Geometry
               OpCapability SpecConditionalINTEL
               OpExtension "SPV_INTEL_function_variants"
               OpMemoryModel Logical GLSL450
               OpConditionalEntryPointINTEL %false Fragment %ps_main "ps_main" %in_var_POSITION %out_var_SV_Target
               OpExecutionMode %ps_main OriginUpperLeft
               OpSource HLSL 660
               OpName %in_var_POSITION "in.var.POSITION"
               OpName %out_var_SV_Target "out.var.SV_Target"
               OpName %ps_main "ps_main"
               OpDecorate %in_var_POSITION Location 0
               OpDecorate %out_var_SV_Target Location 0
       %bool = OpTypeBool
      %false = OpSpecConstantFalse %bool
      %float = OpTypeFloat 32
    %v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%_ptr_Output_v4float = OpTypePointer Output %v4float
       %void = OpTypeVoid
          %9 = OpTypeFunction %void
%in_var_POSITION = OpVariable %_ptr_Input_v4float Input
%out_var_SV_Target = OpVariable %_ptr_Output_v4float Output
    %ps_main = OpFunction %void None %9
         %10 = OpLabel
         %11 = OpLoad %v4float %in_var_POSITION
               OpStore %out_var_SV_Target %11
               OpReturn
               OpFunctionEnd

Metadata

Metadata

Assignees

No one assigned

    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