aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_sampler.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_fbo.c5
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
index 17596d4c8..d1ab1ac3e 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c
@@ -163,7 +163,8 @@ update_samplers(struct st_context *st)
if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB)
sampler->normalized_coords = 1;
- sampler->lod_bias = st->ctx->Texture.Unit[su].LodBias;
+ sampler->lod_bias = st->ctx->Texture.Unit[texUnit].LodBias +
+ texobj->LodBias;
sampler->min_lod = texobj->BaseLevel + texobj->MinLod;
if (sampler->min_lod < texobj->BaseLevel)
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
index 757b9d566..0fc743a87 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
@@ -353,7 +353,7 @@ st_render_texture(struct gl_context *ctx,
return;
/* get pointer to texture image we're rendeing to */
- texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+ texImage = _mesa_get_attachment_teximage(att);
/* create new renderbuffer which wraps the texture image */
rb = st_new_renderbuffer(ctx, 0);
@@ -471,8 +471,7 @@ st_validate_attachment(struct gl_context *ctx,
return GL_FALSE;
format = stObj->pt->format;
- texFormat =
- stObj->base.Image[att->CubeMapFace][att->TextureLevel]->TexFormat;
+ texFormat = _mesa_get_attachment_teximage_const(att)->TexFormat;
/* If the encoding is sRGB and sRGB rendering cannot be enabled,
* check for linear format support instead.
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index 1b824c0de..ab0db46df 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -87,6 +87,8 @@ gl_target_to_pipe(GLenum target)
return PIPE_TEXTURE_1D_ARRAY;
case GL_TEXTURE_2D_ARRAY_EXT:
return PIPE_TEXTURE_2D_ARRAY;
+ case GL_TEXTURE_BUFFER:
+ return PIPE_BUFFER;
default:
assert(0);
return 0;
@@ -245,6 +247,7 @@ get_texture_dims(GLenum target)
switch (target) {
case GL_TEXTURE_1D:
case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_TEXTURE_BUFFER:
return 1;
case GL_TEXTURE_2D:
case GL_TEXTURE_CUBE_MAP_ARB: