zink: texture-rects?
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Sat, 6 Apr 2019 19:06:11 +0000 (21:06 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:44 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/zink_context.c
src/gallium/drivers/zink/zink_resource.c

index fd9cd6e3717a339b58092d127d7b3ee5faef8b74..795dffb36a6a8c8008b7087b66924db27edde27a 100644 (file)
@@ -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;
index 50b7604a891a60fd1d5985a94cf5985c1b107d15..7f5993cc4c25efb2bd2fb9517763fb24bac6f9df 100644 (file)
@@ -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");