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
841db35b
Commit
841db35b
authored
Sep 02, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix issue #442, smear and truncate shape conversions for == and !=.
parent
07350f33
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
8 deletions
+80
-8
hlsl.shapeConv.frag.out
Test/baseResults/hlsl.shapeConv.frag.out
+69
-7
hlsl.shapeConv.frag
Test/hlsl.shapeConv.frag
+8
-0
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+2
-0
hlslGrammar.cpp
hlsl/hlslGrammar.cpp
+1
-1
No files found.
Test/baseResults/hlsl.shapeConv.frag.out
View file @
841db35b
...
@@ -82,8 +82,27 @@ gl_FragCoord origin is upper left
...
@@ -82,8 +82,27 @@ gl_FragCoord origin is upper left
0:19 7.000000
0:19 7.000000
0:19 7.000000
0:19 7.000000
0:19 'foo' (temp 3-component vector of float)
0:19 'foo' (temp 3-component vector of float)
0:21 Branch: Return with expression
0:21 Compare Equal (temp bool)
0:21 'input' (in 4-component vector of float)
0:21 Construct vec4 (temp 4-component vector of float)
0:21 direct index (temp float)
0:21 'v' (temp 4-component vector of float)
0:21 Constant:
0:21 0 (const int)
0:21 'v' (temp 4-component vector of float)
0:22 Compare Not Equal (temp bool)
0:22 Construct vec4 (temp 4-component vector of float)
0:22 'f' (in float)
0:22 'v' (temp 4-component vector of float)
0:26 Compare Equal (temp bool)
0:26 'f1' (temp 1-component vector of float)
0:26 Construct float (temp 1-component vector of float)
0:26 'v' (temp 4-component vector of float)
0:27 Compare Less Than (temp bool)
0:27 Construct float (temp 1-component vector of float)
0:27 'v' (temp 4-component vector of float)
0:27 'f1' (temp 1-component vector of float)
0:29 Branch: Return with expression
0:29 'input' (in 4-component vector of float)
0:? Linker Objects
0:? Linker Objects
...
@@ -173,13 +192,32 @@ gl_FragCoord origin is upper left
...
@@ -173,13 +192,32 @@ gl_FragCoord origin is upper left
0:19 7.000000
0:19 7.000000
0:19 7.000000
0:19 7.000000
0:19 'foo' (temp 3-component vector of float)
0:19 'foo' (temp 3-component vector of float)
0:21 Branch: Return with expression
0:21 Compare Equal (temp bool)
0:21 'input' (in 4-component vector of float)
0:21 Construct vec4 (temp 4-component vector of float)
0:21 direct index (temp float)
0:21 'v' (temp 4-component vector of float)
0:21 Constant:
0:21 0 (const int)
0:21 'v' (temp 4-component vector of float)
0:22 Compare Not Equal (temp bool)
0:22 Construct vec4 (temp 4-component vector of float)
0:22 'f' (in float)
0:22 'v' (temp 4-component vector of float)
0:26 Compare Equal (temp bool)
0:26 'f1' (temp 1-component vector of float)
0:26 Construct float (temp 1-component vector of float)
0:26 'v' (temp 4-component vector of float)
0:27 Compare Less Than (temp bool)
0:27 Construct float (temp 1-component vector of float)
0:27 'v' (temp 4-component vector of float)
0:27 'f1' (temp 1-component vector of float)
0:29 Branch: Return with expression
0:29 'input' (in 4-component vector of float)
0:? Linker Objects
0:? Linker Objects
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by
58
// Id's are bound by
81
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
...
@@ -196,6 +234,7 @@ gl_FragCoord origin is upper left
...
@@ -196,6 +234,7 @@ gl_FragCoord origin is upper left
Name 33 "V"
Name 33 "V"
Name 34 "MyVal"
Name 34 "MyVal"
Name 37 "foo"
Name 37 "foo"
Name 69 "f1"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -223,6 +262,9 @@ gl_FragCoord origin is upper left
...
@@ -223,6 +262,9 @@ gl_FragCoord origin is upper left
48: 22(fvec3) ConstantComposite 47 47 47
48: 22(fvec3) ConstantComposite 47 47 47
51: 6(float) Constant 1088421888
51: 6(float) Constant 1088421888
52: 22(fvec3) ConstantComposite 51 51 51
52: 22(fvec3) ConstantComposite 51 51 51
55: TypeInt 32 0
56: 55(int) Constant 0
61: TypeVector 41(bool) 4
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
FunctionEnd
FunctionEnd
...
@@ -236,6 +278,7 @@ gl_FragCoord origin is upper left
...
@@ -236,6 +278,7 @@ gl_FragCoord origin is upper left
33(V): 9(ptr) Variable Function
33(V): 9(ptr) Variable Function
34(MyVal): 23(ptr) Variable Function
34(MyVal): 23(ptr) Variable Function
37(foo): 23(ptr) Variable Function
37(foo): 23(ptr) Variable Function
69(f1): 9(ptr) Variable Function
Store 15(v) 17
Store 15(v) 17
Store 15(v) 19
Store 15(v) 19
20: 6(float) Load 12(f)
20: 6(float) Load 12(f)
...
@@ -259,6 +302,25 @@ gl_FragCoord origin is upper left
...
@@ -259,6 +302,25 @@ gl_FragCoord origin is upper left
50: 41(bool) FOrdLessThan 48 49
50: 41(bool) FOrdLessThan 48 49
53: 22(fvec3) Load 37(foo)
53: 22(fvec3) Load 37(foo)
54: 41(bool) FOrdLessThanEqual 52 53
54: 41(bool) FOrdLessThanEqual 52 53
55: 7(fvec4) Load 11(input)
57: 9(ptr) AccessChain 15(v) 56
ReturnValue 55
58: 6(float) Load 57
59: 7(fvec4) CompositeConstruct 58 58 58 58
60: 7(fvec4) Load 15(v)
62: 61(bvec4) FOrdEqual 59 60
63: 41(bool) All 62
64: 6(float) Load 12(f)
65: 7(fvec4) CompositeConstruct 64 64 64 64
66: 7(fvec4) Load 15(v)
67: 61(bvec4) FOrdNotEqual 65 66
68: 41(bool) Any 67
70: 6(float) Load 69(f1)
71: 7(fvec4) Load 15(v)
72: 6(float) CompositeExtract 71 0
73: 41(bool) FOrdEqual 70 72
74: 7(fvec4) Load 15(v)
75: 6(float) CompositeExtract 74 0
76: 6(float) Load 69(f1)
77: 41(bool) FOrdLessThan 75 76
78: 7(fvec4) Load 11(input)
ReturnValue 78
FunctionEnd
FunctionEnd
Test/hlsl.shapeConv.frag
View file @
841db35b
...
@@ -18,5 +18,13 @@ float4 PixelShaderFunction(float4 input, float f) : COLOR0
...
@@ -18,5 +18,13 @@ float4 PixelShaderFunction(float4 input, float f) : COLOR0
6
.
0
<
foo
;
6
.
0
<
foo
;
7
.
0
<=
foo
;
7
.
0
<=
foo
;
v
.
x
==
v
;
f
!=
v
;
float1
f1
;
f1
==
v
;
v
<
f1
;
return
input
;
return
input
;
}
}
glslang/MachineIndependent/Intermediate.cpp
View file @
841db35b
...
@@ -702,6 +702,8 @@ TIntermTyped* TIntermediate::addShapeConversion(TOperator op, const TType& type,
...
@@ -702,6 +702,8 @@ TIntermTyped* TIntermediate::addShapeConversion(TOperator op, const TType& type,
case
EOpGreaterThan
:
case
EOpGreaterThan
:
case
EOpLessThanEqual
:
case
EOpLessThanEqual
:
case
EOpGreaterThanEqual
:
case
EOpGreaterThanEqual
:
case
EOpEqual
:
case
EOpNotEqual
:
case
EOpFunctionCall
:
case
EOpFunctionCall
:
break
;
break
;
default
:
default
:
...
...
hlsl/hlslGrammar.cpp
View file @
841db35b
...
@@ -525,7 +525,7 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier)
...
@@ -525,7 +525,7 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier)
//
//
// layout_qualifier
// layout_qualifier
// : identifier
// : identifier
// | identifier EQUAL expresion
// | identifier EQUAL expres
s
ion
//
//
// Zero or more of these, so this can't return false.
// Zero or more of these, so this can't return false.
//
//
...
...
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