summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_sampler_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-05-06 22:35:27 -0700
committerKenneth Graunke <kenneth@whitecape.org>2014-08-02 05:14:42 -0700
commit9a1a8cb84d940313130e2ef4e7a94079fa4092b7 (patch)
tree30e618b3d8b6790a186c8a11df75c06719f31ee5 /src/mesa/drivers/dri/i965/brw_sampler_state.c
parentc8e2549785e9adac768e47bd310b0537a1b269a4 (diff)
downloadexternal_mesa3d-9a1a8cb84d940313130e2ef4e7a94079fa4092b7.zip
external_mesa3d-9a1a8cb84d940313130e2ef4e7a94079fa4092b7.tar.gz
external_mesa3d-9a1a8cb84d940313130e2ef4e7a94079fa4092b7.tar.bz2
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 <kenneth@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sampler_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sampler_state.c9
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 12aea39..6343ceb 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);
}
}