From f932de55beb3c1982ace1b107000e8e255951d86 Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Tue, 26 Mar 2019 08:03:14 +0100 Subject: [PATCH] Fix some failed merge stuff(fixed crashes in d3d11) --- GPU/D3D11/ShaderManagerD3D11.cpp | 2 +- GPU/GPUCommon.cpp | 2 +- GPU/Vulkan/ShaderManagerVulkan.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GPU/D3D11/ShaderManagerD3D11.cpp b/GPU/D3D11/ShaderManagerD3D11.cpp index f4b2f4dd841a..76fee8d3244f 100644 --- a/GPU/D3D11/ShaderManagerD3D11.cpp +++ b/GPU/D3D11/ShaderManagerD3D11.cpp @@ -91,7 +91,7 @@ std::string D3D11VertexShader::GetShaderString(DebugShaderStringType type) const } ShaderManagerD3D11::ShaderManagerD3D11(Draw::DrawContext *draw, ID3D11Device *device, ID3D11DeviceContext *context, D3D_FEATURE_LEVEL featureLevel) - : ShaderManagerCommon(draw), device_(device), context_(context), featureLevel_(featureLevel), lastVShader_(nullptr), lastFShader_(nullptr) { + : ShaderManagerCommon(draw), device_(device), context_(context), featureLevel_(featureLevel), lastVShader_(nullptr), lastFShader_(nullptr), scalerCode_(nullptr) { codeBuffer_ = new char[16384 * 2]; memset(&ub_base, 0, sizeof(ub_base)); memset(&ub_lights, 0, sizeof(ub_lights)); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 6c1117c8be63..d9c6b80e7635 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -143,6 +143,7 @@ const CommonCommandTableEntry commonCommandTable[] = { { GE_CMD_TEXSIZE7, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS }, { GE_CMD_TEXFORMAT, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_IMAGE }, { GE_CMD_TEXLEVEL, FLAG_EXECUTEONCHANGE, DIRTY_TEXTURE_PARAMS, &GPUCommon::Execute_TexLevel }, + { GE_CMD_TEXLODSLOPE, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS }, { GE_CMD_TEXADDR0, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_IMAGE | DIRTY_UVSCALEOFFSET }, { GE_CMD_TEXADDR1, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS }, { GE_CMD_TEXADDR2, FLAG_FLUSHBEFOREONCHANGE, DIRTY_TEXTURE_PARAMS }, @@ -282,7 +283,6 @@ const CommonCommandTableEntry commonCommandTable[] = { // Ignored commands { GE_CMD_TEXFLUSH, 0 }, - { GE_CMD_TEXLODSLOPE, 0 }, { GE_CMD_TEXSYNC, 0 }, // These are just nop or part of other later commands. diff --git a/GPU/Vulkan/ShaderManagerVulkan.cpp b/GPU/Vulkan/ShaderManagerVulkan.cpp index d405a80b7a4f..58921fb17cf2 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.cpp +++ b/GPU/Vulkan/ShaderManagerVulkan.cpp @@ -159,13 +159,13 @@ std::string VulkanVertexShader::GetShaderString(DebugShaderStringType type) cons ShaderManagerVulkan::ShaderManagerVulkan(Draw::DrawContext *draw, VulkanContext *vulkan) : ShaderManagerCommon(draw), vulkan_(vulkan), lastVShader_(nullptr), lastFShader_(nullptr), fsCache_(16), vsCache_(16) { - codeBuffer_ = new char[16384]; + codeBuffer_ = new char[16384 * 2]; uboAlignment_ = vulkan_->GetPhysicalDeviceProperties().properties.limits.minUniformBufferOffsetAlignment; memset(&ub_base, 0, sizeof(ub_base)); memset(&ub_lights, 0, sizeof(ub_lights)); memset(&ub_bones, 0, sizeof(ub_bones)); - static_assert(sizeof(ub_base) <= 512+16, "ub_base grew too big"); + static_assert(sizeof(ub_base) <= 512 + 16, "ub_base grew too big"); static_assert(sizeof(ub_lights) <= 512, "ub_lights grew too big"); static_assert(sizeof(ub_bones) <= 384, "ub_bones grew too big"); }