Add support for ARB_gpu_shader_fp64

GLSL Version : >= 150

Purpose:
Allow users to use features by enabling this extension, even in low versions.

Extension Name:
ARB_gpu_shader_fp64

Builtin-variables:
Nah

Builtin-functions:
functions overloaded for this extension, please check registry in reference.

Keywords:
Double

Features:
add support for type "double"

Reference:
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gpu_shader_fp64.txt

Add support for implicit conversion

1. Remove builtin double vertex (this is introduced by vertex_attrib_64bit
2. Add extension check and implicit conversion as double has been introduced
3. Add test results.
This commit is contained in:
Chow 2019-11-26 17:27:33 +08:00
parent 6334d594f6
commit a3c7a25e10
11 changed files with 138 additions and 60 deletions

View file

@ -1751,7 +1751,7 @@ type_specifier_nonarray
}
| DOUBLE {
parseContext.doubleCheck($1.loc, "double");
parseContext.doubleCheck($1.loc, "double", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
}
@ -1811,19 +1811,19 @@ type_specifier_nonarray
$$.basicType = EbtUint64;
}
| DVEC2 {
parseContext.doubleCheck($1.loc, "double vector");
parseContext.doubleCheck($1.loc, "double vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setVector(2);
}
| DVEC3 {
parseContext.doubleCheck($1.loc, "double vector");
parseContext.doubleCheck($1.loc, "double vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setVector(3);
}
| DVEC4 {
parseContext.doubleCheck($1.loc, "double vector");
parseContext.doubleCheck($1.loc, "double vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setVector(4);
@ -2027,73 +2027,73 @@ type_specifier_nonarray
$$.setVector(4);
}
| DMAT2 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 2);
}
| DMAT3 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 3);
}
| DMAT4 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 4);
}
| DMAT2X2 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 2);
}
| DMAT2X3 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 3);
}
| DMAT2X4 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(2, 4);
}
| DMAT3X2 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 2);
}
| DMAT3X3 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 3);
}
| DMAT3X4 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(3, 4);
}
| DMAT4X2 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 2);
}
| DMAT4X3 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 3);
}
| DMAT4X4 {
parseContext.doubleCheck($1.loc, "double matrix");
parseContext.doubleCheck($1.loc, "double matrix", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtDouble;
$$.setMatrix(4, 4);