diff options
author | Kenneth Graunke <[email protected]> | 2018-10-24 14:16:38 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:09 -0800 |
commit | 927c4a21bd6982f653a8987494f37fc36a8295e6 (patch) | |
tree | 71be97d3938b937ee994040ac8d139cfddfcc8f9 | |
parent | 5d1a9db720a674110d4b2eb1c848f2e1062cdbf6 (diff) |
iris: Fall back to 1x1x1 null surface if no framebuffer supplied
If the state tracker never gave us the framebuffer dimensions via
a set_framebuffer_state() call, just fall back to the unbound texture
null surface, which is 1x1x1. Otherwise we'd use a NULL resource
(no pun intended).
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 92589ea588c..d16f68a1d1c 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -3354,6 +3354,10 @@ use_null_surface(struct iris_batch *batch, struct iris_context *ice) static uint32_t use_null_fb_surface(struct iris_batch *batch, struct iris_context *ice) { + /* If set_framebuffer_state() was never called, fall back to 1x1x1 */ + if (!ice->state.null_fb.res) + return use_null_surface(batch, ice); + struct iris_bo *state_bo = iris_resource_bo(ice->state.null_fb.res); iris_use_pinned_bo(batch, state_bo, false); |