st/mesa: Use samplers for buffer textures if requested
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>
This commit is contained in:
@@ -239,7 +239,6 @@ st_convert_sampler_from_unit(const struct st_context *st,
|
|||||||
|
|
||||||
texobj = ctx->Texture.Unit[texUnit]._Current;
|
texobj = ctx->Texture.Unit[texUnit]._Current;
|
||||||
assert(texobj);
|
assert(texobj);
|
||||||
assert(texobj->Target != GL_TEXTURE_BUFFER);
|
|
||||||
|
|
||||||
msamp = _mesa_get_samplerobj(ctx, texUnit);
|
msamp = _mesa_get_samplerobj(ctx, texUnit);
|
||||||
|
|
||||||
@@ -289,7 +288,8 @@ update_shader_samplers(struct st_context *st,
|
|||||||
* states that are NULL.
|
* states that are NULL.
|
||||||
*/
|
*/
|
||||||
if (samplers_used & 1 &&
|
if (samplers_used & 1 &&
|
||||||
ctx->Texture.Unit[tex_unit]._Current->Target != GL_TEXTURE_BUFFER) {
|
(ctx->Texture.Unit[tex_unit]._Current->Target != GL_TEXTURE_BUFFER ||
|
||||||
|
st->texture_buffer_sampler)) {
|
||||||
st_convert_sampler_from_unit(st, sampler, tex_unit);
|
st_convert_sampler_from_unit(st, sampler, tex_unit);
|
||||||
states[unit] = sampler;
|
states[unit] = sampler;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user