glsl: Conditionally use fine/coarse derivatives based on device support

This commit is contained in:
ameerj 2021-06-14 23:33:26 -04:00
parent 6eea88d614
commit 3b339fbbf6
4 changed files with 29 additions and 4 deletions

View file

@ -395,6 +395,9 @@ void EmitContext::SetupExtensions() {
if (info.uses_typeless_image_reads || info.uses_typeless_image_writes) {
header += "#extension GL_EXT_shader_image_load_formatted : enable\n";
}
if (info.uses_derivatives && profile.support_gl_derivative_control) {
header += "#extension GL_ARB_derivative_control : enable\n";
}
}
void EmitContext::DefineConstantBuffers(Bindings& bindings) {