vrend: Force setting viewport state when the sub context is new

Fixes:
   KHR-GL41.viewport_array.dynamic_viewport_index
   KHR-GL41.viewport_array.draw_mulitple_viewports_with_single_invocation

when run in a batch as KHR-GL41.viewport_array.*

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent 71609cc1ce
commit 095bd118f9
  1. 6
      src/vrend_renderer.c

@ -525,6 +525,7 @@ struct vrend_sub_context {
/* viewport is negative */ /* viewport is negative */
uint32_t scissor_state_dirty; uint32_t scissor_state_dirty;
uint32_t viewport_state_dirty; uint32_t viewport_state_dirty;
uint32_t viewport_state_initialized;
uint32_t fb_height; uint32_t fb_height;
@ -2281,12 +2282,13 @@ void vrend_set_viewport_states(struct vrend_context *ctx,
if (ctx->sub->vps[idx].cur_x != x || if (ctx->sub->vps[idx].cur_x != x ||
ctx->sub->vps[idx].cur_y != y || ctx->sub->vps[idx].cur_y != y ||
ctx->sub->vps[idx].width != width || ctx->sub->vps[idx].width != width ||
ctx->sub->vps[idx].height != height) { ctx->sub->vps[idx].height != height ||
ctx->sub->viewport_state_dirty |= (1 << idx); (!(ctx->sub->viewport_state_initialized &= (1 << idx)))) {
ctx->sub->vps[idx].cur_x = x; ctx->sub->vps[idx].cur_x = x;
ctx->sub->vps[idx].cur_y = y; ctx->sub->vps[idx].cur_y = y;
ctx->sub->vps[idx].width = width; ctx->sub->vps[idx].width = width;
ctx->sub->vps[idx].height = height; ctx->sub->vps[idx].height = height;
ctx->sub->viewport_state_dirty |= (1 << idx);
} }
if (idx == 0) { if (idx == 0) {

Loading…
Cancel
Save