This is cleaner in the gl context now.
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14675>
#include "state_tracker/st_cb_texture.h"
#include "state_tracker/st_manager.h"
-#include "state_tracker/st_context.h"
#include "state_tracker/st_sampler_view.h"
static inline bool
memcpy(&ctx->ViewportArray[i].X, &vp->X, sizeof(float) * 6);
- if (st_context(ctx)->invalidate_on_gl_viewport)
+ if (ctx->invalidate_on_gl_viewport)
st_manager_invalidate_drawables(ctx);
}
}
struct st_config_options *st_opts;
struct cso_context *cso_context;
bool has_invalidate_buffer;
+ /* On old libGL's for linux we need to invalidate the drawables
+ * on glViewpport calls, this is set via a option.
+ */
+ bool invalidate_on_gl_viewport;
+
/*@}*/
/**
for (unsigned i = 0; i < ctx->Const.MaxViewports; i++)
set_viewport_no_notify(ctx, i, input.X, input.Y, input.Width, input.Height);
- if (st_context(ctx)->invalidate_on_gl_viewport)
+ if (ctx->invalidate_on_gl_viewport)
st_manager_invalidate_drawables(ctx);
}
clamp_viewport(ctx, &x, &y, &width, &height);
set_viewport_no_notify(ctx, idx, x, y, width, height);
- if (st_context(ctx)->invalidate_on_gl_viewport)
+ if (ctx->invalidate_on_gl_viewport)
st_manager_invalidate_drawables(ctx);
}
inputs[i].Width, inputs[i].Height);
}
- if (st_context(ctx)->invalidate_on_gl_viewport)
+ if (ctx->invalidate_on_gl_viewport)
st_manager_invalidate_drawables(ctx);
}
boolean emulate_gl_clamp;
boolean texture_buffer_sampler;
- /* On old libGL's for linux we need to invalidate the drawables
- * on glViewpport calls, this is set via a option.
- */
- boolean invalidate_on_gl_viewport;
boolean draw_needs_minmax_index;
boolean has_hw_atomics;
st->can_scissor_clear = !!st->screen->get_param(st->screen, PIPE_CAP_CLEAR_SCISSORED);
- st->invalidate_on_gl_viewport =
+ st->ctx->invalidate_on_gl_viewport =
smapi->get_param(smapi, ST_MANAGER_BROKEN_INVALIDATE);
st->iface.destroy = st_context_destroy;