diff options
author | Christian Gmeiner <[email protected]> | 2019-10-19 19:12:53 +0200 |
---|---|---|
committer | Christian Gmeiner <[email protected]> | 2019-11-29 15:06:18 +0100 |
commit | 1dfe6a3e9ae461d81c96da256a0017f02252f1ae (patch) | |
tree | 19f3ec643f8256510792a140aeabab6d4b12f9c3 /src/gallium | |
parent | 5361ea2a9b5c23db702ee4b81e008c822b62e965 (diff) |
etnaviv: handle integer case for GENERIC_ATTRIB_SCALE
Reviewed-by: Jonathan Marek <[email protected]>
Signed-off-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_state.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |