~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/util/u_pstipple.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:
63
63
                                     struct pipe_resource *tex,
64
64
                                     const uint32_t pattern[32])
65
65
{
66
 
   static const uint bit31 = 1u << 31;
 
66
   static const unsigned bit31 = 1u << 31;
67
67
   struct pipe_transfer *transfer;
68
 
   ubyte *data;
 
68
   uint8_t *data;
69
69
   int i, j;
70
70
 
71
71
   /* map texture memory */
174
174
struct pstip_transform_context {
175
175
   struct tgsi_transform_context base;
176
176
   struct tgsi_shader_info info;
177
 
   uint tempsUsed;  /**< bitmask */
 
177
   unsigned tempsUsed;  /**< bitmask */
178
178
   int wincoordInput;
179
179
   unsigned wincoordFile;
180
180
   int maxInput;
181
 
   uint samplersUsed;  /**< bitfield of samplers used */
 
181
   unsigned samplersUsed;  /**< bitfield of samplers used */
182
182
   int freeSampler;  /** an available sampler for the pstipple */
183
183
   int numImmed;
184
 
   uint coordOrigin;
 
184
   unsigned coordOrigin;
185
185
   unsigned fixedUnit;
186
186
   bool hasFixedUnit;
187
187
};
201
201
   /* XXX we can use tgsi_shader_info instead of some of this */
202
202
 
203
203
   if (decl->Declaration.File == TGSI_FILE_SAMPLER) {
204
 
      uint i;
 
204
      unsigned i;
205
205
      for (i = decl->Range.First; i <= decl->Range.Last; i++) {
206
206
         pctx->samplersUsed |= 1u << i;
207
207
      }
212
212
         pctx->wincoordInput = (int) decl->Range.First;
213
213
   }
214
214
   else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) {
215
 
      uint i;
 
215
      unsigned i;
216
216
      for (i = decl->Range.First; i <= decl->Range.Last; i++) {
217
217
         pctx->tempsUsed |= (1 << i);
218
218
      }
237
237
 * Find the lowest zero bit in the given word, or -1 if bitfield is all ones.
238
238
 */
239
239
static int
240
 
free_bit(uint bitfield)
 
240
free_bit(unsigned bitfield)
241
241
{
242
242
   return ffs(~bitfield) - 1;
243
243
}
354
354
   /* KILL_IF -texTemp;   # if -texTemp < 0, kill fragment */
355
355
   tgsi_transform_kill_inst(ctx,
356
356
                            TGSI_FILE_TEMPORARY, texTemp,
357
 
                            TGSI_SWIZZLE_W, TRUE);
 
357
                            TGSI_SWIZZLE_W, true);
358
358
}
359
359
 
360
360
 
377
377
                                     unsigned wincoordFile)
378
378
{
379
379
   struct pstip_transform_context transform;
380
 
   const uint newLen = tgsi_num_tokens(tokens) + NUM_NEW_TOKENS;
 
380
   const unsigned newLen = tgsi_num_tokens(tokens) + NUM_NEW_TOKENS;
381
381
   struct tgsi_token *new_tokens;
382
382
 
383
383
   /* Setup shader transformation info/context.