diff options
author | Jason Ekstrand <[email protected]> | 2016-01-01 14:09:17 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-01-04 16:08:05 -0800 |
commit | f665fdf0e7295808edc2de3397f6f434bf223b39 (patch) | |
tree | 5e43724a63b4ce3a74749e0babb41cfa6a5f79d4 /src/vulkan/gen8_state.c | |
parent | ceb05131daffea3de2777cfb22a9be2dc53d88cd (diff) |
anv/image_view: Separate vulkan and isl formats
Previously, anv_image_view had a anv_format pointer that we used for
everything. This commit replaces that pointer with a VkFormat enum copied
from the API and an isl_format. In order to implement RGB formats, we have
to use a different isl_format for the actual surface state than the obvious
one from the VkFormat. Separating the two helps us keep things streight.
Diffstat (limited to 'src/vulkan/gen8_state.c')
-rw-r--r-- | src/vulkan/gen8_state.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 5562a252a21..a24eb192493 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -194,7 +194,7 @@ genX(image_view_init)(struct anv_image_view *iview, struct GENX(RENDER_SURFACE_STATE) surface_state = { .SurfaceType = anv_surftype(image, pCreateInfo->viewType, false), .SurfaceArray = image->array_size > 1, - .SurfaceFormat = iview->format->surface_format, + .SurfaceFormat = iview->format, .SurfaceVerticalAlignment = valign, .SurfaceHorizontalAlignment = halign, .TileMode = isl_to_gen_tiling[surface->isl.tiling], @@ -285,8 +285,7 @@ genX(image_view_init)(struct anv_image_view *iview, anv_surftype(image, pCreateInfo->viewType, true), surface_state.SurfaceFormat = - isl_lower_storage_image_format(&device->isl_dev, - iview->format->surface_format); + isl_lower_storage_image_format(&device->isl_dev, iview->format); surface_state.SurfaceMinLOD = range->baseMipLevel; surface_state.MIPCountLOD = MAX2(range->levelCount, 1) - 1; |