From 641c25dd5505333ae4d260c6e821249c1be6da65 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Fri, 28 Aug 2015 07:53:24 -0700 Subject: [PATCH] vk: Declare some local variables as const In anv_cmd_buffer_emit_depth_stencil(), declare 'subpass' and 'fb' as const. --- src/vulkan/gen7_cmd_buffer.c | 4 ++-- src/vulkan/gen8_cmd_buffer.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vulkan/gen7_cmd_buffer.c b/src/vulkan/gen7_cmd_buffer.c index 84b733ca458..e98fac1f4d3 100644 --- a/src/vulkan/gen7_cmd_buffer.c +++ b/src/vulkan/gen7_cmd_buffer.c @@ -528,8 +528,8 @@ void gen7_CmdPipelineBarrier( static void gen7_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer) { - struct anv_subpass *subpass = cmd_buffer->state.subpass; - struct anv_framebuffer *fb = cmd_buffer->state.framebuffer; + const struct anv_subpass *subpass = cmd_buffer->state.subpass; + const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer; const struct anv_depth_stencil_view *view = NULL; if (subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED) { diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c index 5aa78528f5c..87ec90e18aa 100644 --- a/src/vulkan/gen8_cmd_buffer.c +++ b/src/vulkan/gen8_cmd_buffer.c @@ -458,8 +458,8 @@ void gen8_CmdDispatchIndirect( static void gen8_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer) { - struct anv_subpass *subpass = cmd_buffer->state.subpass; - struct anv_framebuffer *fb = cmd_buffer->state.framebuffer; + const struct anv_subpass *subpass = cmd_buffer->state.subpass; + const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer; const struct anv_depth_stencil_view *view = NULL; if (subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED) { -- 2.30.2