summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c8
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c5
2 files changed, 3 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 661e0f268e3..d67b2fcab4f 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -137,13 +137,9 @@ convert_sampler(struct st_context *st,
GLenum texBaseFormat;
texobj = ctx->Texture.Unit[texUnit]._Current;
- if (!texobj) {
- texobj = _mesa_get_fallback_texture(ctx, TEXTURE_2D_INDEX);
- msamp = &texobj->Sampler;
- } else {
- msamp = _mesa_get_samplerobj(ctx, texUnit);
- }
+ assert(texobj);
+ msamp = _mesa_get_samplerobj(ctx, texUnit);
texBaseFormat = _mesa_texture_base_format(texobj);
memset(sampler, 0, sizeof(*sampler));
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index 5b481ec4344..fa4b6448ea4 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -66,11 +66,8 @@ update_single_texture(struct st_context *st,
samp = _mesa_get_samplerobj(ctx, texUnit);
texObj = ctx->Texture.Unit[texUnit]._Current;
+ assert(texObj);
- if (!texObj) {
- texObj = _mesa_get_fallback_texture(ctx, TEXTURE_2D_INDEX);
- samp = &texObj->Sampler;
- }
stObj = st_texture_object(texObj);
retval = st_finalize_texture(ctx, st->pipe, texObj, 0);