iris: hack to stop crashing on samplers for now
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 22 Jan 2018 02:08:15 +0000 (18:08 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index d85173ef5dfc0467e8499ef98ac79b4e6427a3cb..e9845270440c65e42a4700b31d58b28caa59e53f 100644 (file)
@@ -1535,6 +1535,9 @@ iris_upload_render_state(struct iris_context *ice,
                                        32, &offset);
 
       for (int i = 0; i < count; i++) {
+         // XXX: when we have a correct count, these better be bound
+         if (!ice->state.samplers[stage][i])
+            continue;
          memcpy(map, ice->state.samplers[stage][i]->sampler_state,
                 4 * GENX(SAMPLER_STATE_length));
          map += GENX(SAMPLER_STATE_length);