SPV: Implement new extensions GL_KHX_device_group and GL_KHX_multiview.
These correspond to SPV_KHR_device_group and SPV_KHR_multiview. Also, bring tests up to date with Khronos internals, and some misc. related changes.
This commit is contained in:
parent
4a57dced66
commit
6c8aaacd28
18 changed files with 252 additions and 26 deletions
|
|
@ -85,6 +85,8 @@ TBuiltIns::TBuiltIns()
|
|||
prefixes[EbtFloat] = "";
|
||||
prefixes[EbtInt] = "i";
|
||||
prefixes[EbtUint] = "u";
|
||||
prefixes[EbtInt64] = "i64";
|
||||
prefixes[EbtUint64] = "u64";
|
||||
postfixes[2] = "2";
|
||||
postfixes[3] = "3";
|
||||
postfixes[4] = "4";
|
||||
|
|
@ -103,6 +105,7 @@ TBuiltIns::~TBuiltIns()
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Add all context-independent built-in functions and variables that are present
|
||||
// for the given version and profile. Share common ones across stages, otherwise
|
||||
|
|
@ -3698,6 +3701,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||
"\n");
|
||||
}
|
||||
|
||||
if (profile != EEsProfile) {
|
||||
commonBuiltins.append("uniform int gl_ViewIndexKHR;");
|
||||
commonBuiltins.append("uniform int gl_DeviceIndexKHR;"); // GL_KHX_device_group
|
||||
}
|
||||
|
||||
// printf("%s\n", commonBuiltins.c_str());
|
||||
// printf("%s\n", stageBuiltins[EShLangFragment].c_str());
|
||||
}
|
||||
|
|
@ -5308,6 +5316,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
|||
symbolTable.setFunctionExtensions("imageAtomicExchange", 1, &E_GL_OES_shader_image_atomic);
|
||||
symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic);
|
||||
}
|
||||
|
||||
if (profile != EEsProfile) {
|
||||
symbolTable.setFunctionExtensions("gl_DeviceIndexKHR", 1, &E_GL_KHX_device_group);
|
||||
BuiltInVariable("gl_DeviceIndexKHR", EbvDeviceIndex, symbolTable);
|
||||
symbolTable.setFunctionExtensions("gl_ViewIndexKHR", 1, &E_GL_KHX_multiview);
|
||||
BuiltInVariable("gl_ViewIndexKHR", EbvViewIndex, symbolTable);
|
||||
}
|
||||
break;
|
||||
|
||||
case EShLangCompute:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue