Skip to content
This repository was archived by the owner on Jul 19, 2018. It is now read-only.
This repository was archived by the owner on Jul 19, 2018. It is now read-only.

SPIR-V : Add Validation for Interface of Entry Point #2676

@metora

Description

@metora

Hi

I write a Mesa-IR to SPIR-V Translator, and it's fine on NVIDIA and Adreno driver.
But It's crash on MALI driver, so I found the problem is I lost add gl_Position..

OpEntryPoint Vertex %6 "main" %13
I lost the %13.

It's crash on MALI Offline Shader Compiler also.

Thanks

; SPIR-V
; Version: 1.0
; Generator: X-LEGEND Mesa-IR/SPIR-V Translator; 0
; Bound: 17
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %6 "main" %13
OpSource ESSL 310
OpName %6 "main"
OpName %10 "gl_PerVertex"
OpMemberName %10 0 "gl_Position"
OpDecorate %10 Block
OpMemberDecorate %10 0 BuiltIn Position
%2 = OpTypeFloat 32
%3 = OpTypeVector %2 4
%4 = OpTypeVoid
%5 = OpTypeFunction %4
%8 = OpConstant %2 1
%9 = OpConstantComposite %3 %8 %8 %8 %8
%12 = OpTypePointer Output %3
%14 = OpTypeInt 32 1
%10 = OpTypeStruct %3
%11 = OpTypePointer Output %10
%13 = OpVariable %11 Output
%15 = OpConstant %14 0
%6 = OpFunction %4 None %5
%7 = OpLabel
%16 = OpAccessChain %12 %13 %15
OpStore %16 %9
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