summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-04-26 09:29:19 -0700
committerPaul Berry <[email protected]>2012-05-10 10:30:00 -0700
commit20b153b9ca5e57aa0e20e992347ece56388e71e4 (patch)
tree743cec1c14df72e65da5936733e9ff345dd608e6 /src/mesa
parentf28a7d0e77ffbeb2a27bda132d4334b3649be3a2 (diff)
i965/hiz: Make void pointer type casts explicit
Previous to this patch, gen6_hiz.c contained two implicit type casts from void * to a a non-void pointer type. This is allowed in C but not in C++. This patch makes the type casts explicit, so that gen6_hiz.c can be converted into a C++ file. Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_hiz.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_hiz.c b/src/mesa/drivers/dri/i965/gen6_hiz.c
index 67d6bdb7ea9..536bd7ed626 100644
--- a/src/mesa/drivers/dri/i965/gen6_hiz.c
+++ b/src/mesa/drivers/dri/i965/gen6_hiz.c
@@ -177,8 +177,9 @@ gen6_hiz_emit_vertices(struct brw_context *brw,
/* v2 */ 0, 0, 0, 0, 0, 0, 0, 1,
};
- vertex_data = brw_state_batch(brw, AUB_TRACE_NO_TYPE,
- GEN6_HIZ_VBO_SIZE, 32, &vertex_offset);
+ vertex_data = (float *) brw_state_batch(brw, AUB_TRACE_NO_TYPE,
+ GEN6_HIZ_VBO_SIZE, 32,
+ &vertex_offset);
memcpy(vertex_data, vertices, GEN6_HIZ_VBO_SIZE);
}
@@ -622,9 +623,10 @@ gen6_hiz_emit_depth_stencil_state(struct brw_context *brw,
uint32_t *out_offset)
{
struct gen6_depth_stencil_state *state;
- state = brw_state_batch(brw, AUB_TRACE_DEPTH_STENCIL_STATE,
- sizeof(*state), 64,
- out_offset);
+ state = (struct gen6_depth_stencil_state *)
+ brw_state_batch(brw, AUB_TRACE_DEPTH_STENCIL_STATE,
+ sizeof(*state), 64,
+ out_offset);
memset(state, 0, sizeof(*state));
/* See the following sections of the Sandy Bridge PRM, Volume 1, Part2: