diff options
author | Kenneth Graunke <[email protected]> | 2014-05-06 22:35:27 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-08-02 05:14:42 -0700 |
commit | 9a1a8cb84d940313130e2ef4e7a94079fa4092b7 (patch) | |
tree | 30e618b3d8b6790a186c8a11df75c06719f31ee5 /src/mesa/drivers/dri/i965/brw_sampler_state.c | |
parent | c8e2549785e9adac768e47bd310b0537a1b269a4 (diff) |
i965: Drop the degenerate brw_sampler_default_color structure.
It's just an array of four floats, and we have an array of four floats,
so this is literally just a memcpy...but with custom structs and strange
macros to give the appearance of doing something more.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sampler_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_sampler_state.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c b/src/mesa/drivers/dri/i965/brw_sampler_state.c index 12aea39dc74..6343ceb7d22 100644 --- a/src/mesa/drivers/dri/i965/brw_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c @@ -197,12 +197,9 @@ upload_default_color(struct brw_context *brw, sdc->f[2] = color[2]; sdc->f[3] = color[3]; } else { - struct brw_sampler_default_color *sdc; - - sdc = brw_state_batch(brw, AUB_TRACE_SAMPLER_DEFAULT_COLOR, - sizeof(*sdc), 32, sdc_offset); - - COPY_4V(sdc->color, color); + float *sdc = brw_state_batch(brw, AUB_TRACE_SAMPLER_DEFAULT_COLOR, + 4 * 4, 32, sdc_offset); + memcpy(sdc, color, 4 * 4); } } |