[Mesa-dev] [PATCH 15/25] blorp/exec: Use uint32_t for copying varying data

Jason Ekstrand jason at jlekstrand.net
Sat Oct 22 17:50:46 UTC 2016


Some things may not be floats and intel CPUs are known for mangling bits
when a float type is used for copying integers.
---
 src/intel/blorp/blorp_genX_exec.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index 1e99349..d996c8c 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -197,8 +197,8 @@ blorp_emit_input_varying_data(struct blorp_batch *batch,
 
    *size = num_varyings * vec4_size_in_bytes;
 
-   const float *const inputs_src = (const float *)&params->wm_inputs;
-   float *inputs = blorp_alloc_vertex_buffer(batch, *size, addr);
+   const uint32_t *const inputs_src = (const uint32_t *)&params->wm_inputs;
+   uint32_t *inputs = blorp_alloc_vertex_buffer(batch, *size, addr);
 
    /* Walk over the attribute slots, determine if the attribute is used by
     * the program and when necessary copy the values from the input storage to
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list