|
|
@ -130,7 +130,7 @@ ureg_destroy( struct ureg_program * ); |
|
|
|
/***********************************************************************
|
|
|
|
/***********************************************************************
|
|
|
|
* Convenience routine: |
|
|
|
* Convenience routine: |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static INLINE void * |
|
|
|
static inline void * |
|
|
|
ureg_create_shader_with_so_and_destroy( struct ureg_program *p, |
|
|
|
ureg_create_shader_with_so_and_destroy( struct ureg_program *p, |
|
|
|
struct pipe_context *pipe, |
|
|
|
struct pipe_context *pipe, |
|
|
|
const struct pipe_stream_output_info *so ) |
|
|
|
const struct pipe_stream_output_info *so ) |
|
|
@ -140,7 +140,7 @@ ureg_create_shader_with_so_and_destroy( struct ureg_program *p, |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE void * |
|
|
|
static inline void * |
|
|
|
ureg_create_shader_and_destroy( struct ureg_program *p, |
|
|
|
ureg_create_shader_and_destroy( struct ureg_program *p, |
|
|
|
struct pipe_context *pipe ) |
|
|
|
struct pipe_context *pipe ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -168,7 +168,7 @@ ureg_DECL_fs_input_cyl_centroid(struct ureg_program *, |
|
|
|
unsigned cylindrical_wrap, |
|
|
|
unsigned cylindrical_wrap, |
|
|
|
unsigned interp_location); |
|
|
|
unsigned interp_location); |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_DECL_fs_input_cyl(struct ureg_program *ureg, |
|
|
|
ureg_DECL_fs_input_cyl(struct ureg_program *ureg, |
|
|
|
unsigned semantic_name, |
|
|
|
unsigned semantic_name, |
|
|
|
unsigned semantic_index, |
|
|
|
unsigned semantic_index, |
|
|
@ -183,7 +183,7 @@ ureg_DECL_fs_input_cyl(struct ureg_program *ureg, |
|
|
|
0); |
|
|
|
0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_DECL_fs_input(struct ureg_program *ureg, |
|
|
|
ureg_DECL_fs_input(struct ureg_program *ureg, |
|
|
|
unsigned semantic_name, |
|
|
|
unsigned semantic_name, |
|
|
|
unsigned semantic_index, |
|
|
|
unsigned semantic_index, |
|
|
@ -301,7 +301,7 @@ ureg_DECL_sampler_view(struct ureg_program *, |
|
|
|
unsigned return_type_w ); |
|
|
|
unsigned return_type_w ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm4f( struct ureg_program *ureg, |
|
|
|
ureg_imm4f( struct ureg_program *ureg, |
|
|
|
float a, float b, |
|
|
|
float a, float b, |
|
|
|
float c, float d) |
|
|
|
float c, float d) |
|
|
@ -314,7 +314,7 @@ ureg_imm4f( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate( ureg, v, 4 ); |
|
|
|
return ureg_DECL_immediate( ureg, v, 4 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm3f( struct ureg_program *ureg, |
|
|
|
ureg_imm3f( struct ureg_program *ureg, |
|
|
|
float a, float b, |
|
|
|
float a, float b, |
|
|
|
float c) |
|
|
|
float c) |
|
|
@ -326,7 +326,7 @@ ureg_imm3f( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate( ureg, v, 3 ); |
|
|
|
return ureg_DECL_immediate( ureg, v, 3 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm2f( struct ureg_program *ureg, |
|
|
|
ureg_imm2f( struct ureg_program *ureg, |
|
|
|
float a, float b) |
|
|
|
float a, float b) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -336,7 +336,7 @@ ureg_imm2f( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate( ureg, v, 2 ); |
|
|
|
return ureg_DECL_immediate( ureg, v, 2 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm1f( struct ureg_program *ureg, |
|
|
|
ureg_imm1f( struct ureg_program *ureg, |
|
|
|
float a) |
|
|
|
float a) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -345,7 +345,7 @@ ureg_imm1f( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate( ureg, v, 1 ); |
|
|
|
return ureg_DECL_immediate( ureg, v, 1 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm4u( struct ureg_program *ureg, |
|
|
|
ureg_imm4u( struct ureg_program *ureg, |
|
|
|
unsigned a, unsigned b, |
|
|
|
unsigned a, unsigned b, |
|
|
|
unsigned c, unsigned d) |
|
|
|
unsigned c, unsigned d) |
|
|
@ -358,7 +358,7 @@ ureg_imm4u( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate_uint( ureg, v, 4 ); |
|
|
|
return ureg_DECL_immediate_uint( ureg, v, 4 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm3u( struct ureg_program *ureg, |
|
|
|
ureg_imm3u( struct ureg_program *ureg, |
|
|
|
unsigned a, unsigned b, |
|
|
|
unsigned a, unsigned b, |
|
|
|
unsigned c) |
|
|
|
unsigned c) |
|
|
@ -370,7 +370,7 @@ ureg_imm3u( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate_uint( ureg, v, 3 ); |
|
|
|
return ureg_DECL_immediate_uint( ureg, v, 3 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm2u( struct ureg_program *ureg, |
|
|
|
ureg_imm2u( struct ureg_program *ureg, |
|
|
|
unsigned a, unsigned b) |
|
|
|
unsigned a, unsigned b) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -380,14 +380,14 @@ ureg_imm2u( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate_uint( ureg, v, 2 ); |
|
|
|
return ureg_DECL_immediate_uint( ureg, v, 2 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm1u( struct ureg_program *ureg, |
|
|
|
ureg_imm1u( struct ureg_program *ureg, |
|
|
|
unsigned a) |
|
|
|
unsigned a) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ureg_DECL_immediate_uint( ureg, &a, 1 ); |
|
|
|
return ureg_DECL_immediate_uint( ureg, &a, 1 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm4i( struct ureg_program *ureg, |
|
|
|
ureg_imm4i( struct ureg_program *ureg, |
|
|
|
int a, int b, |
|
|
|
int a, int b, |
|
|
|
int c, int d) |
|
|
|
int c, int d) |
|
|
@ -400,7 +400,7 @@ ureg_imm4i( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate_int( ureg, v, 4 ); |
|
|
|
return ureg_DECL_immediate_int( ureg, v, 4 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm3i( struct ureg_program *ureg, |
|
|
|
ureg_imm3i( struct ureg_program *ureg, |
|
|
|
int a, int b, |
|
|
|
int a, int b, |
|
|
|
int c) |
|
|
|
int c) |
|
|
@ -412,7 +412,7 @@ ureg_imm3i( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate_int( ureg, v, 3 ); |
|
|
|
return ureg_DECL_immediate_int( ureg, v, 3 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm2i( struct ureg_program *ureg, |
|
|
|
ureg_imm2i( struct ureg_program *ureg, |
|
|
|
int a, int b) |
|
|
|
int a, int b) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -422,7 +422,7 @@ ureg_imm2i( struct ureg_program *ureg, |
|
|
|
return ureg_DECL_immediate_int( ureg, v, 2 ); |
|
|
|
return ureg_DECL_immediate_int( ureg, v, 2 ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_imm1i( struct ureg_program *ureg, |
|
|
|
ureg_imm1i( struct ureg_program *ureg, |
|
|
|
int a) |
|
|
|
int a) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -432,7 +432,7 @@ ureg_imm1i( struct ureg_program *ureg, |
|
|
|
/* Where the destination register has a valid file, but an empty
|
|
|
|
/* Where the destination register has a valid file, but an empty
|
|
|
|
* writemask. |
|
|
|
* writemask. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static INLINE boolean |
|
|
|
static inline boolean |
|
|
|
ureg_dst_is_empty( struct ureg_dst dst ) |
|
|
|
ureg_dst_is_empty( struct ureg_dst dst ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return dst.File != TGSI_FILE_NULL && |
|
|
|
return dst.File != TGSI_FILE_NULL && |
|
|
@ -546,7 +546,7 @@ ureg_fixup_insn_size(struct ureg_program *ureg, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define OP00( op ) \ |
|
|
|
#define OP00( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg ) \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg ) \
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
|
struct ureg_emit_insn_result insn; \
|
|
|
|
struct ureg_emit_insn_result insn; \
|
|
|
@ -565,7 +565,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg ) \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP01( op ) \ |
|
|
|
#define OP01( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_src src ) \
|
|
|
|
struct ureg_src src ) \
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
@ -586,7 +586,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP00_LBL( op ) \ |
|
|
|
#define OP00_LBL( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
unsigned *label_token ) \
|
|
|
|
unsigned *label_token ) \
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
@ -607,7 +607,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP01_LBL( op ) \ |
|
|
|
#define OP01_LBL( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_src src, \
|
|
|
|
struct ureg_src src, \
|
|
|
|
unsigned *label_token ) \
|
|
|
|
unsigned *label_token ) \
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
@ -630,7 +630,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP10( op ) \ |
|
|
|
#define OP10( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst ) \
|
|
|
|
struct ureg_dst dst ) \
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
|
unsigned opcode = TGSI_OPCODE_##op; \
|
|
|
@ -654,7 +654,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define OP11( op ) \ |
|
|
|
#define OP11( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src ) \
|
|
|
|
struct ureg_src src ) \
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
@ -679,7 +679,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP12( op ) \ |
|
|
|
#define OP12( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1 ) \
|
|
|
|
struct ureg_src src1 ) \
|
|
|
@ -706,7 +706,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP12_TEX( op ) \ |
|
|
|
#define OP12_TEX( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
unsigned target, \
|
|
|
|
unsigned target, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
@ -735,7 +735,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP12_SAMPLE( op ) \ |
|
|
|
#define OP12_SAMPLE( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1 ) \
|
|
|
|
struct ureg_src src1 ) \
|
|
|
@ -764,7 +764,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP13( op ) \ |
|
|
|
#define OP13( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1, \
|
|
|
|
struct ureg_src src1, \
|
|
|
@ -793,7 +793,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP13_SAMPLE( op ) \ |
|
|
|
#define OP13_SAMPLE( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1, \
|
|
|
|
struct ureg_src src1, \
|
|
|
@ -824,7 +824,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP14_TEX( op ) \ |
|
|
|
#define OP14_TEX( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
unsigned target, \
|
|
|
|
unsigned target, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
@ -857,7 +857,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP14_SAMPLE( op ) \ |
|
|
|
#define OP14_SAMPLE( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1, \
|
|
|
|
struct ureg_src src1, \
|
|
|
@ -891,7 +891,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define OP14( op ) \ |
|
|
|
#define OP14( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1, \
|
|
|
|
struct ureg_src src1, \
|
|
|
@ -923,7 +923,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define OP15( op ) \ |
|
|
|
#define OP15( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1, \
|
|
|
|
struct ureg_src src1, \
|
|
|
@ -956,7 +956,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define OP15_SAMPLE( op ) \ |
|
|
|
#define OP15_SAMPLE( op ) \ |
|
|
|
static INLINE void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
static inline void ureg_##op( struct ureg_program *ureg, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_dst dst, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src0, \
|
|
|
|
struct ureg_src src1, \
|
|
|
|
struct ureg_src src1, \
|
|
|
@ -999,7 +999,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ |
|
|
|
/***********************************************************************
|
|
|
|
/***********************************************************************
|
|
|
|
* Inline helpers for manipulating register structs: |
|
|
|
* Inline helpers for manipulating register structs: |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static INLINE struct ureg_src
|
|
|
|
static inline struct ureg_src
|
|
|
|
ureg_negate( struct ureg_src reg ) |
|
|
|
ureg_negate( struct ureg_src reg ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
@ -1007,7 +1007,7 @@ ureg_negate( struct ureg_src reg ) |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_abs( struct ureg_src reg ) |
|
|
|
ureg_abs( struct ureg_src reg ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
@ -1016,7 +1016,7 @@ ureg_abs( struct ureg_src reg ) |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src
|
|
|
|
static inline struct ureg_src
|
|
|
|
ureg_swizzle( struct ureg_src reg,
|
|
|
|
ureg_swizzle( struct ureg_src reg,
|
|
|
|
int x, int y, int z, int w ) |
|
|
|
int x, int y, int z, int w ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1038,13 +1038,13 @@ ureg_swizzle( struct ureg_src reg, |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_scalar( struct ureg_src reg, int x ) |
|
|
|
ureg_scalar( struct ureg_src reg, int x ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return ureg_swizzle(reg, x, x, x, x); |
|
|
|
return ureg_swizzle(reg, x, x, x, x); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_dst
|
|
|
|
static inline struct ureg_dst
|
|
|
|
ureg_writemask( struct ureg_dst reg, |
|
|
|
ureg_writemask( struct ureg_dst reg, |
|
|
|
unsigned writemask ) |
|
|
|
unsigned writemask ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1053,7 +1053,7 @@ ureg_writemask( struct ureg_dst reg, |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_dst
|
|
|
|
static inline struct ureg_dst
|
|
|
|
ureg_saturate( struct ureg_dst reg ) |
|
|
|
ureg_saturate( struct ureg_dst reg ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
@ -1061,7 +1061,7 @@ ureg_saturate( struct ureg_dst reg ) |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_dst |
|
|
|
static inline struct ureg_dst |
|
|
|
ureg_predicate(struct ureg_dst reg, |
|
|
|
ureg_predicate(struct ureg_dst reg, |
|
|
|
boolean negate, |
|
|
|
boolean negate, |
|
|
|
unsigned swizzle_x, |
|
|
|
unsigned swizzle_x, |
|
|
@ -1079,7 +1079,7 @@ ureg_predicate(struct ureg_dst reg, |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_dst
|
|
|
|
static inline struct ureg_dst
|
|
|
|
ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr ) |
|
|
|
ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
@ -1091,7 +1091,7 @@ ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr ) |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src
|
|
|
|
static inline struct ureg_src
|
|
|
|
ureg_src_indirect( struct ureg_src reg, struct ureg_src addr ) |
|
|
|
ureg_src_indirect( struct ureg_src reg, struct ureg_src addr ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
@ -1103,7 +1103,7 @@ ureg_src_indirect( struct ureg_src reg, struct ureg_src addr ) |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_src_dimension( struct ureg_src reg, int index ) |
|
|
|
ureg_src_dimension( struct ureg_src reg, int index ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
|
assert(reg.File != TGSI_FILE_NULL); |
|
|
@ -1114,7 +1114,7 @@ ureg_src_dimension( struct ureg_src reg, int index ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_src_dimension_indirect( struct ureg_src reg, struct ureg_src addr, |
|
|
|
ureg_src_dimension_indirect( struct ureg_src reg, struct ureg_src addr, |
|
|
|
int index ) |
|
|
|
int index ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1128,7 +1128,7 @@ ureg_src_dimension_indirect( struct ureg_src reg, struct ureg_src addr, |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_dst |
|
|
|
static inline struct ureg_dst |
|
|
|
ureg_dst_array_offset( struct ureg_dst reg, int offset ) |
|
|
|
ureg_dst_array_offset( struct ureg_dst reg, int offset ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert(reg.File == TGSI_FILE_TEMPORARY); |
|
|
|
assert(reg.File == TGSI_FILE_TEMPORARY); |
|
|
@ -1136,7 +1136,7 @@ ureg_dst_array_offset( struct ureg_dst reg, int offset ) |
|
|
|
return reg; |
|
|
|
return reg; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_dst |
|
|
|
static inline struct ureg_dst |
|
|
|
ureg_dst( struct ureg_src src ) |
|
|
|
ureg_dst( struct ureg_src src ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct ureg_dst dst; |
|
|
|
struct ureg_dst dst; |
|
|
@ -1164,7 +1164,7 @@ ureg_dst( struct ureg_src src ) |
|
|
|
return dst; |
|
|
|
return dst; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_src_register(unsigned file, |
|
|
|
ureg_src_register(unsigned file, |
|
|
|
unsigned index) |
|
|
|
unsigned index) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1193,7 +1193,7 @@ ureg_src_register(unsigned file, |
|
|
|
return src; |
|
|
|
return src; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_src( struct ureg_dst dst ) |
|
|
|
ureg_src( struct ureg_dst dst ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct ureg_src src; |
|
|
|
struct ureg_src src; |
|
|
@ -1223,7 +1223,7 @@ ureg_src( struct ureg_dst dst ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_dst |
|
|
|
static inline struct ureg_dst |
|
|
|
ureg_dst_undef( void ) |
|
|
|
ureg_dst_undef( void ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct ureg_dst dst; |
|
|
|
struct ureg_dst dst; |
|
|
@ -1247,7 +1247,7 @@ ureg_dst_undef( void ) |
|
|
|
return dst; |
|
|
|
return dst; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE struct ureg_src |
|
|
|
static inline struct ureg_src |
|
|
|
ureg_src_undef( void ) |
|
|
|
ureg_src_undef( void ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct ureg_src src; |
|
|
|
struct ureg_src src; |
|
|
@ -1275,13 +1275,13 @@ ureg_src_undef( void ) |
|
|
|
return src; |
|
|
|
return src; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE boolean |
|
|
|
static inline boolean |
|
|
|
ureg_src_is_undef( struct ureg_src src ) |
|
|
|
ureg_src_is_undef( struct ureg_src src ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return src.File == TGSI_FILE_NULL; |
|
|
|
return src.File == TGSI_FILE_NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static INLINE boolean |
|
|
|
static inline boolean |
|
|
|
ureg_dst_is_undef( struct ureg_dst dst ) |
|
|
|
ureg_dst_is_undef( struct ureg_dst dst ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return dst.File == TGSI_FILE_NULL; |
|
|
|
return dst.File == TGSI_FILE_NULL; |
|
|
|