struct {
unsigned semantic_name;
unsigned semantic_index;
- unsigned interp;
+ enum tgsi_interpolate_mode interp;
unsigned char cylindrical_wrap;
unsigned char usage_mask;
- unsigned interp_location;
+ enum tgsi_interpolate_loc interp_location;
unsigned first;
unsigned last;
unsigned array_id;
struct {
unsigned index;
- unsigned target;
- unsigned return_type_x;
- unsigned return_type_y;
- unsigned return_type_z;
- unsigned return_type_w;
+ enum tgsi_texture_type target;
+ enum tgsi_return_type return_type_x;
+ enum tgsi_return_type return_type_y;
+ enum tgsi_return_type return_type_z;
+ enum tgsi_return_type return_type_w;
} sampler_view[PIPE_MAX_SHADER_SAMPLER_VIEWS];
unsigned nr_sampler_views;
struct {
unsigned index;
- unsigned target;
+ enum tgsi_texture_type target;
unsigned format;
boolean wr;
boolean raw;
ureg_DECL_fs_input_cyl_centroid_layout(struct ureg_program *ureg,
unsigned semantic_name,
unsigned semantic_index,
- unsigned interp_mode,
+ enum tgsi_interpolate_mode interp_mode,
unsigned cylindrical_wrap,
- unsigned interp_location,
+ enum tgsi_interpolate_loc interp_location,
unsigned index,
unsigned usage_mask,
unsigned array_id,
ureg_DECL_fs_input_cyl_centroid(struct ureg_program *ureg,
unsigned semantic_name,
unsigned semantic_index,
- unsigned interp_mode,
+ enum tgsi_interpolate_mode interp_mode,
unsigned cylindrical_wrap,
- unsigned interp_location,
+ enum tgsi_interpolate_loc interp_location,
unsigned array_id,
unsigned array_size)
{
return ureg_DECL_fs_input_cyl_centroid_layout(ureg,
- semantic_name, semantic_index, interp_mode, cylindrical_wrap, interp_location,
+ semantic_name, semantic_index, interp_mode,
+ cylindrical_wrap, interp_location,
ureg->nr_input_regs, TGSI_WRITEMASK_XYZW, array_id, array_size);
}
struct ureg_src
ureg_DECL_sampler_view(struct ureg_program *ureg,
unsigned index,
- unsigned target,
- unsigned return_type_x,
- unsigned return_type_y,
- unsigned return_type_z,
- unsigned return_type_w)
+ enum tgsi_texture_type target,
+ enum tgsi_return_type return_type_x,
+ enum tgsi_return_type return_type_y,
+ enum tgsi_return_type return_type_z,
+ enum tgsi_return_type return_type_w)
{
struct ureg_src reg = ureg_src_register(TGSI_FILE_SAMPLER_VIEW, index);
uint i;
struct ureg_src
ureg_DECL_image(struct ureg_program *ureg,
unsigned index,
- unsigned target,
+ enum tgsi_texture_type target,
unsigned format,
boolean wr,
boolean raw)
void
ureg_emit_texture(struct ureg_program *ureg,
unsigned extended_token,
- unsigned target, unsigned return_type, unsigned num_offsets)
+ enum tgsi_texture_type target,
+ enum tgsi_return_type return_type, unsigned num_offsets)
{
union tgsi_any_token *out, *insn;
unsigned opcode,
const struct ureg_dst *dst,
unsigned nr_dst,
- unsigned target,
- unsigned return_type,
+ enum tgsi_texture_type target,
+ enum tgsi_return_type return_type,
const struct tgsi_texture_offset *texoffsets,
unsigned nr_offset,
const struct ureg_src *src,
unsigned last,
unsigned semantic_name,
unsigned semantic_index,
- unsigned interpolate,
+ enum tgsi_interpolate_mode interpolate,
unsigned cylindrical_wrap,
- unsigned interpolate_location,
+ enum tgsi_interpolate_loc interpolate_location,
unsigned array_id,
unsigned usage_mask)
{
static void
emit_decl_sampler_view(struct ureg_program *ureg,
unsigned index,
- unsigned target,
- unsigned return_type_x,
- unsigned return_type_y,
- unsigned return_type_z,
- unsigned return_type_w )
+ enum tgsi_texture_type target,
+ enum tgsi_return_type return_type_x,
+ enum tgsi_return_type return_type_y,
+ enum tgsi_return_type return_type_z,
+ enum tgsi_return_type return_type_w )
{
union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3);
static void
emit_decl_image(struct ureg_program *ureg,
unsigned index,
- unsigned target,
+ enum tgsi_texture_type target,
unsigned format,
boolean wr,
boolean raw)
ureg_DECL_fs_input_cyl_centroid_layout(struct ureg_program *,
unsigned semantic_name,
unsigned semantic_index,
- unsigned interp_mode,
+ enum tgsi_interpolate_mode interp_mode,
unsigned cylindrical_wrap,
- unsigned interp_location,
+ enum tgsi_interpolate_loc interp_location,
unsigned index,
unsigned usage_mask,
unsigned array_id,
ureg_DECL_fs_input_cyl_centroid(struct ureg_program *,
unsigned semantic_name,
unsigned semantic_index,
- unsigned interp_mode,
+ enum tgsi_interpolate_mode interp_mode,
unsigned cylindrical_wrap,
- unsigned interp_location,
+ enum tgsi_interpolate_loc interp_location,
unsigned array_id,
unsigned array_size);
ureg_DECL_fs_input_cyl(struct ureg_program *ureg,
unsigned semantic_name,
unsigned semantic_index,
- unsigned interp_mode,
+ enum tgsi_interpolate_mode interp_mode,
unsigned cylindrical_wrap)
{
return ureg_DECL_fs_input_cyl_centroid(ureg,
semantic_index,
interp_mode,
cylindrical_wrap,
- 0, 0, 1);
+ TGSI_INTERPOLATE_LOC_CENTER, 0, 1);
}
static inline struct ureg_src
ureg_DECL_fs_input(struct ureg_program *ureg,
unsigned semantic_name,
unsigned semantic_index,
- unsigned interp_mode)
+ enum tgsi_interpolate_mode interp_mode)
{
return ureg_DECL_fs_input_cyl_centroid(ureg,
semantic_name,
semantic_index,
interp_mode,
- 0, 0, 0, 1);
+ 0, TGSI_INTERPOLATE_LOC_CENTER, 0, 1);
}
struct ureg_src
struct ureg_src
ureg_DECL_sampler_view(struct ureg_program *,
unsigned index,
- unsigned target,
- unsigned return_type_x,
- unsigned return_type_y,
- unsigned return_type_z,
- unsigned return_type_w );
+ enum tgsi_texture_type target,
+ enum tgsi_return_type return_type_x,
+ enum tgsi_return_type return_type_y,
+ enum tgsi_return_type return_type_z,
+ enum tgsi_return_type return_type_w );
struct ureg_src
ureg_DECL_image(struct ureg_program *ureg,
unsigned index,
- unsigned target,
+ enum tgsi_texture_type target,
unsigned format,
boolean wr,
boolean raw);
unsigned opcode,
const struct ureg_dst *dst,
unsigned nr_dst,
- unsigned target,
- unsigned return_type,
+ enum tgsi_texture_type target,
+ enum tgsi_return_type return_type,
const struct tgsi_texture_offset *texoffsets,
unsigned nr_offset,
const struct ureg_src *src,
void
ureg_emit_texture(struct ureg_program *ureg,
unsigned insn_token,
- unsigned target, unsigned return_type, unsigned num_offsets);
+ enum tgsi_texture_type target,
+ enum tgsi_return_type return_type,
+ unsigned num_offsets);
void
ureg_emit_texture_offset(struct ureg_program *ureg,
#define OP12_TEX( op ) \
static inline void ureg_##op( struct ureg_program *ureg, \
struct ureg_dst dst, \
- unsigned target, \
+ enum tgsi_texture_type target, \
struct ureg_src src0, \
struct ureg_src src1 ) \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
- unsigned return_type = TGSI_RETURN_TYPE_UNKNOWN; \
+ enum tgsi_return_type return_type = TGSI_RETURN_TYPE_UNKNOWN; \
struct ureg_emit_insn_result insn; \
if (ureg_dst_is_empty(dst)) \
return; \
#define OP14_TEX( op ) \
static inline void ureg_##op( struct ureg_program *ureg, \
struct ureg_dst dst, \
- unsigned target, \
+ enum tgsi_texture_type target, \
struct ureg_src src0, \
struct ureg_src src1, \
struct ureg_src src2, \
struct ureg_src src3 ) \
{ \
unsigned opcode = TGSI_OPCODE_##op; \
- unsigned return_type = TGSI_RETURN_TYPE_UNKNOWN; \
+ enum tgsi_return_type return_type = TGSI_RETURN_TYPE_UNKNOWN; \
struct ureg_emit_insn_result insn; \
if (ureg_dst_is_empty(dst)) \
return; \