summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-04-04 11:20:44 -0600
committerBrian Paul <[email protected]>2008-04-04 11:20:44 -0600
commit72f2c55069f167a46560005931382e3b472f92ed (patch)
tree44627d1e5bad778086872a1def2817b4bcb78877 /src/mesa/state_tracker
parent84501e68f6294370d6f2f6aec4e7eab57bcc0e72 (diff)
gallium: make sure to set the SamplersUsed field for bitmap/drawpixels shaders
Also, make sure that field is copied/updated in the program clone and combine functions. Without this we weren't getting SAMP declarations in the TGSI shaders.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c1
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c1
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 1e3effd5491..6410e7cb24d 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -130,6 +130,7 @@ get_pixel_transfer_program(GLcontext *ctx, const struct state_key *key)
ic++;
fp->Base.InputsRead = (1 << FRAG_ATTRIB_TEX0);
fp->Base.OutputsWritten = (1 << FRAG_RESULT_COLR);
+ fp->Base.SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
/* MAD colorTemp, colorTemp, scale, bias; */
if (key->scaleAndBias) {
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 0872f2bd28a..59f3c385df3 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -148,6 +148,7 @@ make_bitmap_fragment_program(GLcontext *ctx)
p->InputsRead = FRAG_BIT_TEX0;
p->OutputsWritten = 0x0;
+ p->SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
stfp = (struct st_fragment_program *) p;
stfp->Base.UsesKill = GL_TRUE;
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index c7796cfb6aa..c57e05312a9 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -212,6 +212,7 @@ make_fragment_shader_z(struct st_context *st)
p->InputsRead = FRAG_BIT_TEX0 | FRAG_BIT_COL0;
p->OutputsWritten = (1 << FRAG_RESULT_COLR) | (1 << FRAG_RESULT_DEPR);
+ p->SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
stfp = (struct st_fragment_program *) p;
st_translate_fragment_program(st, stfp, NULL);