* 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)];
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);
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);
/* 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) {