From 9ec66bafa1fbedb5aa37663225dbd7221062b716 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 3 May 2020 09:31:37 +0200 Subject: [PATCH] - backend update. # Conflicts: # source/common/textures/animtexture.cpp # Conflicts: # source/common/2d/v_2ddrawer.cpp # source/common/textures/multipatchtexturebuilder.cpp --- .../rendering/vulkan/renderer/vk_postprocess.cpp | 10 +++++----- .../common/rendering/vulkan/renderer/vk_renderpass.cpp | 2 +- source/common/textures/animtexture.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/common/rendering/vulkan/renderer/vk_postprocess.cpp b/source/common/rendering/vulkan/renderer/vk_postprocess.cpp index c1c4148ca..6d3656fd9 100644 --- a/source/common/rendering/vulkan/renderer/vk_postprocess.cpp +++ b/source/common/rendering/vulkan/renderer/vk_postprocess.cpp @@ -533,10 +533,10 @@ void VkPPRenderState::RenderScreenQuad(VkPPRenderPassSetup *passSetup, VulkanDes auto cmdbuffer = fb->GetDrawCommands(); VkViewport viewport = { }; - viewport.x = x; - viewport.y = y; - viewport.width = width; - viewport.height = height; + viewport.x = (float)x; + viewport.y = (float)y; + viewport.width = (float)width; + viewport.height = (float)height; viewport.minDepth = 0.0f; viewport.maxDepth = 1.0f; @@ -761,7 +761,7 @@ void VkPPRenderPassSetup::CreatePipeline(const VkPPRenderPassKey &key) builder.addDynamicState(VK_DYNAMIC_STATE_SCISSOR); // Note: the actual values are ignored since we use dynamic viewport+scissor states builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f); - builder.setScissor(0.0f, 0.0f, 320.0f, 200.0f); + builder.setScissor(0, 0, 320, 200); if (key.StencilTest) { builder.addDynamicState(VK_DYNAMIC_STATE_STENCIL_REFERENCE); diff --git a/source/common/rendering/vulkan/renderer/vk_renderpass.cpp b/source/common/rendering/vulkan/renderer/vk_renderpass.cpp index 53b1cd732..2e0973c08 100644 --- a/source/common/rendering/vulkan/renderer/vk_renderpass.cpp +++ b/source/common/rendering/vulkan/renderer/vk_renderpass.cpp @@ -404,7 +404,7 @@ std::unique_ptr VkRenderPassSetup::CreatePipeline(const VkPipeli // Note: the actual values are ignored since we use dynamic viewport+scissor states builder.setViewport(0.0f, 0.0f, 320.0f, 200.0f); - builder.setScissor(0, 0, 320.0f, 200.0f); + builder.setScissor(0, 0, 320, 200); static const VkPrimitiveTopology vktopology[] = { VK_PRIMITIVE_TOPOLOGY_POINT_LIST, diff --git a/source/common/textures/animtexture.cpp b/source/common/textures/animtexture.cpp index 2d06eccab..e8635e404 100644 --- a/source/common/textures/animtexture.cpp +++ b/source/common/textures/animtexture.cpp @@ -71,7 +71,7 @@ FBitmap AnimTexture::GetBgraBitmap(const PalEntry* remap, int* trans) { int p = i * 4; int index = spix[i]; - dpix[p + 0] = Palette[index * 3 + 2]; + dpix[p + 0] = Palette[index*3+2]; dpix[p + 1] = Palette[index * 3 + 1]; dpix[p + 2] = Palette[index * 3]; dpix[p + 3] = 255;