diff options
author | Brian Paul <[email protected]> | 2018-02-06 22:11:41 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-02-07 18:42:39 -0700 |
commit | 0f7be4fc168b757a86159a5b1aa0ec5560bfe70d (patch) | |
tree | 68ebbfa1e4f666de3173b4963f5e0fa033e35e23 /src/gallium/auxiliary/tgsi/tgsi_ureg.c | |
parent | 9f9ce1625fb32ff0b9d5b1858aa5bb7b531ded0f (diff) |
tgsi: use TGSI enum types in ureg code
v2: fix enum tgsi_interpolate_mode/loc typo.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.c | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 4f3ac97ad4d..bb7da4b074b 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -114,10 +114,10 @@ struct ureg_program 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; @@ -159,17 +159,17 @@ struct ureg_program 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; @@ -283,9 +283,9 @@ struct ureg_src 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, @@ -336,14 +336,15 @@ struct ureg_src 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); } @@ -733,11 +734,11 @@ struct ureg_src ureg_DECL_sampler( struct ureg_program *ureg, 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; @@ -768,7 +769,7 @@ ureg_DECL_sampler_view(struct ureg_program *ureg, 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) @@ -1326,7 +1327,8 @@ ureg_fixup_label(struct ureg_program *ureg, 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; @@ -1425,8 +1427,8 @@ ureg_tex_insn(struct ureg_program *ureg, 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, @@ -1574,9 +1576,9 @@ emit_decl_fs(struct ureg_program *ureg, 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) { @@ -1684,11 +1686,11 @@ emit_decl_range2D(struct ureg_program *ureg, 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); @@ -1713,7 +1715,7 @@ emit_decl_sampler_view(struct ureg_program *ureg, static void emit_decl_image(struct ureg_program *ureg, unsigned index, - unsigned target, + enum tgsi_texture_type target, unsigned format, boolean wr, boolean raw) |