mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
zink: support samplers with unnormalized_coords
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
This commit is contained in:
parent
a6e9e0f0d7
commit
a10828f886
1 changed files with 5 additions and 1 deletions
|
|
@ -392,6 +392,7 @@ zink_create_sampler_state(struct pipe_context *pctx,
|
|||
const struct pipe_sampler_state *state)
|
||||
{
|
||||
struct zink_screen *screen = zink_screen(pctx->screen);
|
||||
struct zink_context *zink = zink_context(pctx);
|
||||
bool need_custom = false;
|
||||
bool need_clamped_border_color = false;
|
||||
VkSamplerCreateInfo sci = {0};
|
||||
|
|
@ -400,7 +401,10 @@ zink_create_sampler_state(struct pipe_context *pctx,
|
|||
sci.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
|
||||
if (screen->info.have_EXT_non_seamless_cube_map && !state->seamless_cube_map)
|
||||
sci.flags |= VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT;
|
||||
assert(!state->unnormalized_coords);
|
||||
if (state->unnormalized_coords) {
|
||||
assert(zink->flags & PIPE_CONTEXT_COMPUTE_ONLY);
|
||||
sci.unnormalizedCoordinates = state->unnormalized_coords;
|
||||
}
|
||||
sci.magFilter = zink_filter(state->mag_img_filter);
|
||||
if (sci.unnormalizedCoordinates)
|
||||
sci.minFilter = sci.magFilter;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue