[Mesa-dev] [PATCH 1/4] st/mesa: emit sampler view declaration in bitmap shader

Brian Paul brianp at vmware.com
Thu Mar 17 00:43:42 UTC 2016


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.
---
 src/mesa/state_tracker/st_cb_bitmap_shader.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/state_tracker/st_cb_bitmap_shader.c b/src/mesa/state_tracker/st_cb_bitmap_shader.c
index 88779bc..5c02503 100644
--- a/src/mesa/state_tracker/st_cb_bitmap_shader.c
+++ b/src/mesa/state_tracker/st_cb_bitmap_shader.c
@@ -88,6 +88,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_TEXTURE_2D, TGSI_RETURN_TYPE_FLOAT);
+
    /* TEX tmp0, fragment.texcoord[0], texture[0], 2D; */
    tgsi_transform_tex_2d_inst(tctx,
                               TGSI_FILE_TEMPORARY, 0,
-- 
1.9.1



More information about the mesa-dev mailing list