mirror of
https://github.com/RPCS3/glslang.git
synced 2024-11-24 03:39:51 +00:00
Merge pull request #2831 from amdrexu/bugfix
Fix an issue of spirv_by_reference
This commit is contained in:
commit
042aaea516
@ -1256,8 +1256,10 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
|
||||
if (type.getBasicType() == glslang::EbtRayQuery)
|
||||
return spv::StorageClassPrivate;
|
||||
#ifndef GLSLANG_WEB
|
||||
if (type.getQualifier().isSpirvByReference())
|
||||
return spv::StorageClassFunction;
|
||||
if (type.getQualifier().isSpirvByReference()) {
|
||||
if (type.getQualifier().isParamInput() || type.getQualifier().isParamOutput())
|
||||
return spv::StorageClassFunction;
|
||||
}
|
||||
#endif
|
||||
if (type.getQualifier().isPipeInput())
|
||||
return spv::StorageClassInput;
|
||||
|
@ -1,30 +1,30 @@
|
||||
spv.intrinsicsSpirvLiteral.vert
|
||||
Validation failed
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 12
|
||||
// Id's are bound by 13
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main"
|
||||
EntryPoint Vertex 4 "main" 9 11
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_EXT_spirv_intrinsics"
|
||||
Name 4 "main"
|
||||
Name 9 "vec4Out"
|
||||
Name 10 "vec4In"
|
||||
Name 11 "vec4In"
|
||||
Decorate 9(vec4Out) Location 1
|
||||
Decorate 10(vec4In) Location 0
|
||||
Decorate 11(vec4In) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Function 7(fvec4)
|
||||
8: TypePointer Output 7(fvec4)
|
||||
9(vec4Out): 8(ptr) Variable Output
|
||||
10: TypePointer Input 7(fvec4)
|
||||
11(vec4In): 10(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(vec4Out): 8(ptr) Variable Function
|
||||
10(vec4In): 8(ptr) Variable Function
|
||||
11: 7(fvec4) Load 10(vec4In) None
|
||||
Store 9(vec4Out) 11 Volatile
|
||||
12: 7(fvec4) Load 11(vec4In) None
|
||||
Store 9(vec4Out) 12 Volatile
|
||||
Return
|
||||
FunctionEnd
|
||||
|
Loading…
Reference in New Issue
Block a user