Skip to content

Commit e777076

Browse files
nowrepdcbaker-intel
authored andcommitted
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 <[email protected]> (cherry picked from commit 38979d3) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
1 parent 798cb57 commit e777076

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.pick_status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@
10741074
"description": "gallium/vl: Create sampler state also when gfx is not supported",
10751075
"nominated": true,
10761076
"nomination_type": 1,
1077-
"resolution": 0,
1077+
"resolution": 1,
10781078
"main_sha": null,
10791079
"because_sha": null,
10801080
"notes": null

src/gallium/auxiliary/vl/vl_compositor.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,13 @@ init_pipe_state(struct vl_compositor *c)
155155
sampler.mag_img_filter = PIPE_TEX_FILTER_LINEAR;
156156
sampler.compare_mode = PIPE_TEX_COMPARE_NONE;
157157
sampler.compare_func = PIPE_FUNC_ALWAYS;
158+
c->sampler_linear = c->pipe->create_sampler_state(c->pipe, &sampler);
158159

159-
if (c->pipe_gfx_supported) {
160-
c->sampler_linear = c->pipe->create_sampler_state(c->pipe, &sampler);
161-
162-
sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
163-
sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
164-
c->sampler_nearest = c->pipe->create_sampler_state(c->pipe, &sampler);
160+
sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST;
161+
sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST;
162+
c->sampler_nearest = c->pipe->create_sampler_state(c->pipe, &sampler);
165163

164+
if (c->pipe_gfx_supported) {
166165
memset(&blend, 0, sizeof blend);
167166
blend.independent_blend_enable = 0;
168167
blend.rt[0].blend_enable = 0;

0 commit comments

Comments
 (0)