~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/tgsi/tgsi_transform.h

  • 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:
87
87
                         const struct tgsi_full_property *prop);
88
88
 
89
89
   struct tgsi_header *header;
90
 
   uint max_tokens_out;
 
90
   unsigned max_tokens_out;
91
91
   struct tgsi_token *tokens_out;
92
 
   uint ti;
 
92
   unsigned ti;
93
93
   bool fail;
94
94
};
95
95
 
340
340
 
341
341
 
342
342
static inline void
343
 
tgsi_transform_op3_inst(struct tgsi_transform_context *ctx,
344
 
                        enum tgsi_opcode opcode,
345
 
                        unsigned dst_file,
346
 
                        unsigned dst_index,
347
 
                        unsigned dst_writemask,
348
 
                        unsigned src0_file,
349
 
                        unsigned src0_index,
350
 
                        unsigned src1_file,
351
 
                        unsigned src1_index,
352
 
                        unsigned src2_file,
353
 
                        unsigned src2_index)
354
 
{
355
 
   struct tgsi_full_instruction inst;
356
 
 
357
 
   inst = tgsi_default_full_instruction();
358
 
   inst.Instruction.Opcode = opcode;
359
 
   inst.Instruction.NumDstRegs = 1;
360
 
   inst.Dst[0].Register.File = dst_file,
361
 
   inst.Dst[0].Register.Index = dst_index;
362
 
   inst.Dst[0].Register.WriteMask = dst_writemask;
363
 
   inst.Instruction.NumSrcRegs = 3;
364
 
   tgsi_transform_src_reg_xyzw(&inst.Src[0], src0_file, src0_index);
365
 
   tgsi_transform_src_reg_xyzw(&inst.Src[1], src1_file, src1_index);
366
 
   tgsi_transform_src_reg_xyzw(&inst.Src[2], src2_file, src2_index);
367
 
 
368
 
   ctx->emit_instruction(ctx, &inst);
369
 
}
370
 
 
371
 
 
372
 
 
373
 
static inline void
374
343
tgsi_transform_op1_swz_inst(struct tgsi_transform_context *ctx,
375
344
                            enum tgsi_opcode opcode,
376
345
                            unsigned dst_file,
526
495
                         unsigned src_file,
527
496
                         unsigned src_index,
528
497
                         unsigned src_swizzle,
529
 
                         boolean negate)
 
498
                         bool negate)
530
499
{
531
500
   struct tgsi_full_instruction inst;
532
501
 
564
533
   inst.Dst[0].Register.File = dst_file;
565
534
   inst.Dst[0].Register.Index = dst_index;
566
535
   inst.Instruction.NumSrcRegs = 2;
567
 
   inst.Instruction.Texture = TRUE;
 
536
   inst.Instruction.Texture = true;
568
537
   inst.Texture.Texture = tex_target;
569
538
   tgsi_transform_src_reg_xyzw(&inst.Src[0], src_file, src_index);
570
539
   tgsi_transform_src_reg_xyzw(&inst.Src[1], TGSI_FILE_SAMPLER, sampler_index);
575
544
 
576
545
extern struct tgsi_token *
577
546
tgsi_transform_shader(const struct tgsi_token *tokens_in,
578
 
                      uint initial_tokens_len,
 
547
                      unsigned initial_tokens_len,
579
548
                      struct tgsi_transform_context *ctx);
580
549
 
581
550