vk: Declare some local variables as const
In anv_cmd_buffer_emit_depth_stencil(), declare 'subpass' and 'fb' as const.
This commit is contained in:
parent
c6f19b4248
commit
641c25dd55
|
@ -528,8 +528,8 @@ void gen7_CmdPipelineBarrier(
|
||||||
static void
|
static void
|
||||||
gen7_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
|
gen7_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
|
||||||
{
|
{
|
||||||
struct anv_subpass *subpass = cmd_buffer->state.subpass;
|
const struct anv_subpass *subpass = cmd_buffer->state.subpass;
|
||||||
struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
|
const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
|
||||||
const struct anv_depth_stencil_view *view = NULL;
|
const struct anv_depth_stencil_view *view = NULL;
|
||||||
|
|
||||||
if (subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED) {
|
if (subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED) {
|
||||||
|
|
|
@ -458,8 +458,8 @@ void gen8_CmdDispatchIndirect(
|
||||||
static void
|
static void
|
||||||
gen8_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
|
gen8_cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer)
|
||||||
{
|
{
|
||||||
struct anv_subpass *subpass = cmd_buffer->state.subpass;
|
const struct anv_subpass *subpass = cmd_buffer->state.subpass;
|
||||||
struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
|
const struct anv_framebuffer *fb = cmd_buffer->state.framebuffer;
|
||||||
const struct anv_depth_stencil_view *view = NULL;
|
const struct anv_depth_stencil_view *view = NULL;
|
||||||
|
|
||||||
if (subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED) {
|
if (subpass->depth_stencil_attachment != VK_ATTACHMENT_UNUSED) {
|
||||||
|
|
Loading…
Reference in New Issue