Commit Graph

4539 Commits

Author SHA1 Message Date
85025612bc LightingShaderGen: Make s_lighting_struct not inline
This generated warnings on the freebsd builder.
2021-12-22 15:17:52 -08:00
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
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
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
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
e7d5f8ad5c TextureCacheBase: Re-wrap GetTexture comment 2021-12-18 15:21:48 -08:00
d1cc539476 BPMemory: Correct spelling of MaxAniso 2021-12-18 15:21:48 -08:00
27cb704466 Eliminate VarType for ComponentFormat 2021-12-18 15:21:48 -08:00
1a964891f8 VertexLoader_Color: Use Common::swap24 2021-12-18 15:21:48 -08:00
95e0f833f9 Fifo analyzer: Display equations for color/alpha combiners 2021-12-18 15:21:48 -08:00
0afe318b55 OpcodeDecoding: Make s_is_fifo_error_seen static 2021-12-18 15:21:48 -08:00
d039b1bc0d VideoCommon: Move VertexLoaderManager logic out of CPState 2021-12-18 15:21:48 -08:00
d84d695fdf Remove DataReader from LoadXFReg 2021-12-18 15:21:48 -08:00
b5fd35f951 Refactor OpcodeDecoding and FIFO analyzer to use callbacks 2021-12-18 15:21:36 -08:00
1914087998 Create and use CPArray enum class 2021-12-18 12:51:56 -08:00
3aaeb2b9ef Convert OpcodeDecoder::Opcode and OpcodeDecoder::Primitive to enum class 2021-12-18 12:51:56 -08:00
205ab23d80 GeometryShaderGen: Convert to EnumMap 2021-12-18 12:51:55 -08:00
f53dc6564f UberShaderPixel: Convert to EnumMap 2021-12-18 12:51:55 -08:00
380b333387 PixelShaderGen: Convert to EnumMap 2021-12-18 12:51:55 -08:00
2b1d1038a6 VertexLoader: Convert to EnumMap 2021-12-18 12:51:55 -08:00
327126d1e8 ShaderGenCommon: Add WriteSwitch 2021-12-18 12:51:55 -08:00
2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
74a979db09 UberShaderPixel: Add shader logic ops support on OpenGL ES 2021-12-06 22:36:40 -05:00
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
a77ae14d94 UberShaderPixel: Add shader logic ops support on Metal 2021-12-06 22:36:40 -05:00
e0837cb847 PixelShaderGen: Add shader logic ops support on Metal 2021-12-06 22:36:40 -05:00
426c68b5a0 ShaderCache: Don't turn on logic ops approximation if framebuffer fetch is supported 2021-12-06 22:36:40 -05:00
c12b9b013b PixelShaderGen: Add logic ops to pixel_shader_uid_data 2021-12-06 22:36:34 -05:00
0327bc2ab6 Merge pull request #10256 from malleoz/show-rerecord-count
Renderbase: Show rerecord count
2021-12-03 14:42:10 +13:00
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
e4fed7cce8 Add Rerecord Count display
Simply shows Movie::s_rerecords in the ImGui Movie window
2021-11-30 20:08:29 -05:00
04ec02c06b ConstantManager: Add logic ops to PixelShaderConstants 2021-11-24 17:52:26 -05:00
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
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
f43122cd8a Trust MacOS not to crash during shader pre-compilation 2021-11-22 15:32:28 +01:00
613c4563c2 VideoCommon: Gate Multi-Threaded Shader Pre-Compilation behind a bug entry 2021-11-22 09:34:28 +01:00
61cfd8696e Fix CPU Core Count detection and Enable Parallel Shader Compilation
This does this following things:

- Default to the runtime automatic number of threads for pre-compiling shaders
- Adds a distinct automatic thread count computation for pre-compilation  (which has less other things going on
and should scale better beyond 4 cores)
- Removes the unused logical_core_count field from the CPU detection
- Changes the semantics of num_cores from maximaum addressable number of cores to actually available CPU cores
(which is also how it was actually used)
- Updates the computation of the HTT flag now that AMD no longer lies about it for its Zen processors
- Background shader compilation is *not* enabled by default
2021-11-20 16:08:10 +01:00
dbaebdc585 Merge pull request #10222 from phire/fix-copy-filter-clamping
Fix copy filter clamping
2021-11-18 17:48:33 -05:00
94ccf765af Add option for setting the PNG zlib compression level 2021-11-18 13:10:22 -08:00
1adff1c467 VideoCommon: Skip textureQueryLevels if it doesn't exist 2021-11-17 21:28:39 -08:00
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
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
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
51e3334526 VideoCommon: Use coarse derivatives for Manual Texture Sampling if possible 2021-11-17 20:04:34 -08:00
ddf2691395 VideoCommon: Manually handle texture wrapping and sampling 2021-11-17 20:04:34 -08:00
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
9ef228503a VideoCommon: Provide raw texdims to shaders 2021-11-17 20:04:34 -08:00
a273b65566 RenderState: Use operator== for operator!= and adjust constructors 2021-11-17 20:04:34 -08:00
6236a0d494 Eliminate SamplerCommon 2021-11-17 20:04:34 -08:00
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