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
e383c5f5
Unverified
Commit
e383c5f5
authored
Jul 15, 2019
by
John Kessenich
Committed by
GitHub
Jul 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1837 from KhronosGroup/fix-NV_compute_shader_derivatives
ESSL: Fix #1823: Conditions for when derivatives are in compute shader.
parents
c7c52d1c
33081e01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
26 deletions
+91
-26
320.comp
Test/320.comp
+12
-0
320.comp.out
Test/baseResults/320.comp.out
+60
-6
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+19
-20
No files found.
Test/320.comp
View file @
e383c5f5
#version 320 es
float fX;
float fY;
void main()
{
dFdx(fX);
dFdy(fY);
fwidth(fX);
dFdxCoarse(fX);
dFdyCoarse(fY);
fwidthCoarse(fX);
dFdxFine(fX);
dFdyFine(fY);
fwidthFine(fX);
}
Test/baseResults/320.comp.out
View file @
e383c5f5
320.comp
ERROR: 0:8: 'dFdx' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:9: 'dFdy' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:10: 'fwidth' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:11: 'dFdxCoarse' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:12: 'dFdyCoarse' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:13: 'fwidthCoarse' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:14: 'dFdxFine' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:15: 'dFdyFine' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 0:16: 'fwidthFine' : required extension not requested: GL_NV_compute_shader_derivatives
ERROR: 9 compilation errors. No code generated.
Shader version: 320
local_size = (1, 1, 1)
0:? Sequence
0:3 Function Definition: main( ( global void)
0:3 Function Parameters:
ERROR: node is still EOpNull!
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:8 Sequence
0:8 dPdx ( global highp float)
0:8 'fX' ( global highp float)
0:9 dPdy ( global highp float)
0:9 'fY' ( global highp float)
0:10 fwidth ( global highp float)
0:10 'fX' ( global highp float)
0:11 dPdxCoarse ( global highp float)
0:11 'fX' ( global highp float)
0:12 dPdyCoarse ( global highp float)
0:12 'fY' ( global highp float)
0:13 fwidthCoarse ( global highp float)
0:13 'fX' ( global highp float)
0:14 dPdxFine ( global highp float)
0:14 'fX' ( global highp float)
0:15 dPdyFine ( global highp float)
0:15 'fY' ( global highp float)
0:16 fwidthFine ( global highp float)
0:16 'fX' ( global highp float)
0:? Linker Objects
0:? 'fX' ( global highp float)
0:? 'fY' ( global highp float)
Linked compute stage:
...
...
@@ -12,8 +45,29 @@ Linked compute stage:
Shader version: 320
local_size = (1, 1, 1)
0:? Sequence
0:3 Function Definition: main( ( global void)
0:3 Function Parameters:
ERROR: node is still EOpNull!
0:6 Function Definition: main( ( global void)
0:6 Function Parameters:
0:8 Sequence
0:8 dPdx ( global highp float)
0:8 'fX' ( global highp float)
0:9 dPdy ( global highp float)
0:9 'fY' ( global highp float)
0:10 fwidth ( global highp float)
0:10 'fX' ( global highp float)
0:11 dPdxCoarse ( global highp float)
0:11 'fX' ( global highp float)
0:12 dPdyCoarse ( global highp float)
0:12 'fY' ( global highp float)
0:13 fwidthCoarse ( global highp float)
0:13 'fX' ( global highp float)
0:14 dPdxFine ( global highp float)
0:14 'fX' ( global highp float)
0:15 dPdyFine ( global highp float)
0:15 'fY' ( global highp float)
0:16 fwidthFine ( global highp float)
0:16 'fX' ( global highp float)
0:? Linker Objects
0:? 'fX' ( global highp float)
0:? 'fY' ( global highp float)
glslang/MachineIndependent/Initialize.cpp
View file @
e383c5f5
...
...
@@ -5144,14 +5144,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
}
//E_SPV_NV_compute_shader_derivatives
stageBuiltins
[
EShLangCompute
].
append
(
derivatives
);
stageBuiltins
[
EShLangCompute
].
append
(
derivativeControls
);
stageBuiltins
[
EShLangCompute
].
append
(
"
\n
"
);
if
(
profile
==
EEsProfile
&&
version
>=
320
||
profile
!=
EEsProfile
&&
version
>=
450
)
{
stageBuiltins
[
EShLangCompute
].
append
(
derivatives
);
stageBuiltins
[
EShLangCompute
].
append
(
derivativeControls
);
stageBuiltins
[
EShLangCompute
].
append
(
"
\n
"
);
}
if
(
profile
!=
EEsProfile
&&
version
>=
450
)
{
stageBuiltins
[
EShLangCompute
].
append
(
derivativesAndControl16bits
);
stageBuiltins
[
EShLangCompute
].
append
(
derivativesAndControl64bits
);
stageBuiltins
[
EShLangCompute
].
append
(
"
\n
"
);
...
...
@@ -8443,19 +8441,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
BuiltInVariable
(
"gl_BaryCoordNV"
,
EbvBaryCoordNV
,
symbolTable
);
BuiltInVariable
(
"gl_BaryCoordNoPerspNV"
,
EbvBaryCoordNoPerspNV
,
symbolTable
);
}
if
(((
profile
!=
EEsProfile
&&
version
>=
450
)
||
(
profile
==
EEsProfile
&&
version
>=
320
))
&&
language
==
EShLangCompute
)
{
symbolTable
.
setFunctionExtensions
(
"dFdx"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdy"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidth"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdxFine"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdyFine"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidthFine"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdxCoarse"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdyCoarse"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidthCoarse"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
}
#endif
if
((
profile
!=
EEsProfile
&&
version
>=
450
)
||
...
...
@@ -8774,6 +8759,20 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable
.
setFunctionExtensions
(
"coopMatStoreNV"
,
1
,
&
E_GL_NV_cooperative_matrix
);
symbolTable
.
setFunctionExtensions
(
"coopMatMulAddNV"
,
1
,
&
E_GL_NV_cooperative_matrix
);
#ifdef NV_EXTENSIONS
if
((
profile
!=
EEsProfile
&&
version
>=
450
)
||
(
profile
==
EEsProfile
&&
version
>=
320
))
{
symbolTable
.
setFunctionExtensions
(
"dFdx"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdy"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidth"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdxFine"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdyFine"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidthFine"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdxCoarse"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"dFdyCoarse"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
symbolTable
.
setFunctionExtensions
(
"fwidthCoarse"
,
1
,
&
E_GL_NV_compute_shader_derivatives
);
}
#endif
break
;
#ifdef NV_EXTENSIONS
case
EShLangRayGenNV
:
...
...
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