summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965simple/brw_wm_sampler_state.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-03-05 10:50:14 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-03-05 10:56:49 +0100
commit4528287e040415c2071012d02f20979ff995c754 (patch)
tree9fbbd0d785c4e9a45ff7c53a8254312bd5ff7bb6 /src/gallium/drivers/i965simple/brw_wm_sampler_state.c
parentb1922de9f3478869c6788ef4e954c06c20e7aa9c (diff)
gallium: michel's patch to rework texture/sampler binding interface
Bind all the samplers/textures at once rather than piecemeal. This is easier for drivers to understand.
Diffstat (limited to 'src/gallium/drivers/i965simple/brw_wm_sampler_state.c')
-rw-r--r--src/gallium/drivers/i965simple/brw_wm_sampler_state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/i965simple/brw_wm_sampler_state.c b/src/gallium/drivers/i965simple/brw_wm_sampler_state.c
index de42ffc5b1..ff5ba7e7c7 100644
--- a/src/gallium/drivers/i965simple/brw_wm_sampler_state.c
+++ b/src/gallium/drivers/i965simple/brw_wm_sampler_state.c
@@ -235,7 +235,8 @@ static void upload_wm_samplers(struct brw_context *brw)
unsigned sampler_count = 0;
/* BRW_NEW_SAMPLER */
- for (unit = 0; unit < BRW_MAX_TEX_UNIT; unit++) {
+ for (unit = 0; unit < brw->num_textures && unit < brw->num_samplers;
+ unit++) {
/* determine unit enable/disable by looking for a bound texture */
if (brw->attribs.Texture[unit]) {
const struct pipe_sampler_state *sampler = brw->attribs.Samplers[unit];