mesa: update GL_CLAMP emulation when binding/unbinding textures
binding/unbinding a texture affects the previously specified parameters,
so ensure the driver flag for clamp emulation is also set to perform
updates as needed
Fixes: e8f71f6ac4
("mesa/st: add PIPE_CAP_GL_CLAMP")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
This commit is contained in:
parent
068239dad0
commit
3ff058ed0b
|
@ -1619,6 +1619,14 @@ bind_texture_object(struct gl_context *ctx, unsigned unit,
|
|||
*/
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE_OBJECT, GL_TEXTURE_BIT);
|
||||
|
||||
/* if the previously bound texture uses GL_CLAMP, flag the driver here
|
||||
* to ensure any emulation is disabled
|
||||
*/
|
||||
if (texUnit->CurrentTex[targetIndex] &&
|
||||
texUnit->CurrentTex[targetIndex]->Sampler.glclamp_mask !=
|
||||
texObj->Sampler.glclamp_mask)
|
||||
ctx->NewDriverState |= ctx->DriverFlags.NewSamplersWithClamp;
|
||||
|
||||
/* If the refcount on the previously bound texture is decremented to
|
||||
* zero, it'll be deleted here.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue