Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
9431c53c
Unverified
Commit
9431c53c
authored
May 07, 2021
by
Greg Fischer
Committed by
GitHub
May 07, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2632 from greg-lunarg/karl0
Fix arrays dimensioned with spec constant sized gl_WorkGroupSize
parents
41e39c61
1464d036
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+2
-0
spv.noWorkgroup.comp.out
Test/baseResults/spv.noWorkgroup.comp.out
+13
-1
spv.noWorkgroup.comp
Test/spv.noWorkgroup.comp
+2
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
9431c53c
...
...
@@ -4236,6 +4236,8 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra
glslang
::
TIntermTyped
*
specNode
=
arraySizes
.
getDimNode
(
dim
);
if
(
specNode
!=
nullptr
)
{
builder
.
clearAccessChain
();
SpecConstantOpModeGuard
spec_constant_op_mode_setter
(
&
builder
);
spec_constant_op_mode_setter
.
turnOnSpecConstantOpMode
();
specNode
->
traverse
(
this
);
return
accessChainLoad
(
specNode
->
getAsTyped
()
->
getType
());
}
...
...
Test/baseResults/spv.noWorkgroup.comp.out
View file @
9431c53c
spv.noWorkgroup.comp
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by
12
// Id's are bound by
23
Capability Shader
1: ExtInstImport "GLSL.std.450"
...
...
@@ -10,6 +10,7 @@ spv.noWorkgroup.comp
ExecutionMode 4 LocalSize 1 1 1
Source GLSL 450
Name 4 "main"
Name 22 "keys"
Decorate 7 SpecId 18
Decorate 8 SpecId 10
Decorate 9 SpecId 19
...
...
@@ -22,6 +23,17 @@ spv.noWorkgroup.comp
9: 6(int) SpecConstant 1
10: TypeVector 6(int) 3
11: 10(ivec3) SpecConstantComposite 7 8 9
12: 6(int) Constant 0
13: 6(int) SpecConstantOp 81 11 0
14: 6(int) Constant 1
15: 6(int) SpecConstantOp 81 11 1(GLSL.std.450)
16: 6(int) SpecConstantOp 132 13 15
17: TypeArray 6(int) 16
18: 6(int) Constant 2
19: 6(int) SpecConstantOp 81 11 2
20: TypeArray 17 19
21: TypePointer Workgroup 20
22(keys): 21(ptr) Variable Workgroup
4(main): 2 Function None 3
5: Label
Return
...
...
Test/spv.noWorkgroup.comp
View file @
9431c53c
...
...
@@ -2,6 +2,8 @@
layout(local_size_x_id = 18, local_size_y_id=10,local_size_z_id = 19) in;
shared uint keys[gl_WorkGroupSize.z][gl_WorkGroupSize.x * gl_WorkGroupSize.y];
void main()
{
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment