From ce6f19c4ec448cfe17ac1d4b490c6388a1c1bd9d Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Sat, 6 Apr 2019 21:06:11 +0200 Subject: [PATCH] zink: texture-rects? Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_context.c | 1 + src/gallium/drivers/zink/zink_resource.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index fd9cd6e..795dffb 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -134,6 +134,7 @@ zink_create_sampler_state(struct pipe_context *pctx, sci.mipLodBias = state->lod_bias; sci.compareOp = VK_COMPARE_OP_NEVER; // TODO sci.borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK; // TODO + sci.unnormalizedCoordinates = !state->normalized_coords; if (state->max_anisotropy > 1) { sci.maxAnisotropy = state->max_anisotropy; diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 50b7604..7f5993c 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -146,6 +146,7 @@ zink_resource_create(struct pipe_screen *pscreen, case PIPE_TEXTURE_2D_ARRAY: case PIPE_TEXTURE_CUBE: case PIPE_TEXTURE_CUBE_ARRAY: + case PIPE_TEXTURE_RECT: ici.imageType = VK_IMAGE_TYPE_2D; /* cube and 2D array needs some quirks here */ if (templ->target == PIPE_TEXTURE_CUBE) @@ -161,9 +162,6 @@ zink_resource_create(struct pipe_screen *pscreen, ici.imageType = VK_IMAGE_TYPE_3D; break; - case PIPE_TEXTURE_RECT: - unreachable("texture rects not supported"); - case PIPE_BUFFER: unreachable("PIPE_BUFFER should already be handled"); -- 2.7.4