[Mesa-dev] [PATCH 06/11] st/mesa: fix handling the fallback texture
Miklós Máté
mtmkls at gmail.com
Tue Dec 15 15:05:39 PST 2015
---
src/mesa/state_tracker/st_atom_sampler.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 4252c27..7d3d8e7 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -131,7 +131,7 @@ convert_sampler(struct st_context *st,
struct pipe_sampler_state *sampler,
GLuint texUnit)
{
- const struct gl_texture_object *texobj;
+ struct gl_texture_object *texobj;
struct gl_context *ctx = st->ctx;
struct gl_sampler_object *msamp;
GLenum texBaseFormat;
@@ -144,6 +144,10 @@ convert_sampler(struct st_context *st,
texBaseFormat = _mesa_texture_base_format(texobj);
msamp = _mesa_get_samplerobj(ctx, texUnit);
+ if (!msamp) {
+ /* handle the fallback texture */
+ msamp = &texobj->Sampler;
+ }
memset(sampler, 0, sizeof(*sampler));
sampler->wrap_s = gl_wrap_xlate(msamp->WrapS);
--
2.6.4
More information about the mesa-dev
mailing list