90386 Commits

Author SHA1 Message Date
Erik Abair
a675666051 nv2a: Handle SIZE_IN > SIZE_OUT case
`NV_PVIDEO_SIZE_IN` is set to 0xFFFFFFFF during initialization and teardown
of the PVIDEO overlay. In some cases this can happen before the overlay is
explicitly stopped, leading to an assert. On hardware SIZE_IN values larger
than SIZE_OUT are capped (content is not scaled).

Fixes #330

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/pvideo_tests.cpp)
2022-07-18 10:59:08 -07:00
Erik Abair
8d274e5f9a nv2a: Match inv_w qualifier to attribute qualifier
Calculates both interpolated and flat shaded inv_w so that the appropriate
value may be used when undoing the perspective divide in the pixel shader.
v0.7.60
2022-07-13 16:16:38 -07:00
Erik Abair
ae1a140ecb nv2a: Fix missing flat qualifier for inv_w param
`vtx_inv_w` should also be flat, since interpolating it causes incorrect values
for the flat shaded colors.

Fixes #1179

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/shade_model_tests.cpp)
[HW results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Shade_model)
2022-07-13 16:16:38 -07:00
Erik Abair
4fd15c00f3 mcpx: Print actual error on OpenAudioDevice fail v0.7.59 2022-07-13 13:41:30 -07:00
Erik Abair
6f878ede01 nv2a: Do not force oFog to 1.0
This code was added ~7 years ago in
[this commit](97be3f5986)

From what I can see from the [HW test results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Fog_coord_vec4)
the behavior on nv2a is more subtle than the cited `NV_vertex_program`
documentation.

In practice the register more or less retains its value until it is explicitly
modified.[The test](4cff2b2ebe/src/tests/fog_tests.cpp (L432))
renders something with an explicitly set oFog.x, then renders again with a
shader that does not modify oFog.x but references it in the pixel shader. The
value carries over rather than being forced to 1.0.

Interestingly, this test is apparently not hermetic; running the other
vec4_coord test (that explictly set various components of oFog) lead to unusual
behavior where the fogging effect is not uniform across all vertices, despite
never being set. Even more interestingly, re-running the test once it's in this
state will often produce variations as to which vertices are apparently using
a stale/incorrect fog value.
v0.7.58
2022-07-05 19:12:03 -07:00
Lynne
6a8a967438 nv2a/psh: fix shader compilation errors
dotSTR had an extra bracket at the end, and an incorrect
variable type.
v0.7.57
2022-07-02 10:39:44 -07:00
Erik Abair
d06a0c22f1 nv2a: Fix incorrect use of bytes for GL_UNPACK_ROW_LENGTH
`GL_UNPACK_ROW_LENGTH` is supposed to set the length in pixels, but the DXT
path is setting it to bytes, causing it to read beyond the end of the texture.
[Reference](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glPixelStore.xhtml)

Fixes #1002

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/texture_format_dxt_tests.cpp)
[HW Results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Texture_DXT)
v0.7.56
2022-07-01 13:44:20 -07:00
mborgerson
db389b1508 nv2a: Fix missing emit_vertex param v0.7.55 2022-06-25 22:56:11 -07:00
Alexandre Bouvier
63f48393e7 build: Allow using system xxhash v0.7.54 2022-06-25 22:01:40 -07:00
Matt Borgerson
83e16c996d nv2a: Store shading mode in CONTROL_3 v0.7.53 2022-06-25 21:11:30 -07:00
Erik Abair
4132845336 nv2a: Implement SET_SHADE_MODEL v0.7.52 2022-06-25 20:39:55 -07:00
Erik Abair
0d84befb82 nv2a: Implement support for border textures v0.7.51 2022-06-25 18:08:55 -07:00
Matt Borgerson
8e48115a41 ui: Set C numeric locale before settings save/load v0.7.50 2022-06-25 15:34:26 -07:00
Matt Borgerson
be8b612186 nv2a: Set C numeric locale before shader gen 2022-06-25 15:34:26 -07:00
Erik Abair
b3abb982e8 nv2a_vsh_cpu: Fix incorrect ilu input handling due to mismerge v0.7.49 2022-06-24 23:47:36 -07:00
Erik Abair
f54b207812 nv2a: Handle invalid w in fixed function pipeline v0.7.48 2022-06-24 22:44:19 -07:00
Alexandre Bouvier
482b2ea31d tomlplusplus: Allow using system library v0.7.47 2022-06-24 22:21:49 -07:00
Erik Abair
9d2d8691b5 nv2a: Implement NV097_LAUNCH_TRANSFORM_PROGRAM v0.7.46 2022-06-24 20:41:04 -07:00
Erik Abair
8043abc738 nv2a: Add CPU emulation of nv2a vertex shader 2022-06-24 20:34:57 -07:00
Erik Abair
1e31a77e25 build: Add missing requests dependency for macOS 2022-06-24 20:34:57 -07:00
Erik Abair
cc21fbea78 nv2a: Stop passing ShaderState by value v0.7.45 2022-06-22 15:59:49 -07:00
Matt Borgerson
7bfdc56716 ui: Fix axes, add mspf to advanced video graph v0.7.44 2022-06-21 03:36:33 -07:00
Matt Borgerson
bb855d43da nv2a: Reset all draw arrays tracking on expand v0.7.43 2022-06-20 18:54:21 -07:00
Erik Abair
baa7e914fb nv2a: Fix assert in single DrawArray + ArrayElement case 2022-06-20 18:33:18 -07:00
Matt Borgerson
4827dab943 ui: Fix logo shader texture sampling function name v0.7.42 2022-06-19 17:31:56 -07:00
revix
7e8b4dd430
UI: Clarify 'MCPX' for boot ROM and 'BIOS' for flash ROM v0.7.41 2022-06-19 15:34:32 -07:00
Matt Borgerson
f672185b1c ui: Improve logo animation v0.7.40 2022-06-18 05:13:12 -07:00
Matt Borgerson
3a6907b0ea ui: Hide currently non-applicable menu items v0.7.39 2022-06-15 18:39:11 -07:00
Matt Borgerson
12134404df nv2a: Refactor inline buffer clear, clear on draw flush v0.7.38 2022-06-15 17:30:05 -07:00
Matt Borgerson
84260dfc18 nv2a: Add begin/end sanity debug checks 2022-06-15 17:30:05 -07:00
Matt Borgerson
d8723e047b nv2a: Store primitive mode in vmstate 2022-06-15 17:30:05 -07:00
Matt Borgerson
d6abaca904 nv2a: Minor cleanup 2022-06-15 17:30:05 -07:00
Matt Borgerson
463c815a9b nv2a: Always clear inline vertex buffers on begin 2022-06-15 17:30:05 -07:00
Erik Abair
88409a92bf
nv2a: Fix intermixed use of DRAW_ARRAYS and ARRAY_ELEMENTx
Co-authored-by: Matt Borgerson <contact@mborgerson.com>
v0.7.37
2022-06-15 13:13:51 -07:00
Erik Abair
daa2748a2f nv2a: Gracefully ignore draws with no target bindings v0.7.36 2022-06-14 18:35:00 -07:00
Matt Borgerson
191f927517 nv2a: Store zclamp config to registers v0.7.35 2022-06-14 17:52:55 -07:00
Erik Abair
875c0659d6 nv2a: Implement gl_depth_clamp control v0.7.34 2022-06-14 17:05:21 -07:00
Mike Davis
c16db47bab
nv2a: Add RenderDoc support for Windows builds v0.7.33 2022-06-14 14:03:26 -07:00
Erik Abair
30829497d2 nv2a: Assert on unimplemented writable const register path v0.7.32 2022-06-10 16:28:04 -07:00
Erik Abair
5cb31da44b nv2a: Increase DrawArrays buffer size
Fixes #364
v0.7.31
2022-06-09 22:28:28 -07:00
Erik Abair
30d3bb53b5 nv2a: Fix clip region at renderscales > 1
Fixes #1054
v0.7.30
2022-06-09 20:41:38 -07:00
Erik Abair
69dcbe9b30 ui: Make monitor text selectable v0.7.29 2022-06-07 22:06:14 -07:00
Erik Abair
176b574403 nv2a: Fix oFog write behavior with non-x destination masks. v0.7.28 2022-06-03 14:38:16 -07:00
Erik Abair
8a97cec99f nv2a: Implement z16 float shadow comparison v0.7.27 2022-06-03 13:50:36 -07:00
Erik Abair
84fa8dac3e nv2a: Check for CPU-modifications to textures before reusing v0.7.26 2022-06-03 13:29:38 -07:00
Erik Abair
7d6da227ba nv2a: Fix combiner single stage color+alpha interdependence v0.7.25 2022-05-30 16:04:12 -07:00
7oxicshadow
ebcd5078e4
ui: Make keyboard controller scancode map configurable v0.7.24 2022-05-28 17:59:32 -07:00
Erik Abair
9f6b9670d6 nv2a: Ignore excess inline array data v0.7.23 2022-05-28 15:08:22 -07:00
Erik Abair
8334f294df nv2a: Do not set surface dirty if writes were disabled v0.7.22 2022-05-28 11:58:27 -07:00
Matt Borgerson
0cdcdde70c nv2a: Emulate floating Z24S8 with fixed Z24S8 v0.7.21 2022-05-25 23:51:05 -07:00