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
697fdf01
Commit
697fdf01
authored
Nov 14, 2018
by
t.jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: fix invalid spir-v vector * scalar for float1
Missing check for float results in always emitting OpIMul even for float types
parent
7274bbc2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-1
hlsl.float1.frag.out
Test/baseResults/hlsl.float1.frag.out
+2
-6
No files found.
SPIRV/GlslangToSpv.cpp
View file @
697fdf01
...
...
@@ -4633,7 +4633,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, OpD
assert
(
builder
.
isScalar
(
right
));
needMatchingVectors
=
false
;
binOp
=
spv
::
OpVectorTimesScalar
;
}
else
}
else
if
(
isFloat
)
binOp
=
spv
::
OpFMul
;
else
binOp
=
spv
::
OpIMul
;
break
;
case
glslang
:
:
EOpVectorTimesMatrix
:
...
...
Test/baseResults/hlsl.float1.frag.out
View file @
697fdf01
...
...
@@ -64,10 +64,6 @@ gl_FragCoord origin is upper left
0:? 'f1' ( global 1-component vector of float)
0:? 'scalar' ( global float)
error: SPIRV-Tools Validation Errors
error: Expected int scalar or vector type as Result Type: IMul
%20 = OpIMul %float %18 %19
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 27
...
...
@@ -106,10 +102,10 @@ error: Expected int scalar or vector type as Result Type: IMul
12: Label
18: 6(float) Load 14(f1)
19: 6(float) Load 16(scalar)
20: 6(float)
I
Mul 18 19
20: 6(float)
F
Mul 18 19
21: 6(float) Load 9(inFloat1)
22: 6(float) Load 10(inScalar)
23: 6(float)
I
Mul 21 22
23: 6(float)
F
Mul 21 22
24: 6(float) FAdd 20 23
ReturnValue 24
FunctionEnd
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