From: Chad Versace Date: Wed, 8 Jul 2015 21:39:05 +0000 (-0700) Subject: vk/0.130: Remove VkImageViewCreateInfo::minLod X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fcb32a17df153c6bf696c8812d33c932f889b65;p=mesa.git vk/0.130: Remove VkImageViewCreateInfo::minLod It's now set solely through VkSampler. --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 9dfd6571f0b..fd226c5570a 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -1348,7 +1348,6 @@ typedef struct { VkFormat format; VkChannelMapping channels; VkImageSubresourceRange subresourceRange; - float minLod; } VkImageViewCreateInfo; typedef struct { diff --git a/src/vulkan/image.c b/src/vulkan/image.c index 33ce8151fe9..70d7c5321d5 100644 --- a/src/vulkan/image.c +++ b/src/vulkan/image.c @@ -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, diff --git a/src/vulkan/meta.c b/src/vulkan/meta.c index 60f263d3d8f..c89373f3316 100644 --- a/src/vulkan/meta.c +++ b/src/vulkan/meta.c @@ -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);