summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_state.c6
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;