GLint width,
GLint height,
GLint depth,
- GLfloat coords0[3],
- GLfloat coords1[3],
- GLfloat coords2[3],
- GLfloat coords3[3])
+ GLfloat coords0[4],
+ GLfloat coords1[4],
+ GLfloat coords2[4],
+ GLfloat coords3[4])
{
static const GLfloat st[4][2] = {
{0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f}
GLuint i;
GLfloat r;
+ /* Currently all texture targets want the W component to be 1.0.
+ */
+ coords0[3] = 1.0F;
+ coords1[3] = 1.0F;
+ coords2[3] = 1.0F;
+ coords3[3] = 1.0F;
+
switch (faceTarget) {
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
setup_ff_generate_mipmap(struct gen_mipmap_state *mipmap)
{
struct vertex {
- GLfloat x, y, tex[3];
+ GLfloat x, y, z, tex[4];
};
if (mipmap->VAO == 0) {
GLenum target)
{
struct vertex {
- GLfloat x, y, tex[3];
+ GLfloat x, y, z, tex[4];
};
struct glsl_sampler *sampler;
const char *vs_source;
{
struct gen_mipmap_state *mipmap = &ctx->Meta->Mipmap;
struct vertex {
- GLfloat x, y, tex[3];
+ GLfloat x, y, z, tex[4];
};
struct vertex verts[4];
const GLuint baseLevel = texObj->BaseLevel;
else
assert(!genMipmapSave);
+ /* Silence valgrind warnings about reading uninitialized stack. */
+ memset(verts, 0, sizeof(verts));
+
/* Setup texture coordinates */
setup_texture_coords(faceTarget,
slice,
const GLenum target = texObj->Target;
GLenum faceTarget;
struct vertex {
- GLfloat x, y, tex[3];
+ GLfloat x, y, z, tex[4];
};
struct vertex verts[4];
GLuint fboDrawSave, fboReadSave;
_mesa_BindSampler(ctx->Texture.CurrentUnit, decompress->Sampler);
}
+ /* Silence valgrind warnings about reading uninitialized stack. */
+ memset(verts, 0, sizeof(verts));
+
setup_texture_coords(faceTarget, slice, width, height, depth,
verts[0].tex,
verts[1].tex,