mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-06 21:28:15 +02:00
spirv: handle untyped pointer storage class with descriptor heap
It's possible with descriptor heap. Original patch by Faith Ekstrand <faith.ekstrand@collabora.com>. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40731>
This commit is contained in:
parent
1f8be7bfad
commit
98d486ea77
1 changed files with 8 additions and 11 deletions
|
|
@ -1791,19 +1791,16 @@ vtn_storage_class_to_mode(struct vtn_builder *b,
|
|||
} else if (b->shader->info.stage == MESA_SHADER_KERNEL) {
|
||||
mode = vtn_variable_mode_constant;
|
||||
nir_mode = nir_var_mem_constant;
|
||||
} else if (interface_type &&
|
||||
interface_type->base_type == vtn_base_type_accel_struct) {
|
||||
mode = vtn_variable_mode_accel_struct;
|
||||
nir_mode = nir_var_uniform;
|
||||
} else {
|
||||
/* interface_type is only NULL when OpTypeForwardPointer is used and
|
||||
* OpTypeForwardPointer cannot be used with the UniformConstant
|
||||
* storage class.
|
||||
/* OpTypeUntypedPointerKHR with UniformConstant is allowed with
|
||||
* descriptor heap.
|
||||
*/
|
||||
assert(interface_type != NULL);
|
||||
if (interface_type->base_type == vtn_base_type_accel_struct) {
|
||||
mode = vtn_variable_mode_accel_struct;
|
||||
nir_mode = nir_var_uniform;
|
||||
} else {
|
||||
mode = vtn_variable_mode_uniform;
|
||||
nir_mode = nir_var_uniform;
|
||||
}
|
||||
mode = vtn_variable_mode_uniform;
|
||||
nir_mode = nir_var_uniform;
|
||||
}
|
||||
break;
|
||||
case SpvStorageClassPushConstant:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue