void *cso)
{
struct panfrost_context *ctx = pan_context(pipe);
+ struct panfrost_screen *screen = pan_screen(ctx->base.screen);
struct pipe_blend_state *blend = (struct pipe_blend_state *) cso;
struct panfrost_blend_state *pblend = (struct panfrost_blend_state *) cso;
ctx->blend = pblend;
if (!blend)
return;
- if (ctx->require_sfbd) {
+ if (screen->require_sfbd) {
SET_BIT(ctx->fragment_shader_core.unknown2_4, MALI_NO_DITHER, !blend->dither);
}
return;
}
- mali_ptr framebuffer = ctx->require_sfbd ?
+ struct panfrost_screen *screen = pan_screen(ctx->base.screen);
+ mali_ptr framebuffer = screen->require_sfbd ?
panfrost_attach_vt_sfbd(ctx) :
panfrost_attach_vt_mfbd(ctx);
static void
panfrost_invalidate_frame(struct panfrost_context *ctx)
{
- if (ctx->require_sfbd)
+ struct panfrost_screen *screen = pan_screen(ctx->base.screen);
+
+ if (screen->require_sfbd)
ctx->vt_framebuffer_sfbd = panfrost_emit_sfbd(ctx, ~0);
else
ctx->vt_framebuffer_mfbd = panfrost_emit_mfbd(ctx, ~0);
panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data)
{
struct panfrost_job *job = panfrost_get_job_for_fbo(ctx);
+ struct panfrost_screen *screen = pan_screen(ctx->base.screen);
panfrost_attach_vt_framebuffer(ctx, true);
ctx->fragment_shader_core.blend.shader = 0;
}
- if (ctx->require_sfbd) {
+ if (screen->require_sfbd) {
/* When only a single render target platform is used, the blend
* information is inside the shader meta itself. We
* additionally need to signal CAN_DISCARD for nontrivial blend
ctx->payload_tiler.postfix._shader_upper = (transfer.gpu) >> 4;
- if (!ctx->require_sfbd) {
+ if (!screen->require_sfbd) {
/* Additional blend descriptor tacked on for jobs using MFBD */
unsigned blend_count = 0x200;
panfrost_hint_afbc(screen, &ctx->pipe_framebuffer);
- if (ctx->require_sfbd)
+ if (screen->require_sfbd)
ctx->vt_framebuffer_sfbd = panfrost_emit_sfbd(ctx, ~0);
else
ctx->vt_framebuffer_mfbd = panfrost_emit_mfbd(ctx, ~0);
struct pipe_context *gallium = (struct pipe_context *) ctx;
ctx->is_t6xx = pscreen->gpu_id < 0x0700; /* Literally, "earlier than T700" */
- ctx->require_sfbd = pscreen->gpu_id < 0x0750; /* T760 is the first to support MFBD */
gallium->screen = screen;
/* True for t6XX, false for t8xx. */
bool is_t6xx;
- /* If set, we'll require the use of single render-target framebuffer
- * descriptors (SFBD), for older hardware -- specifically, <T760 hardware, If
- * false, we'll use the MFBD no matter what. New hardware -does- retain support
- * for SFBD, and in theory we could flip between them on a per-RT basis, but
- * there's no real advantage to doing so */
- bool require_sfbd;
-
uint32_t out_sync;
};