summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPMemory.h
AgeCommit message (Collapse)Author
2025-08-23VideoBackends / VideoCommon: rename member variables in RenderState to be ↵iwubcode
consistent
2023-11-11Add descriptions for more BP registersPokechu22
2023-11-11Clarify per-texture tmem information in the fifo analyzerPokechu22
2023-11-11Convert BPMEM_LOADTLUT1 to a structPokechu22
2023-11-11Enhance description of BPMEM_PRELOAD_MODE in the fifo analyzerPokechu22
2023-11-11Rename bpmem.copyMipMapStrideChannels to bpmem.copyDestStridePokechu22
As far as I can tell, it has nothing to do with the mipmap/half_scale functionality, but does change based on the width of the destination texture (and the destination texture is half the width if half_scale is set). The comment that was there (which dates back to the initial megacommit) seems to not have accounted for the width aspect; it was first used as an actual stride in bbbe898839467c312c31456334540c20fedc7be3 (the first commit that used it at all).
2023-11-11Fix typo in comment for bpmem.texcoordsPokechu22
2023-09-21fmt 10.0.0-10.1.1 compile fixesget
Implicit conversion operators and enums was removed for parity with std::format (https://github.com/fmtlib/fmt/commit/fce74caa15b24cbc0fcafe4706692cb06cb0b815).
2022-08-29Fifo analyzer: Improve some BP descriptionsPokechu22
Mainly, the improvements are passing in the current command ID so that e.g. stage numbers can be directly included, instead of saying 0/1 or even/odd.
2022-08-29BPMemory: Make TevKSel more clearPokechu22
It stores both the konst selection value for alpha and color channels (for two tev stages per ksel), and half of a swap table row (there are 4 total swap tables, which can be used for swizzling the rasterized color and the texture color, and indices selecting which tables to use are stored per tev stage in the alpha combiner). Since these are indexed very differently, the old code was hard to follow.
2022-08-29BPMemory: Use even/odd in TwoTevStageOrders instead of 0/1Pokechu22
2022-08-29BPMemory: Improve consistency of hex offset commentsPokechu22
I search for these somewhat often with control+f, but tend to default to adding a 0x prefix, which means I don't find them until I remove it.
2022-07-17Merge pull request #10747 from tellowkrinkle/LateUIDFixupJMC47
Add a post-cache shader UID fixup pass
2022-07-15Add extra Low and High fields to CopyFilterCoefficientsPokechu22
This struct is the only one in BPMemory that uses u64 as its base. These fields are to allow viewing it as two u32s instead. It's not used by Dolphin right now, but it is used in the copy of BPMemory.h used by hwtests.
2022-07-15Create dedicated enum for EFB/XFB gamma correctionPokechu22
This also changes the behavior for the invalid gamma value, which was confirmed to behave the same as 2.2. Note that currently, the gamma value is only used for XFB copies, even though hardware testing indicates it also works for EFB copies. This will be changed in a later commit.
2022-07-15Rename EFB copy bit 2 from yuv to unknown_bitPokechu22
It was named yuv in 522746b2c223f37c45569ee7fd4a226b278cb6d9, but hardware testing indicates that that bit does nothing (the intensity format bit enables YUV conversion, instead).
2022-07-13VideoCommon: Better driver bug handlingTellowKrinkle
Adds a pass to process driver deficiencies between UID caching and use, allowing a full view of the whole pipeline, since some bugs/workarounds involve interactions between blend modes and the pixel shader
2022-05-10fmt: fix 'ambigous overload' errorShawn Hoffman
2022-04-16VideoCommon: Create dedicated structs for scissor pos/offsetPokechu22
2022-01-13Fix non-constexpr format stringsPokechu22
2022-01-13Fix ambiguous uses of format_toPokechu22
At least in MSVC (which is not restricted from targetting C++20), these can be resolved to either std::format_to or fmt::format_to (though I'm not sure why the std one is available). We want the latter.
2022-01-13Make all fmt::formatter constructors constexprPokechu22
2022-01-13Make all custom fmt::formatter's format functions constPokechu22
fmt 8.0.0 requires this.
2021-12-20Fifo analyzer: Rename mipmap filter to half scale for EFB copiesPokechu22
The field itself is named half_scale, and it can be used for things unrelated to mipmaps, so reflecting that name in the fifo analyzer helps.
2021-12-18BPMemory: Correct spelling of MaxAnisoPokechu22
2021-12-18Fifo analyzer: Display equations for color/alpha combinersPokechu22
2021-12-18Refactor OpcodeDecoding and FIFO analyzer to use callbacksPokechu22
2021-11-25Delay singlecore gpu interruptsScott Mansell
Fixes Bomberman Jetters in single core mode. When single core mode pauses the CPU to execute the GPU FIFO it greedily executes the whole thing. Before this commit, Finish and Token interrupts would happen instantly, not even taking into account how long the current FIFO window has taken to execute. The interrupts would be effectively backdated to the start of this execution window. This commit does two things: It pipes the current FIFO window execution time though to the interrupt scheduling and it enforces a minimum delay of 500 cycles before an interrupt will be fired.
2021-10-10BPMemory: Refactor/consolidate TexUnit AddressingScott Mansell
Currently the logic for addressing the individual TexUnits is splattered all across dolphin's codebase, this commit attempts to consolidate it all into a single place and formalise it using our new TexUnitAddress struct.
2021-10-10BPMem: Abstract TexUnit Addressing into structScott Mansell
The addressing of the texture units is a bit non-obvious. This struct abstracts the complexity away.
2021-09-01BPMemory: Make ZTexOp enum an enum classLioncash
Avoids placing generic names in the surrounding namespace.
2021-07-27Remove note about anisotropic filtering requiring edge LODPokechu22
This was added because YAGCD's info on MAXANISO (near TX_SETMODE0 in Section 5.11.1) claims it's the case, but Extrems says it does work. I haven't tested anything myself, and dolphin still does not actually implement anisotropic filtering based on this field.
2021-07-20WrapMode=3 behaves the same as ClampPokechu22
2021-07-11Use separate fmt::formatters for each indirect matrix columnPokechu22
This also fixes a bug where the float version of row 1 actually showed row 0 again.
2021-07-11Ignore the top bit of the indirect texture matrix scalePokechu22
This fixes the Zora eye coloration in Twilight Princess.
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.
2021-05-07Split TevStageIndirect::mid into matrix_index and matrix_idPokechu22
2021-05-07Add 1 when displaying the number of TEV stagesPokechu22
2021-05-07Correct indirect stage ref typosPokechu22
YAGCD uses BI0/BC0/BI1/BC1/BI2/BC2/BI3/BC3, so I'm pretty sure the BI2/BC3/BI4/BC4 names are a typo that just was propagated.
2021-04-24VideoCommon: Fix scissorOffset, handle negative value correctlyezio1900
VideoCommon: Change the type of BPMemory.scissorOffset to 10bit signed: S32X10Y10 VideoBackends: Fix Software Clipper.PerspectiveDivide function, use BPMemory.scissorOffset instead of hard code 342
2021-03-06Use formatters in GetBPRegInfo; add missing commandsPokechu22
BPMEM_TEV_COLOR_ENV + 6 (0xC6) was missing due to a typo. BPMEM_BP_MASK (0xFE) does not lend itself well to documentation with the current FIFO analyzer implementation (since it requires remembering the values in BP memory) but still shouldn't be treated as unknown. BPMEM_TX_SETMODE0_4 and BPMEM_TX_SETMODE1_4 (0xA4-0xAB) were missing entirely.
2021-03-06Convert BPMemory to BitField and enum classPokechu22
Additional changes: - For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale) - In TexMode0, min_filter has been split into min_mip and min_filter. - In TexImage1, image_type is now cache_manually_managed. - The unused bit in GenMode is now exposed. - LPSize's lineaspect is now named adjust_for_aspect_ratio.
2021-03-06Add FogParam0::FloatValue and FogParam3::FloatValuePokechu22
This value will be used in the register description; so expose it in a way that can be re-used instead of calculating it in 2 places later.
2021-03-06Rename BPMEM_EFB_BR to BPMEM_EFB_WHPokechu22
2020-05-13Externals: Add zstdJosJuice
I had to rename Source/Common/Compiler.h because the VS build confuses it with Externals/zstd/lib/common/compiler.h otherwise.
2018-06-09Compiler: Rename __forceinline define to DOLPHIN_FORCE_INLINELioncash
This is much better as prefixed double underscores are reserved for the implementation when it comes to identifiers. Another reason its better, is that, on Windows, where __forceinline is a compiler built-in, with the previous define, header inclusion software that detects unnecessary includes will erroneously flag usages of Compiler.h as unnecessary (despite being necessary on other platforms). So we define a macro that's used by Windows and other platforms to ensure this doesn't happen.
2018-06-09Common: Add header for compiler-specificsLioncash
Instead of globbing things under an ambiguous Common.h header, move compiler-specifics over to Compiler.h. This gives us a dedicated home for anything related to compilers that we want to make functional across all compilers that we support. This moves us a little closer to eliminating Common.h entirely.
2018-05-28BPMemory: Silence a -Wmissing-braces warningLioncash
Fairly trivial to resolve, we just initialize the std::array with two sets of braces (one set to create the array, the other to start and end the aggregate data that we'll end up returning)
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-04-29VideoSoftware: Implement xfb copy filter (Deflickering/Brightness)Scott Mansell