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
302b46ae
Commit
302b46ae
authored
Aug 16, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GL_OES_texture_buffer.
parent
30314590
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
6 deletions
+72
-6
310.vert
Test/310.vert
+50
-0
310.vert.out
Test/baseResults/310.vert.out
+0
-0
revision.h
glslang/Include/revision.h
+1
-1
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+4
-2
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+15
-1
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+2
-2
No files found.
Test/310.vert
View file @
302b46ae
...
@@ -181,3 +181,53 @@ void pfoo()
...
@@ -181,3 +181,53 @@ void pfoo()
textureGatherOffsets
(
sArray
[
0
],
vec2
(
0
.
1
),
constOffsets
);
textureGatherOffsets
(
sArray
[
0
],
vec2
(
0
.
1
),
constOffsets
);
textureGatherOffsets
(
sArray
[
0
],
vec2
(
0
.
1
),
offsets
);
// ERROR, offset not constant
textureGatherOffsets
(
sArray
[
0
],
vec2
(
0
.
1
),
offsets
);
// ERROR, offset not constant
}
}
uniform
samplerBuffer
badSamp1
;
// ERROR, reserved
uniform
isamplerBuffer
badSamp2
;
// ERROR, reserved
uniform
usamplerBuffer
badSamp3
;
// ERROR, reserved
uniform
writeonly
imageBuffer
badSamp4
;
// ERROR, reserved
uniform
writeonly
iimageBuffer
badSamp5
;
// ERROR, reserved
uniform
writeonly
uimageBuffer
badSamp6
;
// ERROR, reserved
#extension GL_OES_texture_buffer : enable
#extension GL_EXT_texture_buffer : enable
uniform
samplerBuffer
noPreSamp1
;
// ERROR, no default precision
uniform
isamplerBuffer
noPreSamp2
;
// ERROR, no default precision
uniform
usamplerBuffer
noPreSamp3
;
// ERROR, no default precision
uniform
writeonly
imageBuffer
noPreSamp4
;
// ERROR, no default precision
uniform
writeonly
iimageBuffer
noPreSamp5
;
// ERROR, no default precision
uniform
writeonly
uimageBuffer
noPreSamp6
;
// ERROR, no default precision
precision
highp
samplerBuffer
;
precision
highp
isamplerBuffer
;
precision
highp
usamplerBuffer
;
precision
highp
imageBuffer
;
precision
highp
iimageBuffer
;
precision
highp
uimageBuffer
;
#ifdef GL_OES_texture_buffer
uniform
samplerBuffer
bufSamp1
;
uniform
isamplerBuffer
bufSamp2
;
uniform
usamplerBuffer
bufSamp3
;
#endif
#ifdef GL_EXT_texture_buffer
uniform
writeonly
imageBuffer
bufSamp4
;
uniform
writeonly
iimageBuffer
bufSamp5
;
uniform
writeonly
uimageBuffer
bufSamp6
;
#endif
void
bufferT
()
{
highp
int
s1
=
textureSize
(
bufSamp1
);
highp
int
s2
=
textureSize
(
bufSamp2
);
highp
int
s3
=
textureSize
(
bufSamp3
);
highp
int
s4
=
imageSize
(
bufSamp4
);
highp
int
s5
=
imageSize
(
bufSamp5
);
highp
int
s6
=
imageSize
(
bufSamp6
);
highp
vec4
f1
=
texelFetch
(
bufSamp1
,
s1
);
highp
ivec4
f2
=
texelFetch
(
bufSamp2
,
s2
);
highp
uvec4
f3
=
texelFetch
(
bufSamp3
,
s3
);
}
Test/baseResults/310.vert.out
View file @
302b46ae
This diff is collapsed.
Click to expand it.
glslang/Include/revision.h
View file @
302b46ae
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "2.3.71
5
"
#define GLSLANG_REVISION "2.3.71
6
"
#define GLSLANG_DATE "16-Aug-2015"
#define GLSLANG_DATE "16-Aug-2015"
glslang/MachineIndependent/Initialize.cpp
View file @
302b46ae
...
@@ -1827,6 +1827,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
...
@@ -1827,6 +1827,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
//
//
TBasicType
bTypes
[
3
]
=
{
EbtFloat
,
EbtInt
,
EbtUint
};
TBasicType
bTypes
[
3
]
=
{
EbtFloat
,
EbtInt
,
EbtUint
};
bool
skipBuffer
=
(
profile
==
EEsProfile
&&
version
<
310
)
||
(
profile
!=
EEsProfile
&&
version
<
140
);
bool
skipCubeArrayed
=
(
profile
==
EEsProfile
||
version
<
130
);
// enumerate all the types
// enumerate all the types
for
(
int
image
=
0
;
image
<=
1
;
++
image
)
{
// loop over "bool" image vs sampler
for
(
int
image
=
0
;
image
<=
1
;
++
image
)
{
// loop over "bool" image vs sampler
...
@@ -1854,9 +1856,9 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
...
@@ -1854,9 +1856,9 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile)
continue
;
continue
;
if
(
dim
==
Esd3D
&&
shadow
)
if
(
dim
==
Esd3D
&&
shadow
)
continue
;
continue
;
if
(
dim
==
EsdCube
&&
arrayed
&&
(
profile
==
EEsProfile
||
version
<
130
)
)
if
(
dim
==
EsdCube
&&
arrayed
&&
skipCubeArrayed
)
continue
;
continue
;
if
(
dim
==
EsdBuffer
&&
(
profile
==
EEsProfile
||
version
<
140
)
)
if
(
dim
==
EsdBuffer
&&
skipBuffer
)
continue
;
continue
;
if
(
dim
==
EsdBuffer
&&
(
shadow
||
arrayed
||
ms
))
if
(
dim
==
EsdBuffer
&&
(
shadow
||
arrayed
||
ms
))
continue
;
continue
;
...
...
glslang/MachineIndependent/Scan.cpp
View file @
302b46ae
...
@@ -781,9 +781,13 @@ int TScanContext::tokenizeIdentifier()
...
@@ -781,9 +781,13 @@ int TScanContext::tokenizeIdentifier()
case
IMAGE2DRECT
:
case
IMAGE2DRECT
:
case
IIMAGE2DRECT
:
case
IIMAGE2DRECT
:
case
UIMAGE2DRECT
:
case
UIMAGE2DRECT
:
return
firstGenerationImage
(
false
);
case
IMAGEBUFFER
:
case
IMAGEBUFFER
:
case
IIMAGEBUFFER
:
case
IIMAGEBUFFER
:
case
UIMAGEBUFFER
:
case
UIMAGEBUFFER
:
if
(
parseContext
.
extensionsTurnedOn
(
Num_AEP_texture_buffer
,
AEP_texture_buffer
))
return
keyword
;
return
firstGenerationImage
(
false
);
return
firstGenerationImage
(
false
);
case
IMAGE2D
:
case
IMAGE2D
:
...
@@ -834,7 +838,6 @@ int TScanContext::tokenizeIdentifier()
...
@@ -834,7 +838,6 @@ int TScanContext::tokenizeIdentifier()
case
SAMPLER1DARRAYSHADOW
:
case
SAMPLER1DARRAYSHADOW
:
case
USAMPLER1D
:
case
USAMPLER1D
:
case
USAMPLER1DARRAY
:
case
USAMPLER1DARRAY
:
case
SAMPLERBUFFER
:
afterType
=
true
;
afterType
=
true
;
return
es30ReservedFromGLSL
(
130
);
return
es30ReservedFromGLSL
(
130
);
...
@@ -858,9 +861,20 @@ int TScanContext::tokenizeIdentifier()
...
@@ -858,9 +861,20 @@ int TScanContext::tokenizeIdentifier()
case
ISAMPLER2DRECT
:
case
ISAMPLER2DRECT
:
case
USAMPLER2DRECT
:
case
USAMPLER2DRECT
:
afterType
=
true
;
return
es30ReservedFromGLSL
(
140
);
case
SAMPLERBUFFER
:
afterType
=
true
;
if
(
parseContext
.
extensionsTurnedOn
(
Num_AEP_texture_buffer
,
AEP_texture_buffer
))
return
keyword
;
return
es30ReservedFromGLSL
(
130
);
case
ISAMPLERBUFFER
:
case
ISAMPLERBUFFER
:
case
USAMPLERBUFFER
:
case
USAMPLERBUFFER
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
extensionsTurnedOn
(
Num_AEP_texture_buffer
,
AEP_texture_buffer
))
return
keyword
;
return
es30ReservedFromGLSL
(
140
);
return
es30ReservedFromGLSL
(
140
);
case
SAMPLER2DMS
:
case
SAMPLER2DMS
:
...
...
glslang/MachineIndependent/Versions.cpp
View file @
302b46ae
...
@@ -192,7 +192,7 @@ void TParseContext::initializeExtensionBehavior()
...
@@ -192,7 +192,7 @@ void TParseContext::initializeExtensionBehavior()
extensionBehavior
[
E_GL_EXT_shader_io_blocks
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_shader_io_blocks
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_tessellation_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_tessellation_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_tessellation_point_size
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_tessellation_point_size
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_texture_buffer
]
=
EBhDisable
Partial
;
extensionBehavior
[
E_GL_EXT_texture_buffer
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_texture_cube_map_array
]
=
EBhDisablePartial
;
extensionBehavior
[
E_GL_EXT_texture_cube_map_array
]
=
EBhDisablePartial
;
// OES matching AEP
// OES matching AEP
...
@@ -203,7 +203,7 @@ void TParseContext::initializeExtensionBehavior()
...
@@ -203,7 +203,7 @@ void TParseContext::initializeExtensionBehavior()
extensionBehavior
[
E_GL_OES_shader_io_blocks
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_shader_io_blocks
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_tessellation_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_tessellation_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_tessellation_point_size
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_tessellation_point_size
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_texture_buffer
]
=
EBhDisable
Partial
;
extensionBehavior
[
E_GL_OES_texture_buffer
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_texture_cube_map_array
]
=
EBhDisablePartial
;
extensionBehavior
[
E_GL_OES_texture_cube_map_array
]
=
EBhDisablePartial
;
}
}
...
...
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