summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen8_state.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-10-05 13:22:44 -0700
committerChad Versace <[email protected]>2015-10-05 13:22:44 -0700
commit8bf021cf3dfdb50b709b7bba65dec8fd9495c74f (patch)
tree8256e3a9636c5d7d8592ebc7e0c69e428d9becdd /src/vulkan/gen8_state.c
parent4ffb4549e0aa139c908afd3c1b05e9a3ca6acf40 (diff)
vk: Return anv_image_view_info by value
The struct is only 2 bytes. Returning it on the stack is better than returning a reference into the ELF .data segment.
Diffstat (limited to 'src/vulkan/gen8_state.c')
-rw-r--r--src/vulkan/gen8_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c
index 3709a50005d..0ef44d03c44 100644
--- a/src/vulkan/gen8_state.c
+++ b/src/vulkan/gen8_state.c
@@ -158,7 +158,7 @@ gen8_image_view_init(struct anv_image_view *iview,
const struct anv_format *format_info =
anv_format_for_vk_format(pCreateInfo->format);
- const struct anv_image_view_info *view_type_info =
+ const struct anv_image_view_info view_type_info =
anv_image_view_info_for_vk_image_view_type(pCreateInfo->viewType);
view->bo = image->bo;
@@ -220,7 +220,7 @@ gen8_image_view_init(struct anv_image_view *iview,
};
struct GEN8_RENDER_SURFACE_STATE surface_state = {
- .SurfaceType = view_type_info->surface_type,
+ .SurfaceType = view_type_info.surface_type,
.SurfaceArray = image->array_size > 1,
.SurfaceFormat = format_info->surface_format,
.SurfaceVerticalAlignment = anv_valign[surface->v_align],