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
531898a4
Unverified
Commit
531898a4
authored
Dec 01, 2017
by
John Kessenich
Committed by
GitHub
Dec 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1170 from LoopDawg/matsize-warnings
HLSL: minor: add warning for mat() matrix size truncation
parents
7199a6d1
8c49f9b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
hlsl.cbuffer-identifier.vert.out
Test/baseResults/hlsl.cbuffer-identifier.vert.out
+2
-0
hlsl.mul-truncate.frag.out
Test/baseResults/hlsl.mul-truncate.frag.out
+9
-0
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+5
-1
No files found.
Test/baseResults/hlsl.cbuffer-identifier.vert.out
View file @
531898a4
hlsl.cbuffer-identifier.vert
WARNING: 0:29: '' : mul() matrix size mismatch
Shader version: 500
0:? Sequence
0:22 Function Definition: @main(struct-VS_INPUT-vf4-vf31; ( temp structure{ temp 4-component vector of float Pos, temp 3-component vector of float Norm})
...
...
Test/baseResults/hlsl.mul-truncate.frag.out
View file @
531898a4
hlsl.mul-truncate.frag
WARNING: 0:24: '' : mul() matrix size mismatch
WARNING: 0:25: '' : mul() matrix size mismatch
WARNING: 0:28: '' : mul() matrix size mismatch
WARNING: 0:29: '' : mul() matrix size mismatch
WARNING: 0:32: '' : mul() matrix size mismatch
WARNING: 0:33: '' : mul() matrix size mismatch
WARNING: 0:34: '' : mul() matrix size mismatch
WARNING: 0:35: '' : mul() matrix size mismatch
Shader version: 500
gl_FragCoord origin is upper left
0:? Sequence
...
...
hlsl/hlslParseHelper.cpp
View file @
531898a4
...
...
@@ -3238,7 +3238,7 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte
// Index into the array to find the item being loaded.
// Byte address buffers index in bytes (only multiples of 4 permitted... not so much a byte address
// buffer then, but that's what it calls itself.
// buffer then, but that's what it calls itself
)
.
int
size
=
0
;
...
...
@@ -5243,6 +5243,10 @@ void HlslParseContext::addGenMulArgumentConversion(const TSourceLoc& loc, TFunct
// downstream.
}
// Warn if we altered one of the arguments
if
(
arg0
!=
argAggregate
->
getSequence
()[
0
]
||
arg1
!=
argAggregate
->
getSequence
()[
1
])
warn
(
loc
,
"mul() matrix size mismatch"
,
""
,
""
);
// Put arguments back. (They might be unchanged, in which case this is harmless).
argAggregate
->
getSequence
()[
0
]
=
arg0
;
argAggregate
->
getSequence
()[
1
]
=
arg1
;
...
...
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