intel: Add support for ARB_sampler_objects.

This extension support consists of replacing
"gl_texture_obj->Sampler." with "_mesa_get_samplerobj(ctx, unit)->".
One instance of referencing the texture's base sampler remains in the
initial miptree allocation, where I'm not sure we have a clear
association with any texture unit.

Tested with piglit ARB_sampler_objects/sampler-objects.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Eric Anholt
2011-04-20 11:48:31 -07:00
parent 1df72402d9
commit 1f32c665c8
13 changed files with 99 additions and 80 deletions

View File

@@ -33,6 +33,8 @@
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/samplerobj.h"
#include "program/prog_instruction.h"
#include "st_context.h"
@@ -209,7 +211,7 @@ update_textures(struct st_context *st)
else
texUnit = vprog->Base.SamplerUnits[su];
samp = st_get_mesa_sampler(st->ctx, texUnit);
samp = _mesa_get_samplerobj(st->ctx, texUnit);
texObj = st->ctx->Texture.Unit[texUnit]._Current;