~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/drivers/svga/svga_state_tgsi_transform.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:
27
27
#include "util/u_memory.h"
28
28
#include "util/u_bitmask.h"
29
29
#include "util/u_simple_shaders.h"
30
 
#include "tgsi/tgsi_ureg.h"
31
30
#include "tgsi/tgsi_point_sprite.h"
32
31
#include "tgsi/tgsi_dynamic_indexing.h"
33
32
#include "tgsi/tgsi_vpos.h"
34
33
#include "tgsi/tgsi_dump.h"
35
 
#include "tgsi/tgsi_info.h"
36
34
 
37
35
#include "svga_context.h"
38
36
#include "svga_shader.h"
132
130
           struct svga_shader *shader)
133
131
{
134
132
   struct svga_token_key key;
135
 
   boolean use_existing = FALSE;
 
133
   bool use_existing = false;
136
134
   struct svga_shader *transform_shader;
137
135
   const struct tgsi_shader_info *info = &shader->tgsi_info;
138
136
 
143
141
   if (shader->next) {
144
142
      transform_shader = svga_search_shader_token_key(shader->next, &key);
145
143
      if (transform_shader) {
146
 
         use_existing = TRUE;
 
144
         use_existing = true;
147
145
      }
148
146
   }
149
147
 
179
177
                           struct svga_shader *shader)
180
178
{
181
179
   struct svga_token_key key;
182
 
   boolean use_existing = FALSE;
 
180
   bool use_existing = false;
183
181
   struct svga_shader *transform_shader;
184
182
   const struct tgsi_shader_info *info = &shader->tgsi_info;
185
183
 
190
188
   if (shader->next) {
191
189
      transform_shader = svga_search_shader_token_key(shader->next, &key);
192
190
      if (transform_shader) {
193
 
         use_existing = TRUE;
 
191
         use_existing = true;
194
192
      }
195
193
   }
196
194
 
334
332
         return NULL;
335
333
      }
336
334
 
337
 
      gs->wide_point = TRUE;
 
335
      gs->wide_point = true;
338
336
      gs->aa_point_coord_index = aa_point_coord_index;
339
337
      gs->base.token_key = key;
340
338
      gs->base.parent = &orig_gs->base;
408
406
}
409
407
 
410
408
 
411
 
static boolean
 
409
static bool
412
410
has_dynamic_indexing(const struct tgsi_shader_info *info)
413
411
{
414
412
   return (info->dim_indirect_files & (1u << TGSI_FILE_CONSTANT)) ||
451
449
      transform_dynamic_indexing(svga, &tes->base);
452
450
   }
453
451
 
454
 
   if (svga->curr.reduced_prim == PIPE_PRIM_POINTS) {
 
452
   if (svga->curr.reduced_prim == MESA_PRIM_POINTS) {
455
453
      /* If the current prim type is POINTS and the current geometry shader
456
454
       * emits wide points, transform the shader to emulate wide points using
457
455
       * quads. NOTE: we don't do emulation of wide points in GS when