st/mesa: use new _mesa_base_tex_image() helper
This involved adding a new st_texture_image_const() helper also. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "main/mtypes.h"
|
||||
#include "main/glformats.h"
|
||||
#include "main/samplerobj.h"
|
||||
#include "main/teximage.h"
|
||||
#include "main/texobj.h"
|
||||
|
||||
#include "st_context.h"
|
||||
@@ -141,7 +142,7 @@ convert_sampler(struct st_context *st,
|
||||
texobj = _mesa_get_fallback_texture(ctx, TEXTURE_2D_INDEX);
|
||||
}
|
||||
|
||||
teximg = texobj->Image[0][texobj->BaseLevel];
|
||||
teximg = _mesa_base_tex_image_const(texobj);
|
||||
texBaseFormat = teximg ? teximg->_BaseFormat : GL_RGBA;
|
||||
|
||||
msamp = _mesa_get_samplerobj(ctx, texUnit);
|
||||
|
Reference in New Issue
Block a user