vk/0.130: Remove VkImageViewCreateInfo::minLod
authorChad Versace <chad.versace@intel.com>
Wed, 8 Jul 2015 21:39:05 +0000 (14:39 -0700)
committerChad Versace <chad.versace@intel.com>
Wed, 8 Jul 2015 21:48:22 +0000 (14:48 -0700)
It's now set solely through VkSampler.

include/vulkan/vulkan.h
src/vulkan/image.c
src/vulkan/meta.c

index 9dfd6571f0b4ecadddb10d7df1934c359fe7b45b..fd226c5570aa68f5e04a066650a3d7ed773e1387 100644 (file)
@@ -1348,7 +1348,6 @@ typedef struct {
     VkFormat                                    format;
     VkChannelMapping                            channels;
     VkImageSubresourceRange                     subresourceRange;
-    float                                       minLod;
 } VkImageViewCreateInfo;
 
 typedef struct {
index 33ce8151fe90077db0f9f39fc6b78c824ec42922..70d7c5321d5e7be8701e4049c0aa44cbd3ddd557 100644 (file)
@@ -402,7 +402,13 @@ anv_image_view_init(struct anv_surface_view *view,
       .SamplerL2BypassModeDisable = true,
       .RenderCacheReadWriteMode = WriteOnlyCache,
       .MemoryObjectControlState = GEN8_MOCS,
-      .BaseMipLevel = (float) pCreateInfo->minLod,
+
+      /* The driver sets BaseMipLevel in SAMPLER_STATE, not here in
+       * RENDER_SURFACE_STATE. The Broadwell PRM says "it is illegal to have
+       * both Base Mip Level fields nonzero".
+       */
+      .BaseMipLevel = 0.0,
+
       .SurfaceQPitch = surface->qpitch >> 2,
       .Height = image->extent.height - 1,
       .Width = image->extent.width - 1,
@@ -493,8 +499,6 @@ anv_validate_CreateImageView(VkDevice _device,
    assert(subresource->baseMipLevel + subresource->mipLevels <= image->levels);
    assert(subresource->baseArraySlice < image->array_size);
    assert(subresource->baseArraySlice + subresource->arraySize <= image->array_size);
-   assert(pCreateInfo->minLod >= 0);
-   assert(pCreateInfo->minLod < image->levels);
    assert(pView);
 
    if (view_info->is_cube) {
@@ -605,7 +609,13 @@ anv_color_attachment_view_init(struct anv_surface_view *view,
       .SamplerL2BypassModeDisable = true,
       .RenderCacheReadWriteMode = WriteOnlyCache,
       .MemoryObjectControlState = GEN8_MOCS,
+
+      /* The driver sets BaseMipLevel in SAMPLER_STATE, not here in
+       * RENDER_SURFACE_STATE. The Broadwell PRM says "it is illegal to have
+       * both Base Mip Level fields nonzero".
+       */
       .BaseMipLevel = 0.0,
+
       .SurfaceQPitch = surface->qpitch >> 2,
       .Height = image->extent.height - 1,
       .Width = image->extent.width - 1,
index 60f263d3d8ff3399656be79b6f68193878443efc..c89373f3316b56bead3a18d632cc4dead4f3dba0 100644 (file)
@@ -746,7 +746,6 @@ do_buffer_copy(struct anv_cmd_buffer *cmd_buffer,
             .baseArraySlice = 0,
             .arraySize = 1
          },
-         .minLod = 0
       },
       cmd_buffer);
 
@@ -887,7 +886,6 @@ void anv_CmdCopyImage(
                .baseArraySlice = pRegions[r].srcSubresource.arraySlice,
                .arraySize = 1
             },
-            .minLod = 0
          },
          cmd_buffer);
 
@@ -956,7 +954,6 @@ void anv_CmdBlitImage(
                .baseArraySlice = pRegions[r].srcSubresource.arraySlice,
                .arraySize = 1
             },
-            .minLod = 0
          },
          cmd_buffer);
 
@@ -1051,7 +1048,6 @@ void anv_CmdCopyBufferToImage(
                .baseArraySlice = 0,
                .arraySize = 1
             },
-            .minLod = 0
          },
          cmd_buffer);
 
@@ -1123,7 +1119,6 @@ void anv_CmdCopyImageToBuffer(
                .baseArraySlice = pRegions[r].imageSubresource.arraySlice,
                .arraySize = 1
             },
-            .minLod = 0
          },
          cmd_buffer);