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
3ae0f583
Commit
3ae0f583
authored
Sep 26, 2018
by
Sahil Parmar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes based on feedback
parent
95e2d4ec
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
7 deletions
+69
-7
spv.320.meshShaderUserDefined.mesh.out
Test/baseResults/spv.320.meshShaderUserDefined.mesh.out
+0
-0
spv.meshShaderUserDefined.mesh.out
Test/baseResults/spv.meshShaderUserDefined.mesh.out
+0
-0
spv.320.meshShaderUserDefined.mesh
Test/spv.320.meshShaderUserDefined.mesh
+59
-0
spv.meshShaderUserDefined.mesh
Test/spv.meshShaderUserDefined.mesh
+3
-3
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+1
-0
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+4
-2
parseVersions.h
glslang/MachineIndependent/parseVersions.h
+1
-1
Pp.cpp
glslang/MachineIndependent/preprocessor/Pp.cpp
+1
-1
No files found.
Test/baseResults/spv.320.meshShaderUserDefined.mesh.out
0 → 100644
View file @
3ae0f583
This diff is collapsed.
Click to expand it.
Test/baseResults/spv.meshShaderUserDefined.mesh.out
View file @
3ae0f583
This diff is collapsed.
Click to expand it.
Test/spv.320.meshShaderUserDefined.mesh
0 → 100644
View file @
3ae0f583
#version 320 es
#define MAX_VER 81
#define MAX_PRIM 32
#define BARRIER() \
memoryBarrierShared(); \
barrier();
#extension GL_NV_mesh_shader : enable
layout(local_size_x = 32) in;
layout(max_vertices=MAX_VER) out;
layout(max_primitives=MAX_PRIM) out;
layout(triangles) out;
// test use of user defined interface out blocks:
// per-primitive block
perprimitiveNV layout(location=0) out myblock {
float f;
float fArr[4];
vec3 pos;
vec4 posArr[4];
mat4 m;
mat3 mArr[2];
} blk[];
// per-vertex block
layout(location=20) out myblock2 {
float f;
vec4 pos;
mat4 m;
} blk2[];
void main()
{
int iid = int(gl_LocalInvocationID.x);
int gid = int(gl_WorkGroupID.x);
blk[iid].f = 11.0;
blk[iid+1].fArr[gid] = blk[iid].f;
blk[iid/2].pos.yzx = vec3(14.0, 15.0, 13.0);
blk[iid*2].posArr[1].yzw = blk[iid/2].pos;
blk[iid/4].m[2].wzyx = vec4(13.0, 14.0, 15.0, 16.0);
blk[iid].mArr[0][1][1] = blk[iid/4].m[2].w;
blk[iid*4].mArr[1][gid] = vec3(17.0, 18.0, 19.0);
BARRIER();
blk2[iid].f = blk2[iid-1].f + 20.0;
blk2[iid].pos = vec4(21.0, 22.0, 23.0, 24.0);
blk2[iid+1].m[gid] = blk2[iid].pos;
blk2[iid+1].m[gid][2] = 29.0;
blk2[iid+2].m[3] = blk2[iid+1].m[gid];
BARRIER();
}
Test/spv.meshShaderUserDefined.mesh
View file @
3ae0f583
#version
320 es
#version
450
#define MAX_VER 81
#define MAX_VER 81
#define MAX_PRIM 32
#define MAX_PRIM 32
...
@@ -36,8 +36,8 @@ layout(location=20) out myblock2 {
...
@@ -36,8 +36,8 @@ layout(location=20) out myblock2 {
void main()
void main()
{
{
int iid = int(gl_LocalInvocationID.x)
;
uint iid = gl_LocalInvocationID.x
;
int gid = int(gl_WorkGroupID.x)
;
uint gid = gl_WorkGroupID.x
;
blk[iid].f = 11.0;
blk[iid].f = 11.0;
blk[iid+1].fArr[gid] = blk[iid].f;
blk[iid+1].fArr[gid] = blk[iid].f;
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
3ae0f583
...
@@ -3606,6 +3606,7 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
...
@@ -3606,6 +3606,7 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua
if
((
profile
==
EEsProfile
&&
version
>=
320
)
||
if
((
profile
==
EEsProfile
&&
version
>=
320
)
||
extensionTurnedOn
(
E_GL_NV_mesh_shader
))
extensionTurnedOn
(
E_GL_NV_mesh_shader
))
return
;
return
;
break
;
#endif
#endif
default
:
default
:
break
;
break
;
...
...
glslang/MachineIndependent/Versions.cpp
View file @
3ae0f583
...
@@ -835,8 +835,8 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
...
@@ -835,8 +835,8 @@ void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBe
}
}
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
//
Validate if extension name
is used with correct shader stage.
//
Check if extension
is used with correct shader stage.
bool
TParseVersions
::
validateExtensionName
(
const
TSourceLoc
&
loc
,
const
char
*
const
extension
)
bool
TParseVersions
::
checkShaderStageForNVExtensions
(
const
TSourceLoc
&
loc
,
const
char
*
const
extension
)
{
{
int
lNumErrors
=
getNumErrors
();
int
lNumErrors
=
getNumErrors
();
...
@@ -845,6 +845,8 @@ bool TParseVersions::validateExtensionName(const TSourceLoc& loc, const char * c
...
@@ -845,6 +845,8 @@ bool TParseVersions::validateExtensionName(const TSourceLoc& loc, const char * c
requireStage
(
loc
,
(
EShLanguageMask
)(
EShLangTaskNVMask
|
EShLangMeshNVMask
),
requireStage
(
loc
,
(
EShLanguageMask
)(
EShLangTaskNVMask
|
EShLangMeshNVMask
),
"#extension GL_NV_mesh_shader"
);
"#extension GL_NV_mesh_shader"
);
// TODO: need to add error checks for other nvidia turing extensions
if
(
getNumErrors
()
>
lNumErrors
)
if
(
getNumErrors
()
>
lNumErrors
)
return
false
;
return
false
;
return
true
;
return
true
;
...
...
glslang/MachineIndependent/parseVersions.h
View file @
3ae0f583
...
@@ -104,7 +104,7 @@ public:
...
@@ -104,7 +104,7 @@ public:
virtual
bool
checkExtensionsRequested
(
const
TSourceLoc
&
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
);
virtual
bool
checkExtensionsRequested
(
const
TSourceLoc
&
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
);
virtual
void
updateExtensionBehavior
(
const
char
*
const
extension
,
TExtensionBehavior
);
virtual
void
updateExtensionBehavior
(
const
char
*
const
extension
,
TExtensionBehavior
);
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
virtual
bool
validateExtensionName
(
const
TSourceLoc
&
,
const
char
*
const
extension
);
virtual
bool
checkShaderStageForNVExtensions
(
const
TSourceLoc
&
,
const
char
*
const
extension
);
#endif
#endif
virtual
void
C_DECL
error
(
const
TSourceLoc
&
,
const
char
*
szReason
,
const
char
*
szToken
,
virtual
void
C_DECL
error
(
const
TSourceLoc
&
,
const
char
*
szReason
,
const
char
*
szToken
,
...
...
glslang/MachineIndependent/preprocessor/Pp.cpp
View file @
3ae0f583
...
@@ -875,7 +875,7 @@ int TPpContext::CPPextension(TPpToken* ppToken)
...
@@ -875,7 +875,7 @@ int TPpContext::CPPextension(TPpToken* ppToken)
}
}
#ifdef NV_EXTENSIONS
#ifdef NV_EXTENSIONS
if
(
!
parseContext
.
validateExtensionName
(
ppToken
->
loc
,
extensionName
))
if
(
!
parseContext
.
checkShaderStageForNVExtensions
(
ppToken
->
loc
,
extensionName
))
return
token
;
return
token
;
#endif
#endif
...
...
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