Commit graph

41 commits

Author SHA1 Message Date
kd-11 d13cf0e29a rsx: Fix shader interpreter
- It broke ages ago
2023-07-04 09:31:51 +03:00
kd-11 5f0467b084 rsx: Remove framebuffer_status_valid flag and move to state 2023-01-26 11:42:39 +03:00
kd-11 6adcabda29 rsx: Fix graphics state foot-gun 2023-01-26 11:42:39 +03:00
kd-11 4def7f143c rsx: Fix logicOp behavior when blending is also active 2022-12-27 02:56:43 +03:00
Eladash 8980fc5524 rsx: Fix exceptions 2022-12-17 14:27:20 +01:00
kd-11 bd9c876e36 gl: Handle clip plane switching using API calls and the state tracker 2022-10-21 13:45:45 +03:00
kd-11 65d20f2d08 gl: Add mesa support for polygon offset 2022-10-11 14:00:34 +03:00
kd-11 a229e30b08 rsx: Implement RSX-compliant polygon offset 2022-10-11 14:00:34 +03:00
kd-11 7140e82189 rsx: Fix program invalidation rules 2022-10-07 11:53:34 +03:00
kd-11 81fa3da101 gl: Minor optimization around test..set patterns in the state tracker 2022-09-22 23:46:48 +03:00
kd-11 f43824762a rsx: Get rid of an allocation in analyse_vertex_data that adds about 5% overhead.
This method is called many thousands of times per frame and that single allocation introduces a small perf hit.
Just get rid of it, it doesn't improve anything to have it there.
2022-09-09 23:17:27 +03:00
kd-11 1c5b685398 gl: Only toggle state settings that are relevant to the current RSX state 2022-07-18 18:58:22 +03:00
kd-11 964fd1095e gl: Properly preserve texture state
- Remove rogue glBindTexture calls and use gl commandstate object instead
2022-05-31 23:34:14 +03:00
kd-11 60a2a39e88 gl: Deswizzle textures on the GPU 2022-05-31 23:34:14 +03:00
kd-11 e964060a6a gl: Handle texture binding using the global state tracker 2022-05-31 23:34:14 +03:00
kd-11 74696d2e44 gl: Commit to a consistent global state 2022-05-31 23:34:14 +03:00
kd-11 b61c4d3693 gl: Fix stat counters 2022-05-31 23:34:14 +03:00
kd-11 1592ecdc55 rsx: Invalidate transform block on program change
- Since each program now does a remap of the outputs, we need to reupload the constants
- This is not a loss, constants are almost always changing between draw calls anyway
2022-03-26 16:10:18 +03:00
kd-11 9a2d4fe46b rsx: Relocatable transform constants 2022-03-26 16:10:18 +03:00
kd-11 6812fa4764 rsx: Fix surface write coherency when MSAA is active 2022-03-08 22:06:26 +03:00
kd-11 86919ec0e1 rsx: Validate requested images before attempting to upload them
- Do not allow dimensions of 0 to reach the backend APIs
2022-01-30 14:58:51 +03:00
kd-11 f923eaf09a rsx: Surface format remapping enhancements 2022-01-17 10:28:23 +03:00
Nick Renieris 47e784d5d0 gl/vk: Scale line width & point size by resolution scaling 2021-08-17 19:29:46 +03:00
kd-11 194bfc54d1 rsx: Implement dynamic vertex offset updates
- Vertex offsets can be updated mid-draw to dynamically render different meshes without breaking up draws
2021-06-30 10:07:33 +03:00
kd-11 568af756cc rsx: Fix expired sampler descriptors
- Rebuilding when strict mode is enabled was incomplete.
  The copy has to be redone if the source has been updated.
2021-06-06 15:37:47 +03:00
kd-11 c5a06dab0a rsx: Refactor program texture state handling to be persistent across shader swaps 2021-05-15 23:51:12 +03:00
Nekotekina 03332c340d Implement utils::bless (pointer cast)
Tries to workaround strict aliasing troubles.
Don't confuse with std::bless which works differently.
2021-03-10 16:02:00 +03:00
kd-11 0ef5743261 rsx: Fix sampler descriptor updates for framebuffer resources
- Each desc manages its own lifetime now instead of relying on global timestamp check
- Fixes situation where same object remains active without update for long
2020-12-16 10:10:06 +03:00
kd-11 f83c2f0b6b rsx: Restructure and simplify some header include chains 2020-12-13 15:38:35 +03:00
kd-11 d775c8dc73 rsx: Move shader analysis+prefetch to the end of the draw call 2020-12-13 15:38:35 +03:00
Nekotekina a6a5292cd7 Use uptr (std::uintptr_t alias) 2020-12-12 16:29:55 +03:00
Nekotekina 36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
kd-11 3a0b3a85a5 rsx: Separate program environment state from program ucode state
- Allows for conservative texture uploads
- Allows to update a program object without running full ucode analysis for no reason
2020-12-07 00:45:27 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
kd-11 6380e67af9 rsx: Fix depth clipping
- Fix special case where n=f making (f-n) = 0
- Dynamically update depth range by setting dirty bits
- Fix depth bounds when n=f and bounds test is disabled
2020-09-08 15:33:08 +03:00
kd-11 dc465df3bc rsx: Enable support for extended range in depth buffer
- Software clipping emulation is used here as OpenGL does not have explicit clip control.
- Hardware clip control for vulkan to be enabled after this.
2020-09-08 15:33:08 +03:00
kd-11 8d8fb4a2e4 rsx: Remove ARGB->D24S8 conversion shader which has been deprecated for years since compute capabilities were added to the emulator 2020-06-15 14:18:12 +03:00
Ani 661636efef gl: Check for EXT_depth_bounds_test
Avoid glEnable/glDisable GL_DEPTH_BOUNDS_TEST_EXT flood that returns 
GL_INVALID_ENUM if the feature isn't supported
2020-05-16 14:50:05 +01:00
Megamouse cf229a8e9f some more dynamic settings 2020-04-15 18:25:25 +02:00
scribam f37adc4188 Add fallthrough attribute 2020-04-14 17:06:58 +03:00
kd-11 4965bf7d7a gl/vk: Refactor draw call handling and stub shader interpreter
- Refactors backend draw call management to make it easier to extend
  functionality.
- Stubs shader interpreter functionality.
2020-03-23 14:47:28 +03:00