GLSL/HLSL: Disallow VariablePointers capability outright.
Cannot be supported, error out early.
This commit is contained in:
parent
6d10da0224
commit
dc940846d7
@ -4,9 +4,9 @@
|
||||
; Bound: 31
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability VariablePointers
|
||||
;OpCapability VariablePointers
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
OpExtension "SPV_KHR_variable_pointers"
|
||||
;OpExtension "SPV_KHR_variable_pointers"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %22 "main" %gl_WorkGroupID
|
||||
OpSource OpenCL_C 120
|
@ -4,9 +4,9 @@
|
||||
; Bound: 31
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability VariablePointers
|
||||
;OpCapability VariablePointers
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
OpExtension "SPV_KHR_variable_pointers"
|
||||
;OpExtension "SPV_KHR_variable_pointers"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %22 "main" %gl_WorkGroupID
|
||||
OpSource OpenCL_C 120
|
@ -502,6 +502,10 @@ void CompilerGLSL::find_static_extensions()
|
||||
}
|
||||
break;
|
||||
|
||||
case CapabilityVariablePointers:
|
||||
case CapabilityVariablePointersStorageBuffer:
|
||||
SPIRV_CROSS_THROW("VariablePointers capability is not supported in GLSL.");
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -5616,6 +5616,12 @@ void CompilerHLSL::validate_shader_model()
|
||||
if (hlsl_options.shader_model < 51)
|
||||
SPIRV_CROSS_THROW(
|
||||
"Shader model 5.1 or higher is required to use bindless resources or NonUniformResourceIndex.");
|
||||
break;
|
||||
|
||||
case CapabilityVariablePointers:
|
||||
case CapabilityVariablePointersStorageBuffer:
|
||||
SPIRV_CROSS_THROW("VariablePointers capability is not supported in HLSL.");
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user