diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-16 10:25:05 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-21 10:43:02 -0700 |
commit | 5e268a01d260d0dd4037b048e1f7a406d92515bf (patch) | |
tree | fc7dc54d9f33bcc8fdb11d9ca137faccbdcb5b47 /src/gallium/drivers/panfrost | |
parent | 7f149163720a08634c3b91be119e5a14f8c85bcd (diff) |
panfrost: Don't bail on PIPE_BUFFER
We can handle some of it.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 5e66adb2f0f..f9e03ab4fbd 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -605,11 +605,11 @@ panfrost_upload_tex( /* For easy access */ - assert(pview->target != PIPE_BUFFER); - unsigned first_level = pview->u.tex.first_level; - unsigned last_level = pview->u.tex.last_level; - unsigned first_layer = pview->u.tex.first_layer; - unsigned last_layer = pview->u.tex.last_layer; + bool is_buffer = pview->target == PIPE_BUFFER; + unsigned first_level = is_buffer ? 0 : pview->u.tex.first_level; + unsigned last_level = is_buffer ? 0 : pview->u.tex.last_level; + unsigned first_layer = is_buffer ? 0 : pview->u.tex.first_layer; + unsigned last_layer = is_buffer ? 0 : pview->u.tex.last_layer; /* Lower-bit is set when sampling from colour AFBC */ bool is_afbc = rsrc->layout == PAN_AFBC; |