Commit Graph

38497 Commits

Author SHA1 Message Date
Ryzee119 98a3974290 apu: Bail from audio sink callback on app exit 2025-07-29 14:49:39 -07:00
Erik Abair 196726b898
nv2a/gl: Allocate only needed size for inline arrays
Some HW/driver combinations appear to slow down dramatically when using very
large GL buffers. Since the GL buffer supporting inline arrays is allocated
after the guest `END`, the total size needed is known and the buffer may be
sized appropriately.

It would be good to test performance in games that use relatively large inline
arrays (e.g., "King of Fighters 2003").

Fixes #2301
2025-07-20 16:59:31 -07:00
Matt Borgerson ab811bf987 nv2a: Const-ify some function parameters 2025-07-02 21:26:17 -07:00
Matt Borgerson 7908bcbbe6 nv2a: Const-ify LRU callback key parameters 2025-07-02 21:21:08 -07:00
Matt Borgerson 62ab68b2ab n2va/vk: Drop some useless includes 2025-07-02 20:22:18 -07:00
Matt Borgerson 21284ba3f2 nv2a/vk: Update some copyrights 2025-07-02 20:22:01 -07:00
Matt Borgerson 1a8a8ad03d nv2a/vk: Initialize ShaderBinding in shader_cache_entry_init 2025-07-02 20:11:30 -07:00
Matt Borgerson 90a0187e9b nv2a: Move numeric locale setup to main 2025-07-02 20:11:30 -07:00
Matt Borgerson 4921607c90 nv2a/vk: Group module info and locs in ShaderBinding 2025-07-02 20:11:30 -07:00
Matt Borgerson dd3f4db0a9 nv2a/vk: Cache shader modules 2025-07-02 20:11:30 -07:00
Matt Borgerson 880bea3e5e nv2a/gl: Cache shader modules 2025-07-02 20:11:30 -07:00
Matt Borgerson dcd524c4bc nv2a: Split nv2a_pgraph_surface_cpu_access trace into read/write 2025-07-02 01:41:09 -07:00
Matt Borgerson 966115336a nv2a: Fix CPU surface access callback race and use-after-free 2025-07-02 01:41:09 -07:00
Matt Borgerson 80f7efaba5 nv2a/glsl: Define inlineValue uniform only when necessary 2025-06-28 16:09:06 -07:00
Matt Borgerson 1dbfc3e21a nv2a/glsl: Fix duplicate inlineValue uniform declaration 2025-06-28 16:09:06 -07:00
Matt Borgerson 41a4b3f2a3 nv2a/glsl: Fix push constant range 2025-06-28 16:09:06 -07:00
Matt Borgerson 8cc83dfc43 nv2a/glsl: Remove some more redundant comments 2025-06-28 00:18:28 -07:00
Matt Borgerson 0b96cc503d nv2a/gl: Validate shader program after texture samplers are set 2025-06-28 00:18:28 -07:00
Matt Borgerson f2c5b80951 nv2a/glsl: Simplify some mstring uses in pgraph_glsl_gen_vsh 2025-06-28 00:18:28 -07:00
Matt Borgerson 8a606ae37f nv2a/glsl: Simplify some mstring uses in pgraph_glsl_gen_geom 2025-06-28 00:18:28 -07:00
Matt Borgerson 1489253c68 nv2a/glsl: Add glsl_ prefix to public functions 2025-06-28 00:18:28 -07:00
Matt Borgerson cbcb7c2181 nv2a/glsl: Factor out geometry state to GeomState 2025-06-28 00:18:28 -07:00
Matt Borgerson c29546e2e1 nv2a: Rename update_shader_{constant_locations -> uniform_locs} 2025-06-28 00:18:28 -07:00
Matt Borgerson d3606813eb nv2a/vk: Fix DGROUP_BEGIN order nit 2025-06-28 00:18:28 -07:00
Matt Borgerson 5b885e5851 nv2a/gl: Add format attr to gl_debug_* 2025-06-28 00:18:28 -07:00
Matt Borgerson c05f2746f4 nv2a/gl: Fix DGROUP_BEGIN in pgraph_gl_bind_shaders 2025-06-28 00:18:28 -07:00
Matt Borgerson 3e6e9c9d6c nv2a/glsl: Clean up some includes 2025-06-28 00:18:28 -07:00
Matt Borgerson 7804fc0656 nv2a/glsl: Move clipRange value calc to helper func 2025-06-28 00:18:28 -07:00
Matt Borgerson d17be812ea nv2a/glsl: Unify dirty shader state check 2025-06-28 00:18:28 -07:00
Matt Borgerson b7eb957e65 nv2a/glsl: Move append_skinning_code up 2025-06-28 00:18:28 -07:00
Matt Borgerson 0e29758036 nv2a/glsl: Clean up some whitespace 2025-06-28 00:18:28 -07:00
Matt Borgerson df4d8cc027 nv2a/glsl: Simplify pgraph_gen_vsh_prog_glsl mstring use 2025-06-28 00:18:28 -07:00
Matt Borgerson 368b9f5346 nv2a: Move some VSH definitions to vsh_regs.h 2025-06-28 00:18:28 -07:00
Matt Borgerson b72119da41 nv2a/glsl: Remove some redundant comments 2025-06-28 00:18:28 -07:00
Matt Borgerson fc28b9c817 nv2a: Move PSH definitions to psh_regs.h 2025-06-28 00:18:28 -07:00
Matt Borgerson 4e6c6518f9 nv2a: Add _regs suffix to vsh.h and psh.h 2025-06-28 00:18:28 -07:00
Matt Borgerson 55705002c5 nv2a/glsl: Be consistent in name of state parameter 2025-06-28 00:18:28 -07:00
Matt Borgerson 22b242b2d6 nv2a/glsl: Let pgraph_gen_vsh_glsl take a pointer to PshState 2025-06-28 00:18:28 -07:00
Matt Borgerson 1930934908 nv2a/glsl: Clean up some includes 2025-06-28 00:18:28 -07:00
Matt Borgerson b8fd711012 nv2a/glsl/vsh-prog.h: Include mstring.h 2025-06-28 00:18:28 -07:00
Matt Borgerson afadedf90b nv2a/glsl/vsh-prog.h: Drop 'Based on' claim 2025-06-28 00:18:28 -07:00
Matt Borgerson 34e8c62a42 nv2a: Move {Vsh,Psh}State generation into glsl subdir 2025-06-28 00:18:28 -07:00
Matt Borgerson bebffc7d64 nv2a/glsl: Let pgraph_gen_geom_glsl take VshState and GlslOptions 2025-06-28 00:18:28 -07:00
Matt Borgerson 8bda9507bd nv2a/glsl: Invert fog gen blocks for readability 2025-06-28 00:18:28 -07:00
Matt Borgerson 45724b34e6 nv2a: Drop some unnecessary comments 2025-06-28 00:18:28 -07:00
Matt Borgerson c88bac1706 nv2a: Simplify shader uniform declaration and update
This patch moves uniform declaration into {vsh, psh}.h headers, using
macros to generate accessory definitions. Mapping of PGRAPH state to
uniform values is factored out of parallel paths in GL/Vk renderers into
common renderer-agnostic helper functions, with renderer-specific
uniform value update paths being automated.
2025-06-28 00:18:28 -07:00
Matt Borgerson 18872f2eb9 nv2a: Update various copyright headers 2025-06-28 00:18:28 -07:00
Matt Borgerson d3821c5513 nv2a: Structure shader uniform locs 2025-06-28 00:18:28 -07:00
Matt Borgerson 07ff078373 nv2a/gl: Move program validation to generate_shaders 2025-06-28 00:18:28 -07:00
Matt Borgerson 4977e65bd5 nv2a/vk: Clean up layout binding ids 2025-06-28 00:18:28 -07:00