static void
lima_pack_render_state(struct lima_context *ctx, const struct pipe_draw_info *info)
{
+ struct lima_fs_shader_state *fs = ctx->fs;
struct lima_render_state *render =
lima_ctx_buff_alloc(ctx, lima_ctx_buff_pp_plb_rsw,
sizeof(*render));
render->textures_address = 0x00000000;
/* more investigation */
- render->aux0 = 0x00000300 | (ctx->vs->varying_stride >> 3);
+ render->aux0 = 0x00000100 | (ctx->vs->varying_stride >> 3);
render->aux1 = 0x00001000;
if (ctx->blend->base.dither)
render->aux1 |= 0x00002000;
+ /* Enable Early-Z if shader doesn't have discard */
+ if (!fs->uses_discard)
+ render->aux0 |= 0x200;
+
if (ctx->tex_stateobj.num_samplers) {
render->textures_address =
lima_ctx_buff_va(ctx, lima_ctx_buff_pp_tex_desc, LIMA_CTX_BUFF_SUBMIT_PP);