From 38979d3b4dbe359d5e8d54d7d4d7512f9901a184 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 1 Jan 2025 12:48:30 +0100 Subject: [PATCH] gallium/vl: Create sampler state also when gfx is not supported This is also used by compute shaders. Cc: mesa-stable Reviewed-by: Leo Liu Part-of: --- src/gallium/auxiliary/vl/vl_compositor.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 52a36fb91e0..bcd1039aee7 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -155,14 +155,13 @@ init_pipe_state(struct vl_compositor *c) sampler.mag_img_filter = PIPE_TEX_FILTER_LINEAR; sampler.compare_mode = PIPE_TEX_COMPARE_NONE; sampler.compare_func = PIPE_FUNC_ALWAYS; + c->sampler_linear = c->pipe->create_sampler_state(c->pipe, &sampler); + + sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST; + sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST; + c->sampler_nearest = c->pipe->create_sampler_state(c->pipe, &sampler); if (c->pipe_gfx_supported) { - c->sampler_linear = c->pipe->create_sampler_state(c->pipe, &sampler); - - sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST; - c->sampler_nearest = c->pipe->create_sampler_state(c->pipe, &sampler); - memset(&blend, 0, sizeof blend); blend.independent_blend_enable = 0; blend.rt[0].blend_enable = 0;