summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureDecoder_Common.cpp
AgeCommit message (Collapse)Author
2023-02-09TextureDecoder: Fix warning: array subscript has type ‘char’ ↵Pokechu22
[-Wchar-subscripts]
2022-07-16Add notes about precision of YUV->RGB conversion factors for XFBPokechu22
2022-07-15Use fmt::to_string for texture format overlayPokechu22
This required adding parentheses to the font used by that.
2022-07-15Remove casts to integers for texture and EFB formatsPokechu22
The only remaining casts for these types that I know of are in TextureInfo (where format_name is set to the int version of the format, and since that affects filenames and probably would break resource packs, I'm not changing it) and in TextureDecoder_Common's TexDecoder_DrawOverlay, which will be handled separately.
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2020-11-17VideoCommon: Migrate over to fmtLioncash
Migrates off the printf-based formatting where applicable.
2019-05-04Replace MathUtil::Clamp with std::clampLéo Lam
2019-04-21TextureDecoder: Move XFB decoding to CommonStenzek
This was previously missing for generic (which is used on ARM).
2018-04-12Reformat all the things!spycrab
2017-11-17HybridXFB: Fix lint errorsiwubcode
2017-11-17Remove TODOsiwubcode
2017-11-17Add support for hybrid XFBiwubcode
2017-08-21VideoCommon: Fix bug #10464 (RA4 format not handled in TextureDecoder)N.E.C
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-03-03Common: Move byte swapping utilities into their own headerLioncash
This moves all the byte swapping utilities into a header named Swap.h. A dedicated header is much more preferable here due to the size of the code itself. In general usage throughout the codebase, CommonFuncs.h was generally only included for these functions anyway. These being in their own header avoids dumping the lesser used utilities into scope. As well as providing a localized area for more utilities related to byte swapping in the future (should they be needed). This also makes it nicer to identify which files depend on the byte swapping utilities in particular. Since this is a completely new header, moving the code uncovered a few indirect includes, as well as making some other inclusions unnecessary.
2017-01-15TextureDecoder: Deduplicate some utility codehthh
2017-01-14TextureDecoder: Fix off-by-one errors in CMPRhthh
2016-12-19VideoCommon: Use avg(color1, color2) for color3 in CMPR texturesStenzek
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2015-12-01Fix lens flares in Mario Kart Wii.Scott Mansell
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-09-06General: Replace GC_ALIGN macros with alignasLioncash
Standard supported alignment -> out with compiler-specific.
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-05-25Update license headers to GPLv2+Tillmann Karras
2015-04-27TextureDecoder_Common: Add missing algorithm includeLioncash
It was being indirectly included, causing VS to syntactically mark std::min/max usages as being undefined (however it still compiled fine, of course)
2015-02-25Formatting/Whitespace CleanupStevoisiak
Various fixes to formatting and whitespace
2015-01-18TexCache: remove PC_TexFormatdegasus
We only support rgba32 for a while now, so there is no need to have everything in common configureable.
2014-12-11Silence some -Wswitch-default warnings.Rohit Nirmal
2014-09-19Fix build failing when disabling precompiled headers.Rohit Nirmal
2014-09-04TextureDecoder: Clean up the code styleJasper St. Pierre
For a long time, we've had ugly and inconsistent function names here as helpers, names like "decodebytesRGB5A3rgba" which are absolutely incomprehensible to understand. Fix this by introducing a new consistent naming scheme, where the above function now becomes "DecodeBytes_RGB5A3".
2014-09-04TextureDecoder: Simplify how the reference texture decoder worksJasper St. Pierre
Instead of having three separate functions and checking the tlutfmt in a variety of places, just do it once in a helper method. This is already for the slow path either in our Generic decoder or in our Software renderer, so it doesn't matter that this is slower. x64 will continue using the separate functions for speed.
2014-09-04TextureDecoder: Pass the TLUT address straight into the texture decoderJasper St. Pierre
This removes the requirement for the TextureDecoder to have access to global texture memory.
2014-09-04TextureDecoder: Add an enum for the TLUT formatsJasper St. Pierre
Quick code cleanup. The enum names and values come from libogc.
2014-09-04VideoCommon: Remove support for decoding to ARGB texturesJasper St. Pierre
The D3D / OGL backends only ever used RGBA textures, and the Software backend uses its own custom code for sampling. The ARGB path seems to just be dead code. Since ARGB and RGBA formats are similar, I don't think this will make the code more difficult to read or unable to be used as reference. Somebody who wants to use this code to output ARGB can simply modify the MakeRGBA function to put the shift at the other end.
2014-09-04VideoCommon: Start putting common texture decoding code in TextureDecoder_CommonJasper St. Pierre
This pulls all the duplicate code from TextureDecoder_Generic / TextureDecoder_x64 out and puts it in a common file. Out custom font used for debugging the texture cache is also pulled out and put in a common "sfont.inc" file. At some point we should also combine this font with the other six binary fonts we ship.