From d54f88c4c9a8a09c639839065b44b99da3483d66 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 11 Mar 2022 17:49:47 +0800 Subject: [PATCH] optimized "copy color4f" at CommandBuffer::SetClearColor function --- CMCore | 2 +- inc/hgl/graph/VKCommandBuffer.h | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CMCore b/CMCore index 1aa976a3..afec00dc 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit 1aa976a30aaf9108a8e9ecb1ea1e68da24cac4d4 +Subproject commit afec00dc90aecfacd84450d65b09dacbe3828e5e diff --git a/inc/hgl/graph/VKCommandBuffer.h b/inc/hgl/graph/VKCommandBuffer.h index 8356e2c0..7ced9231 100644 --- a/inc/hgl/graph/VKCommandBuffer.h +++ b/inc/hgl/graph/VKCommandBuffer.h @@ -64,12 +64,7 @@ public: { if(index>=cv_count)return; - VkClearValue *cv=clear_values+index; - - cv->color.float32[0]=cc.r; - cv->color.float32[1]=cc.g; - cv->color.float32[2]=cc.b; - cv->color.float32[3]=cc.a; + hgl_cpy(clear_values[index].color.float32,cc.rgba,4); } void SetClearDepthStencil(uint32_t index,float d=1.0f,float s=0)