mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 17:40:11 +01:00
spirv/opencl: Drop dest_type from handle_v_load_store
At that point in the function, we don't know if it's a load or a store so calling it dest_type isn't really helpful. Also, we don't really want the glsl_type; we want the base_type. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6945>
This commit is contained in:
parent
8610af12b6
commit
a85afb797e
1 changed files with 3 additions and 3 deletions
|
|
@ -623,8 +623,8 @@ _handle_v_load_store(struct vtn_builder *b, enum OpenCLstd_Entrypoints opcode,
|
||||||
type = vtn_get_value_type(b, w[5]);
|
type = vtn_get_value_type(b, w[5]);
|
||||||
unsigned a = load ? 0 : 1;
|
unsigned a = load ? 0 : 1;
|
||||||
|
|
||||||
const struct glsl_type *dest_type = type->type;
|
enum glsl_base_type base_type = glsl_get_base_type(type->type);
|
||||||
unsigned components = glsl_get_vector_elements(dest_type);
|
unsigned components = glsl_get_vector_elements(type->type);
|
||||||
|
|
||||||
nir_ssa_def *offset = vtn_get_nir_ssa(b, w[5 + a]);
|
nir_ssa_def *offset = vtn_get_nir_ssa(b, w[5 + a]);
|
||||||
struct vtn_value *p = vtn_value(b, w[6 + a], vtn_value_type_pointer);
|
struct vtn_value *p = vtn_value(b, w[6 + a], vtn_value_type_pointer);
|
||||||
|
|
@ -643,7 +643,7 @@ _handle_v_load_store(struct vtn_builder *b, enum OpenCLstd_Entrypoints opcode,
|
||||||
comps[i] = vtn_local_load(b, arr_deref, p->type->access);
|
comps[i] = vtn_local_load(b, arr_deref, p->type->access);
|
||||||
ncomps[i] = comps[i]->def;
|
ncomps[i] = comps[i]->def;
|
||||||
} else {
|
} else {
|
||||||
struct vtn_ssa_value *ssa = vtn_create_ssa_value(b, glsl_scalar_type(glsl_get_base_type(dest_type)));
|
struct vtn_ssa_value *ssa = vtn_create_ssa_value(b, glsl_scalar_type(base_type));
|
||||||
struct vtn_ssa_value *val = vtn_ssa_value(b, w[5]);
|
struct vtn_ssa_value *val = vtn_ssa_value(b, w[5]);
|
||||||
ssa->def = nir_channel(&b->nb, val->def, i);
|
ssa->def = nir_channel(&b->nb, val->def, i);
|
||||||
vtn_local_store(b, ssa, arr_deref, p->type->access);
|
vtn_local_store(b, ssa, arr_deref, p->type->access);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue