Pokechu22
85025612bc
LightingShaderGen: Make s_lighting_struct not inline
...
This generated warnings on the freebsd builder.
2021-12-22 15:17:52 -08:00
JosJuice
e6f40fa015
Merge pull request #10279 from Pokechu22/intensity-alpha
...
TextureConverterShaderGen: Set alpha to 1 on intensity formats if EFB lacks alpha
2021-12-23 00:14:06 +01:00
JMC47
b1f79d9ecf
Merge pull request #10215 from OatmealDome/shader-logic-ops
...
VideoCommon: Support shader logic ops on Metal (Apple GPUs) and OpenGL ES
2021-12-22 16:39:54 -05:00
Pokechu22
fd2324e40a
Fifo analyzer: Rename mipmap filter to half scale for EFB copies
...
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-20 11:34:05 -08:00
Pokechu22
2f6953efb6
TextureConverterShaderGen: Set alpha to 1 on intensity formats if EFB lacks alpha
...
We were already doing this for non-intensity formats, but it seems like the same applies to intensity formats.
2021-12-20 11:34:05 -08:00
Pokechu22
e7d5f8ad5c
TextureCacheBase: Re-wrap GetTexture comment
2021-12-18 15:21:48 -08:00
Pokechu22
d1cc539476
BPMemory: Correct spelling of MaxAniso
2021-12-18 15:21:48 -08:00
Pokechu22
27cb704466
Eliminate VarType for ComponentFormat
2021-12-18 15:21:48 -08:00
Pokechu22
1a964891f8
VertexLoader_Color: Use Common::swap24
2021-12-18 15:21:48 -08:00
Pokechu22
95e0f833f9
Fifo analyzer: Display equations for color/alpha combiners
2021-12-18 15:21:48 -08:00
Pokechu22
0afe318b55
OpcodeDecoding: Make s_is_fifo_error_seen static
2021-12-18 15:21:48 -08:00
Pokechu22
d039b1bc0d
VideoCommon: Move VertexLoaderManager logic out of CPState
2021-12-18 15:21:48 -08:00
Pokechu22
d84d695fdf
Remove DataReader from LoadXFReg
2021-12-18 15:21:48 -08:00
Pokechu22
b5fd35f951
Refactor OpcodeDecoding and FIFO analyzer to use callbacks
2021-12-18 15:21:36 -08:00
Pokechu22
1914087998
Create and use CPArray enum class
2021-12-18 12:51:56 -08:00
Pokechu22
3aaeb2b9ef
Convert OpcodeDecoder::Opcode and OpcodeDecoder::Primitive to enum class
2021-12-18 12:51:56 -08:00
Pokechu22
205ab23d80
GeometryShaderGen: Convert to EnumMap
2021-12-18 12:51:55 -08:00
Pokechu22
f53dc6564f
UberShaderPixel: Convert to EnumMap
2021-12-18 12:51:55 -08:00
Pokechu22
380b333387
PixelShaderGen: Convert to EnumMap
2021-12-18 12:51:55 -08:00
Pokechu22
2b1d1038a6
VertexLoader: Convert to EnumMap
2021-12-18 12:51:55 -08:00
Pokechu22
327126d1e8
ShaderGenCommon: Add WriteSwitch
2021-12-18 12:51:55 -08:00
Pokechu22
2025763420
Treewide: Adjust order of includes
2021-12-10 14:49:57 -08:00
OatmealDome
74a979db09
UberShaderPixel: Add shader logic ops support on OpenGL ES
2021-12-06 22:36:40 -05:00
OatmealDome
18b2f6953d
PixelShaderGen: Add shader logic ops support on OpenGL ES
...
To do this, I had to decouple framebuffer fetch from shader blending. We need to be able to access framebuffer fetch input when using shader logic ops.
2021-12-06 22:36:40 -05:00
OatmealDome
a77ae14d94
UberShaderPixel: Add shader logic ops support on Metal
2021-12-06 22:36:40 -05:00
OatmealDome
e0837cb847
PixelShaderGen: Add shader logic ops support on Metal
2021-12-06 22:36:40 -05:00
OatmealDome
426c68b5a0
ShaderCache: Don't turn on logic ops approximation if framebuffer fetch is supported
2021-12-06 22:36:40 -05:00
OatmealDome
c12b9b013b
PixelShaderGen: Add logic ops to pixel_shader_uid_data
2021-12-06 22:36:34 -05:00
Scott Mansell
0327bc2ab6
Merge pull request #10256 from malleoz/show-rerecord-count
...
Renderbase: Show rerecord count
2021-12-03 14:42:10 +13:00
JMC47
c12e4e8ee0
Merge pull request #10244 from phire/ban-timetravel
...
Delay singlecore gpu interrupts; Fixes Bomberman Jetters in single core mode.
2021-12-02 07:21:41 -05:00
sowens99
e4fed7cce8
Add Rerecord Count display
...
Simply shows Movie::s_rerecords in the ImGui Movie window
2021-11-30 20:08:29 -05:00
OatmealDome
04ec02c06b
ConstantManager: Add logic ops to PixelShaderConstants
2021-11-24 17:52:26 -05:00
Scott Mansell
f5c550e9cb
Delay singlecore gpu interrupts
...
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-11-25 11:11:01 +13:00
Léo Lam
aa5cb35c86
Merge pull request #10143 from Pokechu22/png-compression-level
...
Add option for setting the PNG zlib compression level
2021-11-23 16:40:34 +01:00
JMC47
dbaebdc585
Merge pull request #10222 from phire/fix-copy-filter-clamping
...
Fix copy filter clamping
2021-11-18 17:48:33 -05:00
Pokechu22
94ccf765af
Add option for setting the PNG zlib compression level
2021-11-18 13:10:22 -08:00
Pokechu22
1adff1c467
VideoCommon: Skip textureQueryLevels if it doesn't exist
2021-11-17 21:28:39 -08:00
Pokechu22
bdcfb31187
VideoCommon: Handle custom texture sizes correctly
...
Specifically, when using Manual Texture Sampling, if textures sizes don't match the size the game specifies, things previously broke. That can happen with custom textures, and also with scaled EFB copies at non-native IRs. It breaks most obviously by not scaling the texture coordinates (so only part of the texture shows up), but the hardware wrapping functionality also assumes texture sizes are a power of 2 (or else it will behave weirdly in a way that matches how hardware behaves weirdly). The fix is to provide alternative texture wrapping logic when custom texture sizes are possible.
2021-11-17 21:28:36 -08:00
Pokechu22
93eea7cb13
VideoCommon: Add option to use old behavior (Fast Texture Sampling)
...
Co-authored-by: JosJuice <josjuice@gmail.com>
2021-11-17 21:27:32 -08:00
Pokechu22
ee80298ca4
VideoCommon: Implement diagonal LOD
...
Note that both GLSL and HLSL provide a fwidth (fragment width) function defined as `fwidth(p) = abs(dFdx(p)) + abs(dFdy(p))`. However, it's easy enough to implement this ourselves (and it makes the code a bit more obvious).
2021-11-17 20:04:34 -08:00
Pokechu22
51e3334526
VideoCommon: Use coarse derivatives for Manual Texture Sampling if possible
2021-11-17 20:04:34 -08:00
Pokechu22
ddf2691395
VideoCommon: Manually handle texture wrapping and sampling
2021-11-17 20:04:34 -08:00
Pokechu22
4a9b26de86
VideoCommon: Expose SamplerState to shaders
...
The benefit to exposing this over the raw BP state is that adjustments Dolphin makes, such as LOD biases from arbitrary mipmap detection, will work properly.
2021-11-17 20:04:34 -08:00
Pokechu22
9ef228503a
VideoCommon: Provide raw texdims to shaders
2021-11-17 20:04:34 -08:00
Pokechu22
a273b65566
RenderState: Use operator== for operator!= and adjust constructors
2021-11-17 20:04:34 -08:00
Pokechu22
6236a0d494
Eliminate SamplerCommon
2021-11-17 20:04:34 -08:00
Pokechu22
3096f77ba0
Eliminate SamplerCommon::AreBpTexMode0MipmapsEnabled
...
This was added in 0b9a72a62d
but became irrelevant in 70f9fc4e75
as the check is now self-explanatory due to a rejiggering of the bitfields.
2021-11-17 20:04:34 -08:00
Pokechu22
d2041b4c2a
VideoCommon: Add signed version of BitfieldExtract
2021-11-17 20:04:33 -08:00
Pokechu22
555a93057c
VideoCommon: Allow BitfieldExtract in specialized shaders
2021-11-17 20:04:33 -08:00
Scott Mansell
7128befb39
Fix copy filter clamping regression in Spyro
...
This fixes horizontal lines in the bloom effect of Spyro: A Hero's Tail,
which is a regression caused by PR #10204
Screenshot of regression:
https://user-images.githubusercontent.com/138484/142030503-90fcd8d5-63d3-4820-874a-72e9be0c4768.png
Fixed:
https://user-images.githubusercontent.com/138484/142031598-b85ff55c-1302-4e4d-bcb2-57848974056b.png
Spyro uses an 640x80 pixel sub-buffer within the EFB to calculate
it's bloom effects, which it places below the main 640x448 buffer.
EFB layout:
https://user-images.githubusercontent.com/138484/142030573-e933b6ae-c37e-4be6-86d4-0bc779b92535.png
Note: Colors are wrong because the main color buffer uses RGBA6,
while the bloom is calculated in RGB8
This allows it to do bloom without backing up part of the EFB to
main memory, as most games do.
But, since some of the sub-buffers used in the bloom effect are taller
than 80 pixels, they need to be sliced up into smaller sub, sub buffers
which get combined later when copied to main memory.
At one point, a 320x224 buffer is broken up into 320x80, 320x64 and
320x80 slices. These are copied out with the copy filter set to a
vertical blur.
Because there was an off-by-one errror in the clamping coordinates,
the bottom line of the color buffer would be blurred into
the top of each slice.
Final combined EFB copy:
https://user-images.githubusercontent.com/138484/142031360-2c076839-7c96-4b3b-a093-d899d0a2c7ae.png
Fixed version:
https://user-images.githubusercontent.com/138484/142031370-72e41a35-3b3e-4662-a483-79203e357ecc.png
Before #10204 the copy filter wasn't enabled for efb copies, and most
other games don't do this type of slicing.
FIFO CI shows that a few other games are effected, it's always just a minor difference to the top line where there was previously a slight hint of garbage.
2021-11-17 06:12:46 +13:00