From: Christian Gmeiner Date: Sat, 19 Oct 2019 17:12:53 +0000 (+0200) Subject: etnaviv: handle integer case for GENERIC_ATTRIB_SCALE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1dfe6a3e9ae461d81c96da256a0017f02252f1ae;p=mesa.git etnaviv: handle integer case for GENERIC_ATTRIB_SCALE Reviewed-by: Jonathan Marek Signed-off-by: Christian Gmeiner --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c index f5f5993abc5..0fde8e76fa8 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_state.c +++ b/src/gallium/drivers/etnaviv/etnaviv_state.c @@ -597,7 +597,11 @@ etna_vertex_elements_state_create(struct pipe_context *pctx, COND(nonconsecutive, VIVS_NFE_GENERIC_ATTRIB_CONFIG1_NONCONSECUTIVE) | VIVS_NFE_GENERIC_ATTRIB_CONFIG1_END(end_offset - start_offset); } - cs->NFE_GENERIC_ATTRIB_SCALE[idx] = 0x3f800000; /* 1 for integer, 1.0 for float */ + + if (util_format_is_pure_integer(elements[idx].src_format)) + cs->NFE_GENERIC_ATTRIB_SCALE[idx] = 1; + else + cs->NFE_GENERIC_ATTRIB_SCALE[idx] = fui(1.0f); } return cs;