From 1dfe6a3e9ae461d81c96da256a0017f02252f1ae Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sat, 19 Oct 2019 19:12:53 +0200 Subject: [PATCH] etnaviv: handle integer case for GENERIC_ATTRIB_SCALE Reviewed-by: Jonathan Marek Signed-off-by: Christian Gmeiner --- src/gallium/drivers/etnaviv/etnaviv_state.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.30.2