Commit Graph

38484 Commits

Author SHA1 Message Date
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
Matt Borgerson 23312f384b nv2a: Separate VshState and PshState generation 2025-06-28 00:18:28 -07:00
Matt Borgerson 9020913e29 nv2a: Extract GLSL generation options from {Vsh,Psh}State 2025-06-28 00:18:28 -07:00
Matt Borgerson c575b08b5f nv2a: Extract VshState from ShaderState 2025-06-28 00:18:28 -07:00
Matt Borgerson 9d9c88f71d nv2a: Unset some FF ShaderState if unnecessary 2025-06-28 00:18:28 -07:00
Matt Borgerson 3ad4eb3101 nv2a: Remove colorkey_mask from PshState
It's a uniform, so we don't want it to be part of the PSH setup state,
which used as the shader cache key.
2025-06-28 00:18:28 -07:00
Erik Abair 634577c753 nv2a: Clamp fog factor to valid float range 2025-06-26 14:20:20 -07:00
Matt Borgerson 1fa242bd00 nv2a/vk: Only include palette in texture key when necessary
Fixes degraded performance due to garbage palette details polluting the
texture cache.
2025-06-23 01:09:51 -07:00
Matt Borgerson a242964793 nv2a/vk: Require fillModeNonSolid feature 2025-06-22 16:44:14 -07:00
Matt Borgerson cbcfd1d1d6 nv2a/vk: Enable wideLines feature before use 2025-06-22 16:44:14 -07:00
Matt Borgerson df1ac31eb2 nv2a/vk: Set line width state dynamically 2025-06-22 16:44:14 -07:00
specialfred453@gmail.com d8afb35c40 nv2a/vk: Scale line width by surface scale 2025-06-22 16:44:14 -07:00
Erik Abair 348b03d6ce
nv2a: Handle PGRAPH color keying 2025-06-21 13:25:24 -07:00
Matt Borgerson 14a0a5f481 nvnet: Drop unnecessary switch 2025-06-21 09:55:26 -07:00