summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-03-16 18:43:00 -0600
committerBrian Paul <brianp@vmware.com>2016-03-21 11:59:25 -0600
commit0f0a23d4d874a2b51a07741c11fb81f246e5298c (patch)
treea86e230f5bf066ca87afe293c12d41b225220d67 /src/mesa/state_tracker
parent72eb5a3cfe29eabdd0a2386642b36f9648a911fc (diff)
downloadexternal_mesa3d-0f0a23d4d874a2b51a07741c11fb81f246e5298c.zip
external_mesa3d-0f0a23d4d874a2b51a07741c11fb81f246e5298c.tar.gz
external_mesa3d-0f0a23d4d874a2b51a07741c11fb81f246e5298c.tar.bz2
st/mesa: emit sampler view declaration in bitmap shader
In June 2015, Rob Clark started updating the tgsi utility code to emit SVIEW declarations in various shaders (for polygon stipple, blitting, etc). These patches do the same for the Mesa state tracker. The VMware driver will use this. v2: support both TGSI_TEXTURE_2D and _RECT Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap_shader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap_shader.c b/src/mesa/state_tracker/st_cb_bitmap_shader.c
index a0b9be3..7ce078d 100644
--- a/src/mesa/state_tracker/st_cb_bitmap_shader.c
+++ b/src/mesa/state_tracker/st_cb_bitmap_shader.c
@@ -91,6 +91,10 @@ transform_instr(struct tgsi_transform_context *tctx,
/* Declare the sampler. */
tgsi_transform_sampler_decl(tctx, ctx->sampler_index);
+ /* Declare the sampler view. */
+ tgsi_transform_sampler_view_decl(tctx, ctx->sampler_index,
+ tgsi_tex_target, TGSI_RETURN_TYPE_FLOAT);
+
/* TEX tmp0, fragment.texcoord[0], texture[0], 2D; */
tgsi_transform_tex_inst(tctx,
TGSI_FILE_TEMPORARY, 0,