Skip to content

Commit

Permalink
Merge pull request dolphin-emu#4935 from Armada651/depth-range-fix
Browse files Browse the repository at this point in the history
VideoBackends: Set the maximum range when the depth range is oversized.
  • Loading branch information
degasus committed Mar 10, 2017
2 parents a3f5e3e + 3f41e6d commit e99cd57
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 77 deletions.
1 change: 1 addition & 0 deletions Source/Core/Common/Common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<ClInclude Include="GL\GLExtensions\gl_common.h" />
<ClInclude Include="GL\GLExtensions\HP_occlusion_test.h" />
<ClInclude Include="GL\GLExtensions\KHR_debug.h" />
<ClInclude Include="GL\GLExtensions\NV_depth_buffer_float.h" />
<ClInclude Include="GL\GLExtensions\NV_occlusion_query_samples.h" />
<ClInclude Include="GL\GLExtensions\NV_primitive_restart.h" />
<ClInclude Include="GL\GLInterfaceBase.h" />
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/Common/Common.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@
<ClInclude Include="GL\GLExtensions\NV_primitive_restart.h">
<Filter>GL\GLExtensions</Filter>
</ClInclude>
<ClInclude Include="GL\GLExtensions\NV_depth_buffer_float.h">
<Filter>GL\GLExtensions</Filter>
</ClInclude>
<ClInclude Include="GL\GLInterface\WGL.h">
<Filter>GL\GLInterface</Filter>
</ClInclude>
Expand Down
23 changes: 14 additions & 9 deletions Source/Core/Common/GL/GLExtensions/GLExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,11 @@ PFNDOLCOPYIMAGESUBDATAPROC dolCopyImageSubData;
// ARB_shader_storage_buffer_object
PFNDOLSHADERSTORAGEBLOCKBINDINGPROC dolShaderStorageBlockBinding;

// NV_depth_buffer_float
PFNDOLDEPTHRANGEDNVPROC dolDepthRangedNV;
PFNDOLCLEARDEPTHDNVPROC dolClearDepthdNV;
PFNDOLDEPTHBOUNDSDNVPROC dolDepthBoundsdNV;

// Creates a GLFunc object that requires a feature
#define GLFUNC_REQUIRES(x, y) \
{ \
Expand Down Expand Up @@ -1838,6 +1843,11 @@ const GLFunc gl_function_array[] = {

// ARB_shader_storage_buffer_object
GLFUNC_REQUIRES(glShaderStorageBlockBinding, "ARB_shader_storage_buffer_object !VERSION_4_3"),

// NV_depth_buffer_float
GLFUNC_REQUIRES(glDepthRangedNV, "GL_NV_depth_buffer_float"),
GLFUNC_REQUIRES(glClearDepthdNV, "GL_NV_depth_buffer_float"),
GLFUNC_REQUIRES(glDepthBoundsdNV, "GL_NV_depth_buffer_float"),
};

namespace GLExtensions
Expand Down Expand Up @@ -2060,26 +2070,21 @@ static void InitExtensionList()
// Quite a lot of these had their names changed when merged in to core
// Disable the ones that have
std::string gl300exts[] = {
"GL_ARB_map_buffer_range",
"GL_ARB_map_buffer_range", "GL_ARB_color_buffer_float", "GL_ARB_texture_float",
"GL_ARB_half_float_pixel", "GL_ARB_framebuffer_object", "GL_ARB_texture_float",
"GL_ARB_vertex_array_object", "GL_NV_depth_buffer_float",
//"GL_EXT_texture_integer",
//"GL_EXT_gpu_shader4",
//"GL_APPLE_flush_buffer_range",
"GL_ARB_color_buffer_float",
//"GL_NV_depth_buffer_float",
"GL_ARB_texture_float",
//"GL_EXT_packed_float",
//"GL_EXT_texture_shared_exponent",
"GL_ARB_half_float_pixel",
//"GL_NV_half_float",
"GL_ARB_framebuffer_object",
//"GL_EXT_framebuffer_sRGB",
"GL_ARB_texture_float",
//"GL_EXT_texture_integer",
//"GL_EXT_draw_buffers2",
//"GL_EXT_texture_integer",
//"GL_EXT_texture_array",
//"GL_EXT_texture_compression_rgtc",
//"GL_EXT_transform_feedback",
"GL_ARB_vertex_array_object",
//"GL_NV_conditional_render",
"VERSION_3_0",
};
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Common/GL/GLExtensions/GLExtensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "Common/GL/GLExtensions/EXT_texture_filter_anisotropic.h"
#include "Common/GL/GLExtensions/HP_occlusion_test.h"
#include "Common/GL/GLExtensions/KHR_debug.h"
#include "Common/GL/GLExtensions/NV_depth_buffer_float.h"
#include "Common/GL/GLExtensions/NV_occlusion_query_samples.h"
#include "Common/GL/GLExtensions/NV_primitive_restart.h"
#include "Common/GL/GLExtensions/gl_1_1.h"
Expand Down
41 changes: 41 additions & 0 deletions Source/Core/Common/GL/GLExtensions/NV_depth_buffer_float.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
** Copyright (c) 2013-2015 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/

#include "Common/GL/GLExtensions/gl_common.h"

#define GL_DEPTH_COMPONENT32F_NV 0x8DAB
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD
#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF

typedef void(APIENTRYP PFNDOLDEPTHRANGEDNVPROC)(GLdouble zNear, GLdouble zFar);
typedef void(APIENTRYP PFNDOLCLEARDEPTHDNVPROC)(GLdouble depth);
typedef void(APIENTRYP PFNDOLDEPTHBOUNDSDNVPROC)(GLdouble zmin, GLdouble zmax);

extern PFNDOLDEPTHRANGEDNVPROC dolDepthRangedNV;
extern PFNDOLCLEARDEPTHDNVPROC dolClearDepthdNV;
extern PFNDOLDEPTHBOUNDSDNVPROC dolDepthBoundsdNV;

#define glDepthRangedNV dolDepthRangedNV
#define glClearDepthdNV dolClearDepthdNV
#define glDepthBoundsdNV dolDepthBoundsdNV
2 changes: 2 additions & 0 deletions Source/Core/Core/Analytics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ void DolphinAnalytics::MakePerGameBuilder()
builder.AddData("gpu-has-dual-source-blend", g_Config.backend_info.bSupportsDualSourceBlend);
builder.AddData("gpu-has-primitive-restart", g_Config.backend_info.bSupportsPrimitiveRestart);
builder.AddData("gpu-has-oversized-viewports", g_Config.backend_info.bSupportsOversizedViewports);
builder.AddData("gpu-has-oversized-depth-ranges",
g_Config.backend_info.bSupportsOversizedDepthRanges);
builder.AddData("gpu-has-geometry-shaders", g_Config.backend_info.bSupportsGeometryShaders);
builder.AddData("gpu-has-3d-vision", g_Config.backend_info.bSupports3DVision);
builder.AddData("gpu-has-early-z", g_Config.backend_info.bSupportsEarlyZ);
Expand Down
13 changes: 6 additions & 7 deletions Source/Core/VideoBackends/D3D/Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,8 @@ void Renderer::SetViewport()
float Y = Renderer::EFBToScaledYf(xfmem.viewport.yOrig + xfmem.viewport.ht - scissorYOff);
float Wd = Renderer::EFBToScaledXf(2.0f * xfmem.viewport.wd);
float Ht = Renderer::EFBToScaledYf(-2.0f * xfmem.viewport.ht);
float range = MathUtil::Clamp<float>(xfmem.viewport.zRange, 0.0f, 16777215.0f);
float min_depth =
MathUtil::Clamp<float>(xfmem.viewport.farZ - range, 0.0f, 16777215.0f) / 16777216.0f;
float max_depth = MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f;
float min_depth = (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f;
float max_depth = xfmem.viewport.farZ / 16777216.0f;
if (Wd < 0.0f)
{
X += Wd;
Expand All @@ -561,10 +559,11 @@ void Renderer::SetViewport()
Ht = -Ht;
}

// If an inverted depth range is used, which D3D doesn't support,
// we need to calculate the depth range in the vertex shader.
if (xfmem.viewport.zRange < 0.0f)
// If an inverted or oversized depth range is used, we need to calculate the depth range in the
// vertex shader.
if (UseVertexDepthRange())
{
// We need to ensure depth values are clamped the maximum value supported by the console GPU.
min_depth = 0.0f;
max_depth = GX_MAX_DEPTH;
}
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsDualSourceBlend = true;
g_Config.backend_info.bSupportsPrimitiveRestart = true;
g_Config.backend_info.bSupportsOversizedViewports = false;
g_Config.backend_info.bSupportsOversizedDepthRanges = false;
g_Config.backend_info.bSupportsGeometryShaders = true;
g_Config.backend_info.bSupports3DVision = true;
g_Config.backend_info.bSupportsPostProcessing = false;
Expand Down
13 changes: 6 additions & 7 deletions Source/Core/VideoBackends/D3D12/Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,8 @@ void Renderer::SetViewport()
float y = Renderer::EFBToScaledYf(xfmem.viewport.yOrig + xfmem.viewport.ht - scissor_y_offset);
float width = Renderer::EFBToScaledXf(2.0f * xfmem.viewport.wd);
float height = Renderer::EFBToScaledYf(-2.0f * xfmem.viewport.ht);
float range = MathUtil::Clamp<float>(xfmem.viewport.zRange, 0.0f, 16777215.0f);
float min_depth =
MathUtil::Clamp<float>(xfmem.viewport.farZ - range, 0.0f, 16777215.0f) / 16777216.0f;
float max_depth = MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f;
float min_depth = (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f;
float max_depth = xfmem.viewport.farZ / 16777216.0f;
if (width < 0.0f)
{
x += width;
Expand All @@ -469,10 +467,11 @@ void Renderer::SetViewport()
height = -height;
}

// If an inverted depth range is used, which D3D doesn't support,
// we need to calculate the depth range in the vertex shader.
if (xfmem.viewport.zRange < 0.0f)
// If an inverted or oversized depth range is used, we need to calculate the depth range in the
// vertex shader.
if (UseVertexDepthRange())
{
// We need to ensure depth values are clamped the maximum value supported by the console GPU.
min_depth = 0.0f;
max_depth = GX_MAX_DEPTH;
}
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/D3D12/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsDualSourceBlend = true;
g_Config.backend_info.bSupportsPrimitiveRestart = true;
g_Config.backend_info.bSupportsOversizedViewports = false;
g_Config.backend_info.bSupportsOversizedDepthRanges = false;
g_Config.backend_info.bSupportsGeometryShaders = true;
g_Config.backend_info.bSupports3DVision = true;
g_Config.backend_info.bSupportsPostProcessing = false;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/Null/NullBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsDualSourceBlend = true;
g_Config.backend_info.bSupportsPrimitiveRestart = true;
g_Config.backend_info.bSupportsOversizedViewports = true;
g_Config.backend_info.bSupportsOversizedDepthRanges = false;
g_Config.backend_info.bSupportsGeometryShaders = true;
g_Config.backend_info.bSupports3DVision = false;
g_Config.backend_info.bSupportsEarlyZ = true;
Expand Down
48 changes: 37 additions & 11 deletions Source/Core/VideoBackends/OGL/Render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ Renderer::Renderer()

// Clip distance support is useless without a method to clamp the depth range
g_Config.backend_info.bSupportsDepthClamp = GLExtensions::Supports("GL_ARB_depth_clamp");
g_Config.backend_info.bSupportsOversizedDepthRanges =
GLExtensions::Supports("GL_NV_depth_buffer_float");

g_ogl_config.bSupportsGLSLCache = GLExtensions::Supports("GL_ARB_get_program_binary");
g_ogl_config.bSupportsGLPinnedMemory = GLExtensions::Supports("GL_AMD_pinned_memory");
Expand Down Expand Up @@ -625,7 +627,7 @@ Renderer::Renderer()
g_ogl_config.gl_renderer, g_ogl_config.gl_version),
5000);

WARN_LOG(VIDEO, "Missing OGL Extensions: %s%s%s%s%s%s%s%s%s%s%s%s%s%s",
WARN_LOG(VIDEO, "Missing OGL Extensions: %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
g_ActiveConfig.backend_info.bSupportsDualSourceBlend ? "" : "DualSourceBlend ",
g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? "" : "PrimitiveRestart ",
g_ActiveConfig.backend_info.bSupportsEarlyZ ? "" : "EarlyZ ",
Expand All @@ -638,7 +640,8 @@ Renderer::Renderer()
g_ActiveConfig.backend_info.bSupportsGSInstancing ? "" : "GSInstancing ",
g_ActiveConfig.backend_info.bSupportsClipControl ? "" : "ClipControl ",
g_ogl_config.bSupportsCopySubImage ? "" : "CopyImageSubData ",
g_ActiveConfig.backend_info.bSupportsDepthClamp ? "" : "DepthClamp ");
g_ActiveConfig.backend_info.bSupportsDepthClamp ? "" : "DepthClamp ",
g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges ? "" : "DepthRangedNV ");

s_last_multisamples = g_ActiveConfig.iMultisamples;
s_MSAASamples = s_last_multisamples;
Expand Down Expand Up @@ -1052,10 +1055,8 @@ void Renderer::SetViewport()
(float)scissorYOff);
float Width = EFBToScaledXf(2.0f * xfmem.viewport.wd);
float Height = EFBToScaledYf(-2.0f * xfmem.viewport.ht);
float range = MathUtil::Clamp<float>(xfmem.viewport.zRange, -16777215.0f, 16777215.0f);
float min_depth =
MathUtil::Clamp<float>(xfmem.viewport.farZ - range, 0.0f, 16777215.0f) / 16777216.0f;
float max_depth = MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f;
float min_depth = (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f;
float max_depth = xfmem.viewport.farZ / 16777216.0f;
if (Width < 0)
{
X += Width;
Expand All @@ -1078,11 +1079,36 @@ void Renderer::SetViewport()
glViewport(iceilf(X), iceilf(Y), iceilf(Width), iceilf(Height));
}

// Set the reversed depth range. If we do depth clipping and depth range in the
// vertex shader we only need to ensure depth values don't exceed the maximum
// value supported by the console GPU. If not, we simply clamp the near/far values
// themselves to the maximum value as done above.
glDepthRangef(max_depth, min_depth);
if (!g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges &&
!g_ActiveConfig.backend_info.bSupportsDepthClamp)
{
// There's no way to support oversized depth ranges in this situation. Let's just clamp the
// range to the maximum value supported by the console GPU and hope for the best.
min_depth = MathUtil::Clamp(min_depth, 0.0f, GX_MAX_DEPTH);
max_depth = MathUtil::Clamp(max_depth, 0.0f, GX_MAX_DEPTH);
}

if (UseVertexDepthRange())
{
// We need to ensure depth values are clamped the maximum value supported by the console GPU.
// Taking into account whether the depth range is inverted or not.
if (xfmem.viewport.zRange < 0.0f)
{
min_depth = GX_MAX_DEPTH;
max_depth = 0.0f;
}
else
{
min_depth = 0.0f;
max_depth = GX_MAX_DEPTH;
}
}

// Set the reversed depth range.
if (g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges)
glDepthRangedNV(max_depth, min_depth);
else
glDepthRangef(max_depth, min_depth);
}

void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable,
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/OGL/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ void VideoBackend::InitBackendInfo()
g_Config.backend_info.bSupportsInternalResolutionFrameDumps = true;

// Overwritten in Render.cpp later
g_Config.backend_info.bSupportsOversizedDepthRanges = false;
g_Config.backend_info.bSupportsDualSourceBlend = true;
g_Config.backend_info.bSupportsPrimitiveRestart = true;
g_Config.backend_info.bSupportsPaletteConversion = true;
Expand Down
1 change: 1 addition & 0 deletions Source/Core/VideoBackends/Software/SWmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ void VideoSoftware::InitBackendInfo()
g_Config.backend_info.bSupportsDualSourceBlend = true;
g_Config.backend_info.bSupportsEarlyZ = true;
g_Config.backend_info.bSupportsOversizedViewports = true;
g_Config.backend_info.bSupportsOversizedDepthRanges = true;
g_Config.backend_info.bSupportsPrimitiveRestart = false;
g_Config.backend_info.bSupportsMultithreading = false;
g_Config.backend_info.bSupportsInternalResolutionFrameDumps = false;
Expand Down
15 changes: 7 additions & 8 deletions Source/Core/VideoBackends/Vulkan/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1628,10 +1628,8 @@ void Renderer::SetViewport()
float y = Renderer::EFBToScaledYf(xfmem.viewport.yOrig + xfmem.viewport.ht - scissor_y_offset);
float width = Renderer::EFBToScaledXf(2.0f * xfmem.viewport.wd);
float height = Renderer::EFBToScaledYf(-2.0f * xfmem.viewport.ht);
float range = MathUtil::Clamp<float>(xfmem.viewport.zRange, -16777215.0f, 16777215.0f);
float min_depth =
MathUtil::Clamp<float>(xfmem.viewport.farZ - range, 0.0f, 16777215.0f) / 16777216.0f;
float max_depth = MathUtil::Clamp<float>(xfmem.viewport.farZ, 0.0f, 16777215.0f) / 16777216.0f;
float min_depth = (xfmem.viewport.farZ - xfmem.viewport.zRange) / 16777216.0f;
float max_depth = xfmem.viewport.farZ / 16777216.0f;
if (width < 0.0f)
{
x += width;
Expand All @@ -1643,11 +1641,12 @@ void Renderer::SetViewport()
height = -height;
}

// If an inverted depth range is used, which the Vulkan drivers don't
// support, we need to calculate the depth range in the vertex shader.
// TODO: Make this into a DriverDetails bug and write a test for CTS.
if (xfmem.viewport.zRange < 0.0f)
// If an oversized or inverted depth range is used, we need to calculate the depth range in the
// vertex shader.
// TODO: Inverted depth ranges are bugged in all drivers, which should be added to DriverDetails.
if (UseVertexDepthRange())
{
// We need to ensure depth values are clamped the maximum value supported by the console GPU.
min_depth = 0.0f;
max_depth = GX_MAX_DEPTH;
}
Expand Down
19 changes: 10 additions & 9 deletions Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,16 @@ VulkanContext::GPUList VulkanContext::EnumerateGPUs(VkInstance instance)
void VulkanContext::PopulateBackendInfo(VideoConfig* config)
{
config->backend_info.api_type = APIType::Vulkan;
config->backend_info.bSupportsExclusiveFullscreen = false; // Currently WSI does not allow this.
config->backend_info.bSupports3DVision = false; // D3D-exclusive.
config->backend_info.bSupportsOversizedViewports = true; // Assumed support.
config->backend_info.bSupportsEarlyZ = true; // Assumed support.
config->backend_info.bSupportsPrimitiveRestart = true; // Assumed support.
config->backend_info.bSupportsBindingLayout = false; // Assumed support.
config->backend_info.bSupportsPaletteConversion = true; // Assumed support.
config->backend_info.bSupportsClipControl = true; // Assumed support.
config->backend_info.bSupportsMultithreading = true; // Assumed support.
config->backend_info.bSupportsExclusiveFullscreen = false; // Currently WSI does not allow this.
config->backend_info.bSupports3DVision = false; // D3D-exclusive.
config->backend_info.bSupportsOversizedViewports = true; // Assumed support.
config->backend_info.bSupportsOversizedDepthRanges = false; // No support yet.
config->backend_info.bSupportsEarlyZ = true; // Assumed support.
config->backend_info.bSupportsPrimitiveRestart = true; // Assumed support.
config->backend_info.bSupportsBindingLayout = false; // Assumed support.
config->backend_info.bSupportsPaletteConversion = true; // Assumed support.
config->backend_info.bSupportsClipControl = true; // Assumed support.
config->backend_info.bSupportsMultithreading = true; // Assumed support.
config->backend_info.bSupportsInternalResolutionFrameDumps = true; // Assumed support.
config->backend_info.bSupportsPostProcessing = false; // No support yet.
config->backend_info.bSupportsDualSourceBlend = false; // Dependent on features.
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/VideoCommon/BPStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ static void BPWritten(const BPCmd& bp)
{
if (bp.changes & 3)
PixelShaderManager::SetZTextureTypeChanged();
if (bp.changes & 12)
VertexShaderManager::SetViewportChanged();
#if defined(_DEBUG) || defined(DEBUGFAST)
const char* pzop[] = {"DISABLE", "ADD", "REPLACE", "?"};
const char* pztype[] = {"Z8", "Z16", "Z24", "?"};
Expand Down

0 comments on commit e99cd57

Please sign in to comment.