Commit Graph
7 Commits
Author SHA1 Message Date
wildcard 338ea4e9d5 [texture_pass] Re-Add caching optimization for Texture_Pass (#3356)
Caching optimization for Texture_Pass
 (#481)

Add Caching per texture_pass and optimize sorting to single pass.
Use Logical shift instead of arithmetic shift.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3356
Reviewed-by: MaranBr <[email protected]>
Reviewed-by: Maufeat <[email protected]>
Co-authored-by: wildcard <[email protected]>
Co-committed-by: wildcard <[email protected]>
2026-01-21 13:38:35 +01:00
wildcard 8ed05425dd [Vulkan][TextureCache] Always use identity-swizzled views for storage images (#321)
Validation flagged writes to a VK_DESCRIPTOR_TYPE_STORAGE_IMAGE descriptor because the bound VkImageView had a non-identity component mapping  and hence the vuid-00336 error, this fixes the said error.

------

This commit helps to fix some graphical issues on games like Trident's Tale, where game didn't render anything than just plain terrain, helps to stabilize Nier Automata graphical issues, meanwhile the most annoying glitches are gone, there's still remain other issues.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/321
Reviewed-by: CamilleLaVey <[email protected]>
Co-authored-by: wildcard <[email protected]>
Co-committed-by: wildcard <[email protected]>
2025-08-28 05:21:05 +02:00
wildcard 4eb6d10d62 [Vk] Improve Stencil Handling and Fix Read-After-Write Hazard (#235)
1. Improves stencil handling:
   - Adds surface type detection to distinguish between color, depth, stencil, and depth-stencil formats
   - Only enables stencil load/store operations for surfaces that actually contain stencil data
   - Avoids unnecessary stencil operations for non-stencil formats (DONT_CARE)

2. Fixes read-after-write (RAW) synchronization hazards:
   - Adds a subpass self-dependency (subpass 0 → subpass 0)
   - Synchronizes color/depth writes with subsequent shader reads
   - Uses VK_DEPENDENCY_BY_REGION_BIT for efficient synchronization
   - Covers all possible relevant stages,
     • src: Color output + Early/Late fragment tests
     • dst: Fragment shader
     • Access: Write → Read transitions
here is what hazard looks like [1147.550616] Render.Vulkan <Critical> video_core/vulkan_common/vulkan_debug_callback.cpp:DebugUtilCallback:55: Validation Error: [ SYNC-HAZARD-READ-AFTER-WRITE ] Object 0: handle = 0x7409630000000192, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0xe4d96472 | vkCmdDrawIndexed: Hazard READ_AFTER_WRITE for VkImageView 0x7409630000000192[], in VkCommandBuffer 0xb400007cb003ea70[], and VkPipeline 0x44d3470000000213[], VkDescriptorSet 0x0[], type: VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, imageLayout: VK_IMAGE_LAYOUT_GENERAL, binding #2, index 0. Access info (usage: SYNC_FRAGMENT_SHADER_SHADER_SAMPLED_READ, prior_usage: SYNC_IMAGE_LAYOUT_TRANSITION, write_barriers: SYNC_FRAGMENT_SHADER_COLOR_ATTACHMENT_READ|SYNC_FRAGMENT_SHADER_DEPTH_STENCIL_ATTACHMENT_READ|SYNC_FRAGMENT_SHADER_INPUT_ATTACHMENT_READ|SYNC_EARLY_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_READ|SYNC_EARLY_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_WRITE|SYNC_LATE_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_READ|SYNC_LATE_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_WRITE|SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_READ|SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_WRITE|SYNC_SUBPASS_SHADER_HUAWEI_INPUT_ATTACHMENT_READ, command: vkCmdPipelineBarrier, seq_no: 45, reset_no: 129).

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/235
Reviewed-by: crueter <[email protected]>
Reviewed-by: Shinmegumi <[email protected]>
Co-authored-by: wildcard <[email protected]>
Co-committed-by: wildcard <[email protected]>
2025-08-23 20:04:48 +02:00
wildcardandcrueter 394ee0dc82 [Vk] FixSampleShading (#218)
Co-authored-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/218
Co-authored-by: wildcard <[email protected]>
Co-committed-by: wildcard <[email protected]>
2025-08-15 01:17:38 +02:00
wildcardandMaranBr 444b9f361e [VK] PR 180 extension (#257)
fyi there is nothing called VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL

Co-authored-by: MaranBr <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/257
Reviewed-by: Lizzie <[email protected]>
Reviewed-by: crueter <[email protected]>
Reviewed-by: Shinmegumi <[email protected]>
Co-authored-by: wildcard <[email protected]>
Co-committed-by: wildcard <[email protected]>
2025-08-14 01:39:18 +02:00
wildcard 1465757ded [VK] Only enable executable properties when debugging is enabled, extension of pr 243 (#256)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/256
Reviewed-by: Shinmegumi <[email protected]>
Co-authored-by: wildcard <[email protected]>
Co-committed-by: wildcard <[email protected]>
2025-08-13 19:49:45 +02:00
wildcardandcrueter 41ffa5a342 [core, nce] module_id cache key handling (#195)
Uses Module_id plus offset for cache key, Module_id is unique to each module. Also passes the module_id everytime new patcher is created in case the module is too big.

Co-authored-by: crueter <[email protected]>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/195
Reviewed-by: crueter <[email protected]>
Co-authored-by: wildcard <[email protected]>
Co-committed-by: wildcard <[email protected]>
2025-08-04 18:41:28 +02:00