Handle GL_ARB_derivative_control
This commit is contained in:
Родитель
9fadd34afe
Коммит
cb637db5d6
|
@ -5041,18 +5041,42 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
|
||||||
|
|
||||||
case OpDPdxFine:
|
case OpDPdxFine:
|
||||||
UFOP(dFdxFine);
|
UFOP(dFdxFine);
|
||||||
|
if (options.es)
|
||||||
|
{
|
||||||
|
SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES.");
|
||||||
|
}
|
||||||
|
if (options.version < 450)
|
||||||
|
require_extension("GL_ARB_derivative_control");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OpDPdyFine:
|
case OpDPdyFine:
|
||||||
UFOP(dFdyFine);
|
UFOP(dFdyFine);
|
||||||
|
if (options.es)
|
||||||
|
{
|
||||||
|
SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES.");
|
||||||
|
}
|
||||||
|
if (options.version < 450)
|
||||||
|
require_extension("GL_ARB_derivative_control");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OpDPdxCoarse:
|
case OpDPdxCoarse:
|
||||||
|
if (options.es)
|
||||||
|
{
|
||||||
|
SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES.");
|
||||||
|
}
|
||||||
UFOP(dFdxCoarse);
|
UFOP(dFdxCoarse);
|
||||||
|
if (options.version < 450)
|
||||||
|
require_extension("GL_ARB_derivative_control");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OpDPdyCoarse:
|
case OpDPdyCoarse:
|
||||||
UFOP(dFdyCoarse);
|
UFOP(dFdyCoarse);
|
||||||
|
if (options.es)
|
||||||
|
{
|
||||||
|
SPIRV_CROSS_THROW("GL_ARB_derivative_control is unavailable in OpenGL ES.");
|
||||||
|
}
|
||||||
|
if (options.version < 450)
|
||||||
|
require_extension("GL_ARB_derivative_control");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OpFwidth:
|
case OpFwidth:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче