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
f37f4d23
Commit
f37f4d23
authored
Jan 02, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix issue #646: map SV_DispatchThreadID -> GlobalInvocationID.
parent
aa6d5629
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
29 deletions
+43
-29
hlsl.basic.comp.out
Test/baseResults/hlsl.basic.comp.out
+33
-19
hlsl.numthreads.comp.out
Test/baseResults/hlsl.numthreads.comp.out
+5
-5
hlsl.basic.comp
Test/hlsl.basic.comp
+2
-2
revision.h
glslang/Include/revision.h
+2
-2
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+1
-1
No files found.
Test/baseResults/hlsl.basic.comp.out
View file @
f37f4d23
...
@@ -2,13 +2,17 @@ hlsl.basic.comp
...
@@ -2,13 +2,17 @@ hlsl.basic.comp
Shader version: 450
Shader version: 450
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
0:? Sequence
0:4 Function Definition: main(i1; (temp void)
0:4 Function Definition: main(i1;
i1;
(temp void)
0:4 Function Parameters:
0:4 Function Parameters:
0:4 'dti' (in int LocalInvocationID)
0:4 'dti' (in int GlobalInvocationID)
0:4 'gti' (in int LocalInvocationID)
0:? Sequence
0:? Sequence
0:5 'dti' (in int LocalInvocationID)
0:5 subtract (temp int)
0:5 'dti' (in int GlobalInvocationID)
0:5 'gti' (in int LocalInvocationID)
0:? Linker Objects
0:? Linker Objects
0:? 'dti' (in int LocalInvocationID)
0:? 'dti' (in int GlobalInvocationID)
0:? 'gti' (in int LocalInvocationID)
0:? 'a' (shared 100-element array of 4-component vector of float)
0:? 'a' (shared 100-element array of 4-component vector of float)
...
@@ -18,41 +22,51 @@ Linked compute stage:
...
@@ -18,41 +22,51 @@ Linked compute stage:
Shader version: 450
Shader version: 450
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
0:? Sequence
0:4 Function Definition: main(i1; (temp void)
0:4 Function Definition: main(i1;
i1;
(temp void)
0:4 Function Parameters:
0:4 Function Parameters:
0:4 'dti' (in int LocalInvocationID)
0:4 'dti' (in int GlobalInvocationID)
0:4 'gti' (in int LocalInvocationID)
0:? Sequence
0:? Sequence
0:5 'dti' (in int LocalInvocationID)
0:5 subtract (temp int)
0:5 'dti' (in int GlobalInvocationID)
0:5 'gti' (in int LocalInvocationID)
0:? Linker Objects
0:? Linker Objects
0:? 'dti' (in int LocalInvocationID)
0:? 'dti' (in int GlobalInvocationID)
0:? 'gti' (in int LocalInvocationID)
0:? 'a' (shared 100-element array of 4-component vector of float)
0:? 'a' (shared 100-element array of 4-component vector of float)
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by
16
// Id's are bound by
20
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 8
EntryPoint GLCompute 4 "main" 8
10
ExecutionMode 4 LocalSize 1 1 1
ExecutionMode 4 LocalSize 1 1 1
Name 4 "main"
Name 4 "main"
Name 8 "dti"
Name 8 "dti"
Name 15 "a"
Name 10 "gti"
Decorate 8(dti) BuiltIn LocalInvocationId
Name 19 "a"
Decorate 8(dti) BuiltIn GlobalInvocationId
Decorate 10(gti) BuiltIn LocalInvocationId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
7: TypePointer Input 6(int)
7: TypePointer Input 6(int)
8(dti): 7(ptr) Variable Input
8(dti): 7(ptr) Variable Input
9: TypeFloat 32
10(gti): 7(ptr) Variable Input
10: TypeVector 9(float) 4
13: TypeFloat 32
11: TypeInt 32 0
14: TypeVector 13(float) 4
12: 11(int) Constant 100
15: TypeInt 32 0
13: TypeArray 10(fvec4) 12
16: 15(int) Constant 100
14: TypePointer Workgroup 13
17: TypeArray 14(fvec4) 16
15(a): 14(ptr) Variable Workgroup
18: TypePointer Workgroup 17
19(a): 18(ptr) Variable Workgroup
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
9: 6(int) Load 8(dti)
11: 6(int) Load 10(gti)
12: 6(int) ISub 9 11
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/hlsl.numthreads.comp.out
View file @
f37f4d23
...
@@ -7,9 +7,9 @@ local_size = (4, 4, 2)
...
@@ -7,9 +7,9 @@ local_size = (4, 4, 2)
0:4 'tid' (in 3-component vector of uint)
0:4 'tid' (in 3-component vector of uint)
0:9 Function Definition: main_aux1(vu3; (temp void)
0:9 Function Definition: main_aux1(vu3; (temp void)
0:9 Function Parameters:
0:9 Function Parameters:
0:9 'tid' (in 3-component vector of uint
Loc
alInvocationID)
0:9 'tid' (in 3-component vector of uint
Glob
alInvocationID)
0:? Linker Objects
0:? Linker Objects
0:? 'tid' (in 3-component vector of uint
Loc
alInvocationID)
0:? 'tid' (in 3-component vector of uint
Glob
alInvocationID)
Linked compute stage:
Linked compute stage:
...
@@ -23,9 +23,9 @@ local_size = (4, 4, 2)
...
@@ -23,9 +23,9 @@ local_size = (4, 4, 2)
0:4 'tid' (in 3-component vector of uint)
0:4 'tid' (in 3-component vector of uint)
0:9 Function Definition: main_aux1(vu3; (temp void)
0:9 Function Definition: main_aux1(vu3; (temp void)
0:9 Function Parameters:
0:9 Function Parameters:
0:9 'tid' (in 3-component vector of uint
Loc
alInvocationID)
0:9 'tid' (in 3-component vector of uint
Glob
alInvocationID)
0:? Linker Objects
0:? Linker Objects
0:? 'tid' (in 3-component vector of uint
Loc
alInvocationID)
0:? 'tid' (in 3-component vector of uint
Glob
alInvocationID)
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
...
@@ -40,7 +40,7 @@ local_size = (4, 4, 2)
...
@@ -40,7 +40,7 @@ local_size = (4, 4, 2)
Name 11 "main(vu3;"
Name 11 "main(vu3;"
Name 10 "tid"
Name 10 "tid"
Name 14 "tid"
Name 14 "tid"
Decorate 14(tid) BuiltIn
Loc
alInvocationId
Decorate 14(tid) BuiltIn
Glob
alInvocationId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 0
6: TypeInt 32 0
...
...
Test/hlsl.basic.comp
View file @
f37f4d23
groupshared float4 a[100];
groupshared float4 a[100];
void main(int dti : SV_DispatchThreadID)
void main(int dti : SV_DispatchThreadID
, int gti : SV_GroupThreadID
)
{
{
dti;
dti
- gti
;
}
}
glslang/Include/revision.h
View file @
f37f4d23
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.172
5
"
#define GLSLANG_REVISION "Overload400-PrecQual.172
6
"
#define GLSLANG_DATE "
30-Dec-2016
"
#define GLSLANG_DATE "
02-Jan-2017
"
hlsl/hlslParseHelper.cpp
View file @
f37f4d23
...
@@ -3195,7 +3195,7 @@ void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, con
...
@@ -3195,7 +3195,7 @@ void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, con
else
if
(
semanticUpperCase
==
"SV_GSINSTANCEID"
)
else
if
(
semanticUpperCase
==
"SV_GSINSTANCEID"
)
qualifier
.
builtIn
=
EbvInvocationId
;
qualifier
.
builtIn
=
EbvInvocationId
;
else
if
(
semanticUpperCase
==
"SV_DISPATCHTHREADID"
)
else
if
(
semanticUpperCase
==
"SV_DISPATCHTHREADID"
)
qualifier
.
builtIn
=
Ebv
Loc
alInvocationId
;
qualifier
.
builtIn
=
Ebv
Glob
alInvocationId
;
else
if
(
semanticUpperCase
==
"SV_GROUPTHREADID"
)
else
if
(
semanticUpperCase
==
"SV_GROUPTHREADID"
)
qualifier
.
builtIn
=
EbvLocalInvocationId
;
qualifier
.
builtIn
=
EbvLocalInvocationId
;
else
if
(
semanticUpperCase
==
"SV_GROUPID"
)
else
if
(
semanticUpperCase
==
"SV_GROUPID"
)
...
...
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