1
0
mirror of https://github.com/Yours3lf/rpi-vk-driver.git synced 2025-01-18 10:52:14 +01:00

fixed viewport offset

This commit is contained in:
yours3lf 2020-05-13 23:05:59 +01:00
parent 8d1362cef6
commit 0d4c6cb9b7
2 changed files with 6 additions and 6 deletions

View File

@ -71,7 +71,7 @@ static uint32_t drawCommon(VkCommandBuffer commandBuffer, int32_t vertexOffset)
//Viewport Offset
clFit(commandBuffer, &commandBuffer->binCl, V3D21_VIEWPORT_OFFSET_length);
clInsertViewPortOffset(&commandBuffer->binCl, vp.width * 0.5f + vp.x, vp.height * 0.5f - vp.y);
clInsertViewPortOffset(&commandBuffer->binCl, vp.width * 0.5f + vp.x, vp.height * 0.5f + vp.y);
cb->viewportDirty = 0;
}

View File

@ -827,7 +827,7 @@ void recordCommandBuffers()
VkClearAttachment clearAttachment[2] = {};
clearAttachment[0].aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
clearAttachment[0].clearValue.depthStencil.depth = 0.3f;
clearAttachment[0].clearValue.depthStencil.depth = 0.0f;
clearAttachment[1].aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
clearAttachment[1].clearValue.color.float32[0] = 1.0f;
@ -835,10 +835,10 @@ void recordCommandBuffers()
clearAttachment[1].clearValue.color.float32[2] = 1.0f;
clearAttachment[1].clearValue.color.float32[3] = 1.0f;
VkClearRect clearRect = {};
clearRect.rect.offset.x = 0;
clearRect.rect.offset.y = 0;
clearRect.rect.extent.width = swapChainExtent.width;
clearRect.rect.extent.height = swapChainExtent.height;
clearRect.rect.offset.x = 300;
clearRect.rect.offset.y = 972;
clearRect.rect.extent.width = 144;
clearRect.rect.extent.height = 108;
vkCmdClearAttachments(presentCommandBuffers[i], 2, clearAttachment, 1, &clearRect);
VkDeviceSize offsets = 0;