~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/drivers/svga/svga_state_need_swtnl.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
static enum pipe_error
61
61
update_need_pipeline(struct svga_context *svga, uint64_t dirty)
62
62
{
63
 
   boolean need_pipeline = FALSE;
 
63
   bool need_pipeline = false;
64
64
   struct svga_vertex_shader *vs = svga->curr.vs;
65
65
   const char *reason = "";
66
66
 
77
77
                 svga->curr.rast->need_pipeline_tris_str,
78
78
                 svga->curr.rast->need_pipeline_lines_str,
79
79
                 svga->curr.rast->need_pipeline_points_str);
80
 
      need_pipeline = TRUE;
 
80
      need_pipeline = true;
81
81
 
82
82
      switch (svga->curr.reduced_prim) {
83
 
      case PIPE_PRIM_POINTS:
 
83
      case MESA_PRIM_POINTS:
84
84
         reason = svga->curr.rast->need_pipeline_points_str;
85
85
         break;
86
 
      case PIPE_PRIM_LINES:
 
86
      case MESA_PRIM_LINES:
87
87
         reason = svga->curr.rast->need_pipeline_lines_str;
88
88
         break;
89
 
      case PIPE_PRIM_TRIANGLES:
 
89
      case MESA_PRIM_TRIANGLES:
90
90
         reason = svga->curr.rast->need_pipeline_tris_str;
91
91
         break;
92
92
      default:
98
98
    */
99
99
    if (vs && vs->base.info.writes_edgeflag) {
100
100
      SVGA_DBG(DEBUG_SWTNL, "%s: edgeflags\n", __func__);
101
 
      need_pipeline = TRUE;
 
101
      need_pipeline = true;
102
102
      reason = "edge flags";
103
103
   }
104
104
 
105
105
   /* SVGA_NEW_FS, SVGA_NEW_RAST, SVGA_NEW_REDUCED_PRIMITIVE
106
106
    */
107
 
   if (svga->curr.rast && svga->curr.reduced_prim == PIPE_PRIM_POINTS) {
 
107
   if (svga->curr.rast && svga->curr.reduced_prim == MESA_PRIM_POINTS) {
108
108
      unsigned sprite_coord_gen = svga->curr.rast->templ.sprite_coord_enable;
109
109
      unsigned generic_inputs =
110
110
         svga->curr.fs ? svga->curr.fs->generic_inputs : 0;
120
120
          * To solve this, we have to use the draw-module's wide/sprite
121
121
          * point stage.
122
122
          */
123
 
         need_pipeline = TRUE;
 
123
         need_pipeline = true;
124
124
         reason = "point sprite coordinate generation";
125
125
      }
126
126
   }
158
158
static enum pipe_error
159
159
update_need_swtnl(struct svga_context *svga, uint64_t dirty)
160
160
{
161
 
   boolean need_swtnl;
 
161
   bool need_swtnl;
162
162
 
163
163
   if (svga->debug.no_swtnl) {
164
 
      svga->state.sw.need_swvfetch = FALSE;
165
 
      svga->state.sw.need_pipeline = FALSE;
 
164
      svga->state.sw.need_swvfetch = false;
 
165
      svga->state.sw.need_pipeline = false;
166
166
   }
167
167
 
168
168
   need_swtnl = (svga->state.sw.need_swvfetch ||
169
169
                 svga->state.sw.need_pipeline);
170
170
 
171
171
   if (svga->debug.force_swtnl) {
172
 
      need_swtnl = TRUE;
 
172
      need_swtnl = true;
173
173
   }
174
174
 
175
175
   /*
178
178
    * the wrong buffers and vertex formats. Try trivial/line-wide.
179
179
    */
180
180
   if (svga->state.sw.in_swtnl_draw)
181
 
      need_swtnl = TRUE;
 
181
      need_swtnl = true;
182
182
 
183
183
   if (need_swtnl != svga->state.sw.need_swtnl) {
184
184
      SVGA_DBG(DEBUG_SWTNL|DEBUG_PERF,
189
189
 
190
190
      svga->state.sw.need_swtnl = need_swtnl;
191
191
      svga->dirty |= SVGA_NEW_NEED_SWTNL;
192
 
      svga->swtnl.new_vdecl = TRUE;
 
192
      svga->swtnl.new_vdecl = true;
193
193
   }
194
194
 
195
195
   return PIPE_OK;