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
7b3096a9
Commit
7b3096a9
authored
May 09, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #270 from scyganINTEL/bitfield_buildins
Use proper precision qualifiers for bitfield build-in functions on ES
parents
dc4c9a70
9c56d84b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
38 deletions
+102
-38
310.vert.out
Test/baseResults/310.vert.out
+8
-8
spv.intOps.vert.out
Test/baseResults/spv.intOps.vert.out
+4
-0
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+90
-30
No files found.
Test/baseResults/310.vert.out
View file @
7b3096a9
...
@@ -179,11 +179,11 @@ ERROR: node is still EOpNull!
...
@@ -179,11 +179,11 @@ ERROR: node is still EOpNull!
0:31 'u4' (temp highp 4-component vector of uint)
0:31 'u4' (temp highp 4-component vector of uint)
0:32 move second child to first child (temp highp int)
0:32 move second child to first child (temp highp int)
0:32 'i1' (temp highp int)
0:32 'i1' (temp highp int)
0:32 bitCount (global
high
p int)
0:32 bitCount (global
low
p int)
0:32 'i1' (temp highp int)
0:32 'i1' (temp highp int)
0:33 move second child to first child (temp highp 3-component vector of int)
0:33 move second child to first child (temp highp 3-component vector of int)
0:33 'i3' (temp highp 3-component vector of int)
0:33 'i3' (temp highp 3-component vector of int)
0:33 bitCount (global
high
p 3-component vector of int)
0:33 bitCount (global
low
p 3-component vector of int)
0:33 'u3' (temp highp 3-component vector of uint)
0:33 'u3' (temp highp 3-component vector of uint)
0:34 move second child to first child (temp highp 2-component vector of int)
0:34 move second child to first child (temp highp 2-component vector of int)
0:34 'i2' (temp highp 2-component vector of int)
0:34 'i2' (temp highp 2-component vector of int)
...
@@ -195,11 +195,11 @@ ERROR: node is still EOpNull!
...
@@ -195,11 +195,11 @@ ERROR: node is still EOpNull!
0:35 'u4' (temp highp 4-component vector of uint)
0:35 'u4' (temp highp 4-component vector of uint)
0:36 move second child to first child (temp highp int)
0:36 move second child to first child (temp highp int)
0:36 'i1' (temp highp int)
0:36 'i1' (temp highp int)
0:36 findMSB (global
high
p int)
0:36 findMSB (global
low
p int)
0:36 'i1' (temp highp int)
0:36 'i1' (temp highp int)
0:37 move second child to first child (temp highp 2-component vector of int)
0:37 move second child to first child (temp highp 2-component vector of int)
0:37 'i2' (temp highp 2-component vector of int)
0:37 'i2' (temp highp 2-component vector of int)
0:37 findMSB (global
high
p 2-component vector of int)
0:37 findMSB (global
low
p 2-component vector of int)
0:37 'u2' (temp highp 2-component vector of uint)
0:37 'u2' (temp highp 2-component vector of uint)
0:40 move second child to first child (temp highp 3-component vector of float)
0:40 move second child to first child (temp highp 3-component vector of float)
0:40 'v3' (temp highp 3-component vector of float)
0:40 'v3' (temp highp 3-component vector of float)
...
@@ -1110,11 +1110,11 @@ ERROR: node is still EOpNull!
...
@@ -1110,11 +1110,11 @@ ERROR: node is still EOpNull!
0:31 'u4' (temp highp 4-component vector of uint)
0:31 'u4' (temp highp 4-component vector of uint)
0:32 move second child to first child (temp highp int)
0:32 move second child to first child (temp highp int)
0:32 'i1' (temp highp int)
0:32 'i1' (temp highp int)
0:32 bitCount (global
high
p int)
0:32 bitCount (global
low
p int)
0:32 'i1' (temp highp int)
0:32 'i1' (temp highp int)
0:33 move second child to first child (temp highp 3-component vector of int)
0:33 move second child to first child (temp highp 3-component vector of int)
0:33 'i3' (temp highp 3-component vector of int)
0:33 'i3' (temp highp 3-component vector of int)
0:33 bitCount (global
high
p 3-component vector of int)
0:33 bitCount (global
low
p 3-component vector of int)
0:33 'u3' (temp highp 3-component vector of uint)
0:33 'u3' (temp highp 3-component vector of uint)
0:34 move second child to first child (temp highp 2-component vector of int)
0:34 move second child to first child (temp highp 2-component vector of int)
0:34 'i2' (temp highp 2-component vector of int)
0:34 'i2' (temp highp 2-component vector of int)
...
@@ -1126,11 +1126,11 @@ ERROR: node is still EOpNull!
...
@@ -1126,11 +1126,11 @@ ERROR: node is still EOpNull!
0:35 'u4' (temp highp 4-component vector of uint)
0:35 'u4' (temp highp 4-component vector of uint)
0:36 move second child to first child (temp highp int)
0:36 move second child to first child (temp highp int)
0:36 'i1' (temp highp int)
0:36 'i1' (temp highp int)
0:36 findMSB (global
high
p int)
0:36 findMSB (global
low
p int)
0:36 'i1' (temp highp int)
0:36 'i1' (temp highp int)
0:37 move second child to first child (temp highp 2-component vector of int)
0:37 move second child to first child (temp highp 2-component vector of int)
0:37 'i2' (temp highp 2-component vector of int)
0:37 'i2' (temp highp 2-component vector of int)
0:37 findMSB (global
high
p 2-component vector of int)
0:37 findMSB (global
low
p 2-component vector of int)
0:37 'u2' (temp highp 2-component vector of uint)
0:37 'u2' (temp highp 2-component vector of uint)
0:40 move second child to first child (temp highp 3-component vector of float)
0:40 move second child to first child (temp highp 3-component vector of float)
0:40 'v3' (temp highp 3-component vector of float)
0:40 'v3' (temp highp 3-component vector of float)
...
...
Test/baseResults/spv.intOps.vert.out
View file @
7b3096a9
...
@@ -44,8 +44,12 @@ Linked vertex stage:
...
@@ -44,8 +44,12 @@ Linked vertex stage:
Name 173 "u3"
Name 173 "u3"
Name 182 "i3"
Name 182 "i3"
Name 247 "v4"
Name 247 "v4"
Decorate 210 RelaxedPrecision
Decorate 216 RelaxedPrecision
Decorate 223 RelaxedPrecision
Decorate 223 RelaxedPrecision
Decorate 230 RelaxedPrecision
Decorate 230 RelaxedPrecision
Decorate 234 RelaxedPrecision
Decorate 240 RelaxedPrecision
Decorate 261 RelaxedPrecision
Decorate 261 RelaxedPrecision
Decorate 265 RelaxedPrecision
Decorate 265 RelaxedPrecision
2: TypeVoid
2: TypeVoid
...
...
glslang/MachineIndependent/Initialize.cpp
View file @
7b3096a9
...
@@ -1242,26 +1242,6 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
...
@@ -1242,26 +1242,6 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
if
((
profile
==
EEsProfile
&&
version
>=
310
)
||
if
((
profile
==
EEsProfile
&&
version
>=
310
)
||
(
profile
!=
EEsProfile
&&
version
>=
400
))
{
(
profile
!=
EEsProfile
&&
version
>=
400
))
{
commonBuiltins
.
append
(
commonBuiltins
.
append
(
"highp uint uaddCarry( uint, uint, out uint carry);"
"highp uvec2 uaddCarry(uvec2, uvec2, out uvec2 carry);"
"highp uvec3 uaddCarry(uvec3, uvec3, out uvec3 carry);"
"highp uvec4 uaddCarry(uvec4, uvec4, out uvec4 carry);"
"highp uint usubBorrow( uint, uint, out uint borrow);"
"highp uvec2 usubBorrow(uvec2, uvec2, out uvec2 borrow);"
"highp uvec3 usubBorrow(uvec3, uvec3, out uvec3 borrow);"
"highp uvec4 usubBorrow(uvec4, uvec4, out uvec4 borrow);"
"void umulExtended( uint, uint, out uint, out uint lsb);"
"void umulExtended(uvec2, uvec2, out uvec2, out uvec2 lsb);"
"void umulExtended(uvec3, uvec3, out uvec3, out uvec3 lsb);"
"void umulExtended(uvec4, uvec4, out uvec4, out uvec4 lsb);"
"void imulExtended( int, int, out int, out int lsb);"
"void imulExtended(ivec2, ivec2, out ivec2, out ivec2 lsb);"
"void imulExtended(ivec3, ivec3, out ivec3, out ivec3 lsb);"
"void imulExtended(ivec4, ivec4, out ivec4, out ivec4 lsb);"
" int bitfieldExtract( int, int, int);"
" int bitfieldExtract( int, int, int);"
"ivec2 bitfieldExtract(ivec2, int, int);"
"ivec2 bitfieldExtract(ivec2, int, int);"
"ivec3 bitfieldExtract(ivec3, int, int);"
"ivec3 bitfieldExtract(ivec3, int, int);"
...
@@ -1282,6 +1262,41 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
...
@@ -1282,6 +1262,41 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
"uvec3 bitfieldInsert(uvec3 base, uvec3, int, int);"
"uvec3 bitfieldInsert(uvec3 base, uvec3, int, int);"
"uvec4 bitfieldInsert(uvec4 base, uvec4, int, int);"
"uvec4 bitfieldInsert(uvec4 base, uvec4, int, int);"
"lowp int findLSB( int);"
"lowp ivec2 findLSB(ivec2);"
"lowp ivec3 findLSB(ivec3);"
"lowp ivec4 findLSB(ivec4);"
"lowp int findLSB( uint);"
"lowp ivec2 findLSB(uvec2);"
"lowp ivec3 findLSB(uvec3);"
"lowp ivec4 findLSB(uvec4);"
"
\n
"
);
}
if
(
profile
!=
EEsProfile
&&
version
>=
400
)
{
commonBuiltins
.
append
(
" uint uaddCarry( uint, uint, out uint carry);"
"uvec2 uaddCarry(uvec2, uvec2, out uvec2 carry);"
"uvec3 uaddCarry(uvec3, uvec3, out uvec3 carry);"
"uvec4 uaddCarry(uvec4, uvec4, out uvec4 carry);"
" uint usubBorrow( uint, uint, out uint borrow);"
"uvec2 usubBorrow(uvec2, uvec2, out uvec2 borrow);"
"uvec3 usubBorrow(uvec3, uvec3, out uvec3 borrow);"
"uvec4 usubBorrow(uvec4, uvec4, out uvec4 borrow);"
"void umulExtended( uint, uint, out uint, out uint lsb);"
"void umulExtended(uvec2, uvec2, out uvec2, out uvec2 lsb);"
"void umulExtended(uvec3, uvec3, out uvec3, out uvec3 lsb);"
"void umulExtended(uvec4, uvec4, out uvec4, out uvec4 lsb);"
"void imulExtended( int, int, out int, out int lsb);"
"void imulExtended(ivec2, ivec2, out ivec2, out ivec2 lsb);"
"void imulExtended(ivec3, ivec3, out ivec3, out ivec3 lsb);"
"void imulExtended(ivec4, ivec4, out ivec4, out ivec4 lsb);"
" int bitfieldReverse( int);"
" int bitfieldReverse( int);"
"ivec2 bitfieldReverse(ivec2);"
"ivec2 bitfieldReverse(ivec2);"
"ivec3 bitfieldReverse(ivec3);"
"ivec3 bitfieldReverse(ivec3);"
...
@@ -1302,16 +1317,6 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
...
@@ -1302,16 +1317,6 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
"ivec3 bitCount(uvec3);"
"ivec3 bitCount(uvec3);"
"ivec4 bitCount(uvec4);"
"ivec4 bitCount(uvec4);"
"lowp int findLSB( int);"
"lowp ivec2 findLSB(ivec2);"
"lowp ivec3 findLSB(ivec3);"
"lowp ivec4 findLSB(ivec4);"
"lowp int findLSB( uint);"
"lowp ivec2 findLSB(uvec2);"
"lowp ivec3 findLSB(uvec3);"
"lowp ivec4 findLSB(uvec4);"
" int findMSB( int);"
" int findMSB( int);"
"ivec2 findMSB(ivec2);"
"ivec2 findMSB(ivec2);"
"ivec3 findMSB(ivec3);"
"ivec3 findMSB(ivec3);"
...
@@ -1325,6 +1330,61 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
...
@@ -1325,6 +1330,61 @@ void TBuiltIns::initialize(int version, EProfile profile, int spv, int vulkan)
"
\n
"
);
"
\n
"
);
}
}
if
(
profile
==
EEsProfile
&&
version
>=
310
)
{
commonBuiltins
.
append
(
"highp uint uaddCarry(highp uint, highp uint, out lowp uint carry);"
"highp uvec2 uaddCarry(highp uvec2, highp uvec2, out lowp uvec2 carry);"
"highp uvec3 uaddCarry(highp uvec3, highp uvec3, out lowp uvec3 carry);"
"highp uvec4 uaddCarry(highp uvec4, highp uvec4, out lowp uvec4 carry);"
"highp uint usubBorrow(highp uint, highp uint, out lowp uint borrow);"
"highp uvec2 usubBorrow(highp uvec2, highp uvec2, out lowp uvec2 borrow);"
"highp uvec3 usubBorrow(highp uvec3, highp uvec3, out lowp uvec3 borrow);"
"highp uvec4 usubBorrow(highp uvec4, highp uvec4, out lowp uvec4 borrow);"
"void umulExtended(highp uint, highp uint, highp out uint, out highp uint lsb);"
"void umulExtended(highp uvec2, highp uvec2, highp out uvec2, out highp uvec2 lsb);"
"void umulExtended(highp uvec3, highp uvec3, highp out uvec3, out highp uvec3 lsb);"
"void umulExtended(highp uvec4, highp uvec4, highp out uvec4, out highp uvec4 lsb);"
"void imulExtended(highp int, highp int, highp out int, out highp int lsb);"
"void imulExtended(highp ivec2, highp ivec2, highp out ivec2, out highp ivec2 lsb);"
"void imulExtended(highp ivec3, highp ivec3, highp out ivec3, out highp ivec3 lsb);"
"void imulExtended(highp ivec4, highp ivec4, highp out ivec4, out highp ivec4 lsb);"
"highp int bitfieldReverse(highp int);"
"highp ivec2 bitfieldReverse(highp ivec2);"
"highp ivec3 bitfieldReverse(highp ivec3);"
"highp ivec4 bitfieldReverse(highp ivec4);"
"highp uint bitfieldReverse(highp uint);"
"highp uvec2 bitfieldReverse(highp uvec2);"
"highp uvec3 bitfieldReverse(highp uvec3);"
"highp uvec4 bitfieldReverse(highp uvec4);"
"lowp int bitCount( int);"
"lowp ivec2 bitCount(ivec2);"
"lowp ivec3 bitCount(ivec3);"
"lowp ivec4 bitCount(ivec4);"
"lowp int bitCount( uint);"
"lowp ivec2 bitCount(uvec2);"
"lowp ivec3 bitCount(uvec3);"
"lowp ivec4 bitCount(uvec4);"
"lowp int findMSB(highp int);"
"lowp ivec2 findMSB(highp ivec2);"
"lowp ivec3 findMSB(highp ivec3);"
"lowp ivec4 findMSB(highp ivec4);"
"lowp int findMSB(highp uint);"
"lowp ivec2 findMSB(highp uvec2);"
"lowp ivec3 findMSB(highp uvec3);"
"lowp ivec4 findMSB(highp uvec4);"
"
\n
"
);
}
// GL_ARB_shader_ballot
// GL_ARB_shader_ballot
if
(
profile
!=
EEsProfile
&&
version
>=
450
)
{
if
(
profile
!=
EEsProfile
&&
version
>=
450
)
{
commonBuiltins
.
append
(
commonBuiltins
.
append
(
...
...
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