mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
spirv/cfg: Be a bit more precise about function parameters
Pointers with no storage type are converted to inout variables but SSA values and pointers with a storage type (which turns into a uint or uvec2) are just input variables.
This commit is contained in:
parent
aaeda8d7d4
commit
e6ba457c99
1 changed files with 2 additions and 3 deletions
|
|
@ -55,12 +55,11 @@ vtn_cfg_handle_prepass_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||
if (func_type->params[i]->base_type == vtn_base_type_pointer &&
|
||||
func_type->params[i]->type == NULL) {
|
||||
func->params[i].type = func_type->params[i]->deref->type;
|
||||
func->params[i].param_type = nir_parameter_inout;
|
||||
} else {
|
||||
func->params[i].type = func_type->params[i]->type;
|
||||
func->params[i].param_type = nir_parameter_in;
|
||||
}
|
||||
|
||||
/* TODO: We could do something smarter here. */
|
||||
func->params[i].param_type = nir_parameter_inout;
|
||||
}
|
||||
|
||||
func->return_type = func_type->return_type->type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue