vk/0.130: Remove VkImageViewCreateInfo::minLod

It's now set solely through VkSampler.
This commit is contained in:
Chad Versace
2015-07-08 14:39:05 -07:00
parent 367b9ba78f
commit 4fcb32a17d
3 changed files with 13 additions and 9 deletions

View File

@@ -1348,7 +1348,6 @@ typedef struct {
VkFormat format; VkFormat format;
VkChannelMapping channels; VkChannelMapping channels;
VkImageSubresourceRange subresourceRange; VkImageSubresourceRange subresourceRange;
float minLod;
} VkImageViewCreateInfo; } VkImageViewCreateInfo;
typedef struct { typedef struct {

View File

@@ -402,7 +402,13 @@ anv_image_view_init(struct anv_surface_view *view,
.SamplerL2BypassModeDisable = true, .SamplerL2BypassModeDisable = true,
.RenderCacheReadWriteMode = WriteOnlyCache, .RenderCacheReadWriteMode = WriteOnlyCache,
.MemoryObjectControlState = GEN8_MOCS, .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, .SurfaceQPitch = surface->qpitch >> 2,
.Height = image->extent.height - 1, .Height = image->extent.height - 1,
.Width = image->extent.width - 1, .Width = image->extent.width - 1,
@@ -493,8 +499,6 @@ anv_validate_CreateImageView(VkDevice _device,
assert(subresource->baseMipLevel + subresource->mipLevels <= image->levels); assert(subresource->baseMipLevel + subresource->mipLevels <= image->levels);
assert(subresource->baseArraySlice < image->array_size); assert(subresource->baseArraySlice < image->array_size);
assert(subresource->baseArraySlice + subresource->arraySize <= image->array_size); assert(subresource->baseArraySlice + subresource->arraySize <= image->array_size);
assert(pCreateInfo->minLod >= 0);
assert(pCreateInfo->minLod < image->levels);
assert(pView); assert(pView);
if (view_info->is_cube) { if (view_info->is_cube) {
@@ -605,7 +609,13 @@ anv_color_attachment_view_init(struct anv_surface_view *view,
.SamplerL2BypassModeDisable = true, .SamplerL2BypassModeDisable = true,
.RenderCacheReadWriteMode = WriteOnlyCache, .RenderCacheReadWriteMode = WriteOnlyCache,
.MemoryObjectControlState = GEN8_MOCS, .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, .BaseMipLevel = 0.0,
.SurfaceQPitch = surface->qpitch >> 2, .SurfaceQPitch = surface->qpitch >> 2,
.Height = image->extent.height - 1, .Height = image->extent.height - 1,
.Width = image->extent.width - 1, .Width = image->extent.width - 1,

View File

@@ -746,7 +746,6 @@ do_buffer_copy(struct anv_cmd_buffer *cmd_buffer,
.baseArraySlice = 0, .baseArraySlice = 0,
.arraySize = 1 .arraySize = 1
}, },
.minLod = 0
}, },
cmd_buffer); cmd_buffer);
@@ -887,7 +886,6 @@ void anv_CmdCopyImage(
.baseArraySlice = pRegions[r].srcSubresource.arraySlice, .baseArraySlice = pRegions[r].srcSubresource.arraySlice,
.arraySize = 1 .arraySize = 1
}, },
.minLod = 0
}, },
cmd_buffer); cmd_buffer);
@@ -956,7 +954,6 @@ void anv_CmdBlitImage(
.baseArraySlice = pRegions[r].srcSubresource.arraySlice, .baseArraySlice = pRegions[r].srcSubresource.arraySlice,
.arraySize = 1 .arraySize = 1
}, },
.minLod = 0
}, },
cmd_buffer); cmd_buffer);
@@ -1051,7 +1048,6 @@ void anv_CmdCopyBufferToImage(
.baseArraySlice = 0, .baseArraySlice = 0,
.arraySize = 1 .arraySize = 1
}, },
.minLod = 0
}, },
cmd_buffer); cmd_buffer);
@@ -1123,7 +1119,6 @@ void anv_CmdCopyImageToBuffer(
.baseArraySlice = pRegions[r].imageSubresource.arraySlice, .baseArraySlice = pRegions[r].imageSubresource.arraySlice,
.arraySize = 1 .arraySize = 1
}, },
.minLod = 0
}, },
cmd_buffer); cmd_buffer);