summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp
AgeCommit message (Collapse)Author
2018-05-22EFB2RAM: Apply copy filter as a float coefficient after samplingStenzek
Using 8-bit integer math here lead to precision loss for depth copies, which broke various effects in games, e.g. lens flare in MK:DD. It's unlikely the console implements this as a floating-point multiply (fixed-point perhaps), but since we have the float round trip in our EFB2RAM shaders anyway, it's not going to make things any worse. If we do rewrite our shaders to use integer math completely, then it might be worth switching this conversion back to integers. However, the range of the values (format) should be known, or we should expand all values out to 24-bits first.
2018-05-11D3D/Vulkan: Fix incorrect clamp in EFB RAM copyStenzek
This could cause darker-than-expected EFB copies if clamping was not enabled, and the user forced EFB copies to RAM only.
2018-04-29Implement EFB copy filter and gamma in hardware backendsStenzek
Also makes y_scale a dynamic parameter for EFB copies, as it doesn't make sense to keep it as part of the uid, otherwise we're generating redundant shaders.
2018-03-14Assert: Uppercase assertion macrosLioncash
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
2018-03-01AbstractTexture: Support multisampled abstract textureStenzek
2018-03-01VideoBackends: Restore the framebuffer as part of the API stateStenzek
It's not often we switch out to draw to the EFB anyway.
2017-12-02VideoCommon: Rename TextureConversionShader namespace.degasus
2017-11-22D3D: Use new readback methods for EFB2RAMStenzek
2017-11-17HybridXFB: Fix lint errorsiwubcode
2017-11-17Video Backends: Implement vertical scaling for xfb copies. This fixes theiwubcode
display of PAL games that run in 50hz mode.
2017-11-17Add support for hybrid XFBiwubcode
2017-11-03Fix incorrect handling of auto IRJosJuice
Some lines of code in Dolphin just plainly grabbed the value of g_ActiveConfig.iEFBScale, which resulted in Auto being treated as 0x rather than the actual automatically selected scale.
2017-10-30D3D Backend: Change encoding parameter types from DWORD to our platform ↵iwubcode
agnostic types
2017-09-04D3D: Support logic op through integer render target viewStenzek
This brings D3D to parity with OpenGL and Vulkan.
2017-08-08Remove non-integer IRsJosJuice
2017-08-03Video: Clearly separate Texture and EFB Copy formatsN.E.C
Improve bookkeeping around formats. Hopefully make code less confusing. - Rename TlutFormat -> TLUTFormat to follow conventions. - Use enum classes to prevent using a Texture format where an EFB Copy format is expected or vice-versa. - Use common EFBCopyFormat names regardless of depth and YUV configurations.
2017-04-12VideoBackends: Support updated texture encoding shader generatorsStenzek
2017-03-04VideoCommon: Eliminate static state in RendererStenzek
2017-02-01ShaderGenCommon: Remove unnecessary includesLioncash
2016-12-26TextureCache: Extract BP enum check to VideoCommon.degasus
We have TOO many video backends.
2016-09-07EFB2RAM: Downsample higher resolutions with linear filtering.Scott Mansell
2016-07-29VideoCommon: Make API_TYPE an enum classLioncash
Allows for forward declarations in most places, which prevents dumping unrelated VideoCommon.h contents directly into headers.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-12-08D3D: Fix EFB depth buffer copies, filtering on scaled EFB copies when MSAA ↵Stenzek
is enabled, real XFB filtering Since ResolveSubresource cannot be used with depth textures (and throws an error with the debug layer enabled), use a shader which selects the minimum depth value from all samples. Changes the sampler by XFBEncoder to use a linear filter, rather than point, to match GL behavior.
2015-11-18Merge pull request #3191 from lioncash/rektMarkus Wick
MathUtil: Minor changes to Rectangle
2015-11-15D3D-TextureEncoder: Remove TCache::Entry usagedegasus
2015-10-22TextureCacheBase: Change CacheLinesPerRow to BytesPerRowLioncash
2015-10-20MathUtil: Make Rectangle constructors and equality operator constexprLioncash
2015-09-17Remove segfault from DX11 backend.Scott Mansell
Instead of blindly using the expected width, clamp it to the stride of the buffer which dx11 returns. This prevents use from reading invalid memory at the end of textures. This doesn't solve the base issue of what to do when a game tries to copy from outside the efb. On real hardware it returns random noise (biased to all ones)
2015-09-06Move common EFB copy code into VideoCommonScott Mansell
Addded a few duplicated depth copy texture formats to the enum in TextureDecoder.h. These texture formats were already implemented in TextureCacheBase and the ogl/dx11 texture cache implementations.
2015-09-05Cleanup and unify handling of efb copy stride.Scott Mansell
2015-06-28Use emplace() instead of insert() where applicable for maps.Lioncash
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-02-12D3D: Add debug object name for efb encoder pixel shadermr.greywater
2015-02-08D3D: Fixed crash rendering EFB textures with MSAAmr.greywater
Rendering EFB textures currently crashes with the D3D backend when MSAA is enabled, because the depth texture wasn't correctly resolved. An example for a crash would be starting Pokemon Snap with D3D and MSAA enabled.
2015-01-25Remove some debugging junk.magumagu
2015-01-25Use linear sampling in ScaleByHalf mode.magumagu
2015-01-25Fix stupid mistake.magumagu
2015-01-25More work.magumagu
2015-01-25WIP.magumagu
2014-12-18D3D: Set the geometry shader before every draw call.Jules Blok
And refactor the VertexManager draw call.
2014-12-14D3D: Define decimals in floating point numbersJules Blok
2014-12-14PSTextureEncoder: Add texture array support.Jules Blok
We only read the first slice, because EFB2RAM doesn't support texture arrays.
2014-12-07D3D: Fixed debug validation errorYuriy O'Donnell
A texture was still being bound when OMSetRenderTargets is called. State manager resource cache must be flushed to unbind it. This fixes The Last Story cut scene rendering.
2014-12-07D3D: Fixed StateManager member function name caseYuriy O'Donnell
2014-12-07D3D: Implemented context state cachingYuriy O'Donnell
This avoids most of the redundant API calls.
2014-10-15D3D: moved render state cache implementation to D3DState.h/cppYuriy O'Donnell
2014-07-07D3D: Use std::strings for Compile[x]Shader and CompileAndCreate[x]ShaderLioncash
With strings, we don't need to care about passing in a length, since it internally stores it. So now, we don't even need a length parameter for these functions anymore as well. This also kills off some sprintf_s calls.
2014-04-15D3D11 backend: fix rounding in texture encoder.magumagu
We need to explicitly round when converting colors from float to uint because multiplying a normalized float by 255 might not result in a whole number. (The exact result here may vary depending on your drivers/hardware.) Ideally, we shouldn't be using floating point here, but fixing that is a much more complicated patch. Fixes gxtest TEV tests using Intel HD 4000.