r600/sfn: Add lowering UBO access to r600 specific codes
r600 reads vec4 from the UBO, but the offsets in nir are evaluated to the component. If the offsets are not literal then all non-vec4 reads must resolve the component after reading a vec4 component (TODO: figure out whether there is a consistent way to deduct the component that is actually read). Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225>
This commit is contained in:
@@ -531,6 +531,7 @@ validate_intrinsic_instr(nir_intrinsic_instr *instr, validate_state *state)
|
||||
|
||||
case nir_intrinsic_load_deref: {
|
||||
nir_deref_instr *src = nir_src_as_deref(instr->src[0]);
|
||||
assert(src);
|
||||
validate_assert(state, glsl_type_is_vector_or_scalar(src->type) ||
|
||||
(src->mode == nir_var_uniform &&
|
||||
glsl_get_base_type(src->type) == GLSL_TYPE_SUBROUTINE));
|
||||
@@ -545,6 +546,7 @@ validate_intrinsic_instr(nir_intrinsic_instr *instr, validate_state *state)
|
||||
|
||||
case nir_intrinsic_store_deref: {
|
||||
nir_deref_instr *dst = nir_src_as_deref(instr->src[0]);
|
||||
assert(dst);
|
||||
validate_assert(state, glsl_type_is_vector_or_scalar(dst->type));
|
||||
validate_assert(state, instr->num_components ==
|
||||
glsl_get_vector_elements(dst->type));
|
||||
|
||||
Reference in New Issue
Block a user