.alpha_ref = state->alpha_state.ref_value
};
+ memcpy(program.rt_formats, state->rt_formats, sizeof(program.rt_formats));
+
if (dev->quirks & IS_BIFROST) {
bifrost_compile_shader_nir(s, &program, dev->gpu_id);
} else {
if (type == PIPE_SHADER_FRAGMENT) {
v->alpha_state = ctx->depth_stencil->alpha;
+ struct pipe_framebuffer_state *fb = &ctx->pipe_framebuffer;
+ for (unsigned i = 0; i < fb->nr_cbufs; ++i) {
+ enum pipe_format fmt = PIPE_FORMAT_R8G8B8A8_UNORM;
+
+ if ((fb->nr_cbufs > i) && fb->cbufs[i])
+ fmt = fb->cbufs[i]->format;
+
+ v->rt_formats[i] = fmt;
+ }
+
/* Point sprites are TODO on Bifrost */
if (ctx->rasterizer && !(dev->quirks & IS_BIFROST)) {
v->point_sprite_mask = ctx->rasterizer->base.sprite_coord_enable;
/* IN: For a fragment shader with a lowered alpha test, the ref value */
float alpha_ref;
+
+ /* IN: Render target formats for output load/store lowering */
+ enum pipe_format rt_formats[8];
} panfrost_program;
typedef struct pan_block {