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
8116cfc9
Commit
8116cfc9
authored
Dec 09, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Give error on unsupported buffer initializer.
parent
87982be1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
37 deletions
+9
-37
hlsl.localStructuredBuffer.comp.out
Test/baseResults/hlsl.localStructuredBuffer.comp.out
+7
-37
hlslGrammar.cpp
hlsl/hlslGrammar.cpp
+2
-0
No files found.
Test/baseResults/hlsl.localStructuredBuffer.comp.out
View file @
8116cfc9
hlsl.localStructuredBuffer.comp
hlsl.localStructuredBuffer.comp
ERROR: 0:3: 'block initializer' : buffer aliasing not yet supported
ERROR: 1 compilation errors. No code generated.
Shader version: 500
Shader version: 500
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
ERROR: node is still EOpNull!
0:2 Function Definition: @main( ( temp void)
0:2 Function Definition: @main( ( temp void)
0:2 Function Parameters:
0:2 Function Parameters:
0:2 Function Definition: main( ( temp void)
0:2 Function Definition: main( ( temp void)
...
@@ -17,7 +21,7 @@ Linked compute stage:
...
@@ -17,7 +21,7 @@ Linked compute stage:
Shader version: 500
Shader version: 500
local_size = (1, 1, 1)
local_size = (1, 1, 1)
0:? Sequence
ERROR: node is still EOpNull!
0:2 Function Definition: @main( ( temp void)
0:2 Function Definition: @main( ( temp void)
0:2 Function Parameters:
0:2 Function Parameters:
0:2 Function Definition: main( ( temp void)
0:2 Function Definition: main( ( temp void)
...
@@ -27,38 +31,4 @@ local_size = (1, 1, 1)
...
@@ -27,38 +31,4 @@ local_size = (1, 1, 1)
0:? Linker Objects
0:? Linker Objects
0:? 'srt0' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
0:? 'srt0' (layout( row_major std430) buffer block{layout( row_major std430) buffer implicitly-sized array of uint @data})
// Module Version 10000
SPIR-V is not generated for failed compile or link
// Generated by (magic number): 80002
// Id's are bound by 14
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Name 4 "main"
Name 6 "@main("
Name 11 "srt0"
MemberName 11(srt0) 0 "@data"
Name 13 "srt0"
Decorate 10 ArrayStride 4
MemberDecorate 11(srt0) 0 Offset 0
Decorate 11(srt0) BufferBlock
Decorate 13(srt0) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
9: TypeInt 32 0
10: TypeRuntimeArray 9(int)
11(srt0): TypeStruct 10
12: TypePointer Uniform 11(srt0)
13(srt0): 12(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
8: 2 FunctionCall 6(@main()
Return
FunctionEnd
6(@main(): 2 Function None 3
7: Label
Return
FunctionEnd
hlsl/hlslGrammar.cpp
View file @
8116cfc9
...
@@ -478,6 +478,8 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList)
...
@@ -478,6 +478,8 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& nodeList)
if
(
typedefDecl
)
if
(
typedefDecl
)
parseContext
.
declareTypedef
(
idToken
.
loc
,
*
fullName
,
variableType
);
parseContext
.
declareTypedef
(
idToken
.
loc
,
*
fullName
,
variableType
);
else
if
(
variableType
.
getBasicType
()
==
EbtBlock
)
{
else
if
(
variableType
.
getBasicType
()
==
EbtBlock
)
{
if
(
expressionNode
)
parseContext
.
error
(
idToken
.
loc
,
"buffer aliasing not yet supported"
,
"block initializer"
,
""
);
parseContext
.
declareBlock
(
idToken
.
loc
,
variableType
,
fullName
,
parseContext
.
declareBlock
(
idToken
.
loc
,
variableType
,
fullName
,
variableType
.
isArray
()
?
&
variableType
.
getArraySizes
()
:
nullptr
);
variableType
.
isArray
()
?
&
variableType
.
getArraySizes
()
:
nullptr
);
parseContext
.
declareStructBufferCounter
(
idToken
.
loc
,
variableType
,
*
fullName
);
parseContext
.
declareStructBufferCounter
(
idToken
.
loc
,
variableType
,
*
fullName
);
...
...
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