Guest User

Untitled

a guest
Jan 16th, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
  2. index 0e6ce7bd2c..4c15224734 100644
  3. --- a/src/gallium/drivers/panfrost/pan_context.c
  4. +++ b/src/gallium/drivers/panfrost/pan_context.c
  5. @@ -329,15 +329,13 @@ panfrost_is_scanout(struct panfrost_context *ctx)
  6. static void
  7. panfrost_new_frag_framebuffer(struct panfrost_context *ctx)
  8. {
  9. - mali_ptr framebuffer = ((struct panfrost_resource *) ctx->pipe_framebuffer.cbufs[0]->texture)->gpu[0];
  10. - int stride;
  11. + /* Depth-only framebuffer -> dummy RT by default unless cbufs > 0 */
  12. + mali_ptr framebuffer = 0;
  13. + int stride = 0;
  14.  
  15. if (ctx->pipe_framebuffer.nr_cbufs > 0) {
  16. + framebuffer = ((struct panfrost_resource *) ctx->pipe_framebuffer.cbufs[0]->texture)->gpu[0];
  17. stride = util_format_get_stride(ctx->pipe_framebuffer.cbufs[0]->format, ctx->pipe_framebuffer.width);
  18. - } else {
  19. - /* Depth-only framebuffer -> dummy RT */
  20. - framebuffer = 0;
  21. - stride = 0;
  22. }
  23.  
  24. /* The default is upside down from OpenGL's perspective. */
Advertisement
Add Comment
Please, Sign In to add comment