From 39e795d4731ca7eb83956fcc5e9b9edb7840a66a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 19 Apr 2018 19:33:22 -0700 Subject: [PATCH] iris: fix texturing! --- src/gallium/drivers/iris/iris_state.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 40c4df8aa68..f217c745b82 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1629,11 +1629,21 @@ iris_bind_compute_state(struct pipe_context *ctx, void *state) { } +static void +iris_populate_sampler_key(const struct iris_context *ice, + struct brw_sampler_prog_key_data *key) +{ + for (int i = 0; i < MAX_SAMPLERS; i++) { + key->swizzles[i] = 0x688; /* XYZW */ + } +} + static void iris_populate_vs_key(const struct iris_context *ice, struct brw_vs_prog_key *key) { memset(key, 0, sizeof(*key)); + iris_populate_sampler_key(ice, &key->tex); } static void @@ -1641,6 +1651,7 @@ iris_populate_tcs_key(const struct iris_context *ice, struct brw_tcs_prog_key *key) { memset(key, 0, sizeof(*key)); + iris_populate_sampler_key(ice, &key->tex); } static void @@ -1648,6 +1659,7 @@ iris_populate_tes_key(const struct iris_context *ice, struct brw_tes_prog_key *key) { memset(key, 0, sizeof(*key)); + iris_populate_sampler_key(ice, &key->tex); } static void @@ -1655,6 +1667,7 @@ iris_populate_gs_key(const struct iris_context *ice, struct brw_gs_prog_key *key) { memset(key, 0, sizeof(*key)); + iris_populate_sampler_key(ice, &key->tex); } static void @@ -1662,6 +1675,7 @@ iris_populate_fs_key(const struct iris_context *ice, struct brw_wm_prog_key *key) { memset(key, 0, sizeof(*key)); + iris_populate_sampler_key(ice, &key->tex); /* XXX: dirty flags? */ const struct pipe_framebuffer_state *fb = &ice->state.framebuffer; -- 2.30.2