Looks good.
For series, Reviewed-by: Neha Bhende<bhen...@vmware.com> Regards, Neha ________________________________ From: Brian Paul <bri...@vmware.com> Sent: Friday, July 27, 2018 12:07:50 PM To: mesa-dev@lists.freedesktop.org Cc: Charmaine Lee; Neha Bhende Subject: [PATCH 2/2] swrast: fix crash in AA line code when there's no texture Fixes a crash running the Piglit polygon-mode-facing test (and probably others). --- src/mesa/swrast/s_aalinetemp.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index bebb131..64767a3 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -179,10 +179,12 @@ NAME(line)(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1) if (attr >= VARYING_SLOT_TEX0 && attr < VARYING_SLOT_VAR0) { const GLuint u = attr - VARYING_SLOT_TEX0; const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; - const struct gl_texture_image *texImage = - _mesa_base_tex_image(obj); - line.texWidth[attr] = (GLfloat) texImage->Width; - line.texHeight[attr] = (GLfloat) texImage->Height; + if (obj) { + const struct gl_texture_image *texImage = + _mesa_base_tex_image(obj); + line.texWidth[attr] = (GLfloat) texImage->Width; + line.texHeight[attr] = (GLfloat) texImage->Height; + } } ATTRIB_LOOP_END } -- 2.7.4
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev