summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-03-18 12:11:39 -0600
committerBrian Paul <[email protected]>2016-03-21 11:59:25 -0600
commit63e020d734faa224dae576e2883ef39d8827fcad (patch)
tree1d9777a3869e0a8720b69a6d293a7287269719bf /src/mesa/state_tracker
parenta8b315b8271e867db30650dedb52e53d8dd9667c (diff)
gallium/tgsi: pass TGSI tex target to tgsi_transform_tex_inst()
Instead of hard-coded 2D tex target in tgsi_transform_tex_2d_inst() Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap_shader.c8
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels_shader.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap_shader.c b/src/mesa/state_tracker/st_cb_bitmap_shader.c
index 88779bc627d..42aa0337af9 100644
--- a/src/mesa/state_tracker/st_cb_bitmap_shader.c
+++ b/src/mesa/state_tracker/st_cb_bitmap_shader.c
@@ -89,10 +89,10 @@ transform_instr(struct tgsi_transform_context *tctx,
tgsi_transform_sampler_decl(tctx, ctx->sampler_index);
/* TEX tmp0, fragment.texcoord[0], texture[0], 2D; */
- tgsi_transform_tex_2d_inst(tctx,
- TGSI_FILE_TEMPORARY, 0,
- TGSI_FILE_INPUT, texcoord_index,
- ctx->sampler_index);
+ tgsi_transform_tex_inst(tctx,
+ TGSI_FILE_TEMPORARY, 0,
+ TGSI_FILE_INPUT, texcoord_index,
+ TGSI_TEXTURE_2D, ctx->sampler_index);
/* KIL if -tmp0 < 0 # texel=0 -> keep / texel=0 -> discard */
inst = tgsi_default_full_instruction();
diff --git a/src/mesa/state_tracker/st_cb_drawpixels_shader.c b/src/mesa/state_tracker/st_cb_drawpixels_shader.c
index 2cf75f8bd77..2170850151d 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels_shader.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels_shader.c
@@ -129,9 +129,9 @@ transform_instr(struct tgsi_transform_context *tctx,
/* Get initial pixel color from the texture.
* TEX temp, fragment.texcoord[0], texture[0], 2D;
*/
- tgsi_transform_tex_2d_inst(tctx, TGSI_FILE_TEMPORARY, ctx->color_temp,
- TGSI_FILE_INPUT, texcoord_index,
- ctx->drawpix_sampler);
+ tgsi_transform_tex_inst(tctx, TGSI_FILE_TEMPORARY, ctx->color_temp,
+ TGSI_FILE_INPUT, texcoord_index,
+ TGSI_TEXTURE_2D, ctx->drawpix_sampler);
/* Apply the scale and bias. */
if (ctx->scale_and_bias) {