aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-10-01 18:33:17 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:09 -0800
commit2f24000662f994d1cf1d6f80efa392be987f7e4e (patch)
tree2f1e43622fa289d49d965b1df90368f90ce8d64e /src
parentc6016d3761c4df3d29b0a0fec39cfb2523c5c608 (diff)
iris: drop a bunch of pipe_sampler_state stuff we don't need
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_state.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 391b6f71bbc..b8c8c96a4ca 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -1112,9 +1112,7 @@ wrap_mode_needs_border_color(unsigned wrap_mode)
* Gallium CSO for sampler state.
*/
struct iris_sampler_state {
- // XXX: do we need this
- struct pipe_sampler_state base;
-
+ union pipe_color_union border_color;
bool needs_border_color;
uint32_t sampler_state[GENX(SAMPLER_STATE_length)];
@@ -1137,8 +1135,6 @@ iris_create_sampler_state(struct pipe_context *ctx,
if (!cso)
return NULL;
- memcpy(&cso->base, state, sizeof(*state));
-
STATIC_ASSERT(PIPE_TEX_FILTER_NEAREST == MAPFILTER_NEAREST);
STATIC_ASSERT(PIPE_TEX_FILTER_LINEAR == MAPFILTER_LINEAR);
@@ -1146,6 +1142,8 @@ iris_create_sampler_state(struct pipe_context *ctx,
unsigned wrap_t = translate_wrap(state->wrap_t);
unsigned wrap_r = translate_wrap(state->wrap_r);
+ memcpy(&cso->border_color, &state->border_color, sizeof(cso->border_color));
+
cso->needs_border_color = wrap_mode_needs_border_color(wrap_s) ||
wrap_mode_needs_border_color(wrap_t) ||
wrap_mode_needs_border_color(wrap_r);
@@ -1274,7 +1272,7 @@ iris_bind_sampler_states(struct pipe_context *ctx,
/* Stream out the border color and merge the pointer. */
uint32_t offset =
- iris_upload_border_color(ice, &state->base.border_color);
+ iris_upload_border_color(ice, &state->border_color);
uint32_t dynamic[GENX(SAMPLER_STATE_length)];
iris_pack_state(GENX(SAMPLER_STATE), dynamic, dyns) {