dolphin/Source/Core/VideoCommon
Stenzek 378b605669 BPStructs: Gracefully handle out-of-range EFB copies
Since the copy X and Y coordinates/sizes are 10-bit, the game can configure a
copy region up to 1024x1024. Hardware tests have found that the number of bytes
written does not depend on the configured stride, instead it is based on the
size registers, writing beyond the length  of a single row. The data written
for the pixels which lie outside the EFB bounds does not wrap around instead
returning different colors based on the pixel format of the EFB.

This suggests it's not based on coordinates, but instead on memory addresses.
The effect of a within-bounds size but out-of-bounds offset
(e.g. offset 320,0, size 640,480) are the same.

As it would be difficult to emulate the exact behavior of out-of-bounds reads,
instead of writing the junk data, we don't write anything to RAM at all for
over-sized copies, and clamp to the EFB borders for over-offset copies.
2019-03-31 22:05:53 +10:00
..
AbstractFramebuffer.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
AbstractFramebuffer.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
AbstractPipeline.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
AbstractShader.h
AbstractStagingTexture.cpp
AbstractStagingTexture.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
AbstractTexture.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
AbstractTexture.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
AsyncRequests.cpp VideoCommon: add EFB peek/poke stats 2019-03-04 02:49:59 +00:00
AsyncRequests.h Reformat all the things! 2018-04-12 21:28:39 +02:00
AsyncShaderCompiler.cpp ShaderCache: Use imgui for shader compilation dialog 2019-01-25 11:15:57 +10:00
AsyncShaderCompiler.h
AVIDump.cpp decrease gop size (keyint) 2019-03-11 22:17:13 +03:00
AVIDump.h
BoundingBox.cpp
BoundingBox.h
BPFunctions.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
BPFunctions.h
BPMemory.cpp BPMemory: Use Common::BitCast where applicable 2018-05-18 14:25:44 -04:00
BPMemory.h Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE 2018-06-09 12:20:25 -04:00
BPStructs.cpp BPStructs: Gracefully handle out-of-range EFB copies 2019-03-31 22:05:53 +10:00
BPStructs.h
CMakeLists.txt Add imgui-based Netplay Chat 2019-03-23 20:13:24 +01:00
CommandProcessor.cpp CP: some bits in some of the HI registers cannot be set 2018-07-12 20:15:27 -04:00
CommandProcessor.h
ConstantManager.h
CPMemory.cpp
CPMemory.h
DataReader.h Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE 2018-06-09 12:20:25 -04:00
DriverDetails.cpp GLInterface: Drop Haiku support 2018-10-20 21:11:33 +10:00
DriverDetails.h Vulkan: Support macOS via MoltenVK 2018-11-07 05:41:09 -08:00
Fifo.cpp ConfigManager: Convert GPUDeterminismMode into an enum class 2018-06-15 14:45:30 -04:00
Fifo.h
FPSCounter.cpp
FPSCounter.h Reformat all the things! 2018-04-12 21:28:39 +02:00
FramebufferManager.cpp FramebufferManager: Fix broken EFB peeks in GL with MSAA on 2019-03-30 03:14:29 +10:00
FramebufferManager.h FramebufferManager: Implement deferred EFB cache invalidation 2019-03-09 12:24:04 +10:00
FramebufferShaderGen.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
FramebufferShaderGen.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
GeometryShaderGen.cpp ShaderGen: Omit some unused varyings when possible 2019-01-23 18:34:22 +10:00
GeometryShaderGen.h
GeometryShaderManager.cpp
GeometryShaderManager.h
GXPipelineTypes.h VideoCommon: Clean up class-memaccess warnings 2018-10-14 23:05:47 -04:00
HiresTextures_DDSLoader.cpp HiresTextures: Do not load compressed textures with unaligned dimensions 2018-05-22 16:15:18 +10:00
HiresTextures.cpp VideoCommon/HiresTextures: Change wildcard to a Windows-compatible character 2018-08-21 15:54:25 -04:00
HiresTextures.h HiresTextures: Do not load compressed textures with unaligned dimensions 2018-05-22 16:15:18 +10:00
ImageWrite.cpp
ImageWrite.h
IndexGenerator.cpp Use main buffers for utility draws 2018-12-04 17:37:25 +10:00
IndexGenerator.h Use main buffers for utility draws 2018-12-04 17:37:25 +10:00
LightingShaderGen.cpp
LightingShaderGen.h
LookUpTables.h
NativeVertexFormat.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
NetPlayChatUI.cpp NetPlayChatUI: Add activate chat hotkey 2019-03-26 18:13:32 +01:00
NetPlayChatUI.h NetPlayChatUI: Add activate chat hotkey 2019-03-26 18:13:32 +01:00
OnScreenDisplay.cpp Renderer: Use imgui for drawing debug text and OSD 2019-01-25 11:15:57 +10:00
OnScreenDisplay.h Renderer: Use imgui for drawing debug text and OSD 2019-01-25 11:15:57 +10:00
OpcodeDecoding.cpp
OpcodeDecoding.h
PerfQueryBase.cpp
PerfQueryBase.h Reformat all the things! 2018-04-12 21:28:39 +02:00
PixelEngine.cpp
PixelEngine.h
PixelShaderGen.cpp PixelShaderGen: Use subgroup reduction operations for bounding box 2019-03-29 20:06:56 +10:00
PixelShaderGen.h ShaderGen: Omit some unused varyings when possible 2019-01-23 18:34:22 +10:00
PixelShaderManager.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
PixelShaderManager.h
PostProcessing.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
PostProcessing.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
RenderBase.cpp RenderBase: Add EFBHasAlphaChannel() helper 2019-03-28 20:35:02 +10:00
RenderBase.h RenderBase: Add EFBHasAlphaChannel() helper 2019-03-28 20:35:02 +10:00
RenderState.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
RenderState.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
SamplerCommon.h
sfont.inc
ShaderCache.cpp ShaderCache: Don't create invalid logic op pipelines 2019-03-28 20:35:02 +10:00
ShaderCache.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
ShaderGenCommon.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
ShaderGenCommon.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
Statistics.cpp VideoCommon: add EFB peek/poke stats 2019-03-04 02:49:59 +00:00
Statistics.h VideoCommon: add EFB peek/poke stats 2019-03-04 02:49:59 +00:00
TextureCacheBase.cpp FramebufferManager: Fix broken EFB peeks in GL with MSAA on 2019-03-30 03:14:29 +10:00
TextureCacheBase.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
TextureConfig.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
TextureConfig.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
TextureConversionShader.cpp TextureConversionShader: fix XFB decoding shader 2019-03-01 21:54:33 +00:00
TextureConversionShader.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
TextureConverterShaderGen.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
TextureConverterShaderGen.h Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
TextureDecoder_Common.cpp Reformat all the things! 2018-04-12 21:28:39 +02:00
TextureDecoder_Generic.cpp
TextureDecoder_Util.h
TextureDecoder_x64.cpp
TextureDecoder.h
UberShaderCommon.cpp
UberShaderCommon.h
UberShaderPixel.cpp VideoBackends: Scale bounding box rectangle in the pixel shader 2019-03-25 18:47:58 +10:00
UberShaderPixel.h ShaderCache: Remove unused UID bits before inserting into shader map 2018-05-26 00:09:10 +10:00
UberShaderVertex.cpp ShaderGen: Don't use interface blocks on Vulkan without GS 2019-01-24 17:02:17 +10:00
UberShaderVertex.h
VertexLoader_Color.cpp
VertexLoader_Color.h
VertexLoader_Normal.cpp Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE 2018-06-09 12:20:25 -04:00
VertexLoader_Normal.h
VertexLoader_Position.cpp Reformat all the things! 2018-04-12 21:28:39 +02:00
VertexLoader_Position.h
VertexLoader_TextCoord.cpp Reformat all the things! 2018-04-12 21:28:39 +02:00
VertexLoader_TextCoord.h
VertexLoader.cpp
VertexLoader.h
VertexLoaderARM64.cpp VertexLoaderArm: Fix 565 color format. 2018-05-27 11:27:15 +02:00
VertexLoaderARM64.h
VertexLoaderBase.cpp Reformat all the things! 2018-04-12 21:28:39 +02:00
VertexLoaderBase.h Reformat all the things! 2018-04-12 21:28:39 +02:00
VertexLoaderManager.cpp Move most backend functionality to VideoCommon 2019-02-19 16:57:54 +10:00
VertexLoaderManager.h
VertexLoaderUtils.h Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINE 2018-06-09 12:20:25 -04:00
VertexLoaderX64.cpp
VertexLoaderX64.h
VertexManagerBase.cpp FramebufferManager: Implement deferred EFB cache invalidation 2019-03-09 12:24:04 +10:00
VertexManagerBase.h VertexManagerBase: Increase vertex/uniform buffer sizes 2019-03-29 19:52:38 +10:00
VertexShaderGen.cpp ShaderGen: Don't use interface blocks on Vulkan without GS 2019-01-24 17:02:17 +10:00
VertexShaderGen.h
VertexShaderManager.cpp WiimoteEmu: Remove redundant Matrix library and use the one in Common. 2019-02-03 12:02:02 -06:00
VertexShaderManager.h Remove leftovers of projection hack support 2018-04-13 12:52:42 +02:00
VideoBackendBase.cpp VideoBackends: Verify validity before doing full renderer init 2019-03-29 19:52:38 +10:00
VideoBackendBase.h VideoBackend: Add a virtual PrepareWindow function 2018-11-07 05:12:20 -08:00
VideoCommon.h
VideoCommon.vcxproj Add imgui-based Netplay Chat 2019-03-23 20:13:24 +01:00
VideoCommon.vcxproj.filters Add imgui-based Netplay Chat 2019-03-23 20:13:24 +01:00
VideoConfig.cpp FramebufferManager: Implement deferred EFB cache invalidation 2019-03-09 12:24:04 +10:00
VideoConfig.h FramebufferManager: Implement deferred EFB cache invalidation 2019-03-09 12:24:04 +10:00
VideoState.cpp
VideoState.h
XFMemory.cpp
XFMemory.h FifoPlayer: reduce XF_REGS_SIZE to what we know 2018-10-08 06:54:32 +01:00
XFStructs.cpp
XFStructs.h