~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to src/gallium/drivers/lima/lima_draw.c

  • Committer: mmach
  • Date: 2022-09-22 20:02:48 UTC
  • Revision ID: netbit73@gmail.com-20220922200248-7y4wybmdgipuwdiw
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
}
148
148
 
149
149
static void
150
 
lima_damage_rect_union(struct pipe_scissor_state *rect,
151
 
                       unsigned minx, unsigned maxx,
152
 
                       unsigned miny, unsigned maxy)
153
 
{
154
 
   rect->minx = MIN2(rect->minx, minx);
155
 
   rect->miny = MIN2(rect->miny, miny);
156
 
   rect->maxx = MAX2(rect->maxx, maxx);
157
 
   rect->maxy = MAX2(rect->maxy, maxy);
158
 
}
159
 
 
160
 
static void
161
150
lima_clear(struct pipe_context *pctx, unsigned buffers, const struct pipe_scissor_state *scissor_state,
162
151
           const union pipe_color_union *color, double depth, unsigned stencil)
163
152
{
686
675
 
687
676
   /* need more investigation */
688
677
   if (info->mode == PIPE_PRIM_POINTS)
689
 
      render->multi_sample = 0x0000F000;
 
678
      render->multi_sample = 0x00000000;
690
679
   else if (info->mode < PIPE_PRIM_TRIANGLES)
691
 
      render->multi_sample = 0x0000F400;
 
680
      render->multi_sample = 0x00000400;
692
681
   else
693
 
      render->multi_sample = 0x0000F800;
 
682
      render->multi_sample = 0x00000800;
694
683
   if (ctx->framebuffer.base.samples)
695
684
      render->multi_sample |= 0x68;
 
685
   if (ctx->blend->base.alpha_to_coverage)
 
686
      render->multi_sample |= (1 << 7);
 
687
   if (ctx->blend->base.alpha_to_one)
 
688
      render->multi_sample |= (1 << 8);
 
689
   render->multi_sample |= (ctx->sample_mask << 12);
696
690
 
697
691
   /* Set gl_FragColor register, need to specify it 4 times */
698
692
   render->multi_sample |= (fs->state.frag_color0_reg << 28) |
727
721
 
728
722
   if (fs->state.uses_discard ||
729
723
       ctx->zsa->base.alpha_enabled ||
730
 
       fs->state.frag_depth_reg != -1) {
 
724
       fs->state.frag_depth_reg != -1 ||
 
725
       ctx->blend->base.alpha_to_coverage) {
731
726
      early_z = false;
732
727
      pixel_kill = false;
733
728
   }