This change introduces a new protected type, `ReflectedShaderStage` to
`RenderingShaderContainer` that derived types use to access SPIR-V and
the reflected module, `SpvReflectShaderModule` allowing implementations
to use the reflection information to compile their platform-specific
module.
* Fixes memory leak in `reflect_spirv` that would not deallocate the
`SpvReflectShaderModule` if an error occurred.
* Removes unnecessary allocation when creating `SpvReflectShaderModule`
by passing `NO_COPY` flag to `spvReflectCreateShaderModule2`
constructor function.
* Replaces `VectorView` with `Span` for consistency
* Fixes unnecessary allocations in D3D12 shader container in
`_convert_spirv_to_nir` and `_convert_spirv_to_dxil` which implicitly
converted the old `VectorView` to a `Vector`
"On shader stage '"+String(SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' uses a set ("+itos(set)+") index larger than what is supported ("+itos(MAX_UNIFORM_SETS)+").");
"On shader stage '"+String(SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' trying to reuse location for set="+itos(set)+", binding="+itos(uniform.binding)+" with different uniform type.");
"On shader stage '"+String(SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' trying to reuse location for set="+itos(set)+", binding="+itos(uniform.binding)+" with different uniform size.");
"On shader stage '"+String(SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' trying to reuse location for set="+itos(set)+", binding="+itos(uniform.binding)+" with different writability.");
ERR_FAIL_COND_V_MSG(r_reflection.specialization_constants[k].type!=sconst.type,FAILED,"More than one specialization constant used for id ("+itos(sconst.constant_id)+"), but their types differ.");
ERR_FAIL_COND_V_MSG(r_reflection.specialization_constants[k].int_value!=sconst.int_value,FAILED,"More than one specialization constant used for id ("+itos(sconst.constant_id)+"), but their default values differ.");
"Reflection of SPIR-V shader stage '"+String(SHADER_STAGE_NAMES[p_spirv[i].shader_stage])+"' failed enumerating push constants.");
if(pc_count){
ERR_FAIL_COND_V_MSG(pc_count>1,FAILED,
"Reflection of SPIR-V shader stage '"+String(SHADER_STAGE_NAMES[p_spirv[i].shader_stage])+"': Only one push constant is supported, which should be the same across shader stages.");
"Reflection of SPIR-V shader stage '"+String(SHADER_STAGE_NAMES[p_spirv[i].shader_stage])+"': Push constant block must be the same across shader stages.");
"On shader stage '"+String(RDC::SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' uses a set ("+itos(set)+") index larger than what is supported ("+itos(RDC::MAX_UNIFORM_SETS)+").");
"On shader stage '"+String(RDC::SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' trying to reuse location for set="+itos(set)+", binding="+itos(uniform.binding)+" with different uniform type.");
"On shader stage '"+String(RDC::SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' trying to reuse location for set="+itos(set)+", binding="+itos(uniform.binding)+" with different uniform size.");
"On shader stage '"+String(RDC::SHADER_STAGE_NAMES[stage])+"', uniform '"+binding.name+"' trying to reuse location for set="+itos(set)+", binding="+itos(uniform.binding)+" with different writability.");
ERR_FAIL_COND_V_MSG(reflection.specialization_constants[k].type!=sconst.type,FAILED,"More than one specialization constant used for id ("+itos(sconst.constant_id)+"), but their types differ.");
ERR_FAIL_COND_V_MSG(reflection.specialization_constants[k].int_value!=sconst.int_value,FAILED,"More than one specialization constant used for id ("+itos(sconst.constant_id)+"), but their default values differ.");
"Reflection of SPIR-V shader stage '"+String(RDC::SHADER_STAGE_NAMES[p_spirv[i].shader_stage])+"' failed enumerating push constants.");
if(pc_count){
ERR_FAIL_COND_V_MSG(pc_count>1,FAILED,
"Reflection of SPIR-V shader stage '"+String(RDC::SHADER_STAGE_NAMES[p_spirv[i].shader_stage])+"': Only one push constant is supported, which should be the same across shader stages.");
"Reflection of SPIR-V shader stage '"+String(RDC::SHADER_STAGE_NAMES[p_spirv[i].shader_stage])+"': Push constant block must be the same across shader stages.");