Erik Abair
5f306e749e
nv2a: Apply texture parameters when reusing textures
...
Fixes the edge case where a texture is reusable but has modified usage
parameters (e.g., `GL_TEXTURE_WRAP_S`). Prior to this change, texture
parameters would be cached permanently until the texture was recreated.
Fixes #1034
2022-07-25 10:44:38 -07:00
Erik Abair
c83b53e09d
nv2a: Handles depth borders in 3D bordered textures
...
3D textures with texture borders have 4 layers of border on either side of the
content layers in addition to the normal 4 pixel border per layer. This change
handles those extra depth layers in roughly the same way that the per-layer
border texels are handled.
Fixes #1171
[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/texture_border_tests.cpp )
[HW results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Texture_border )
2022-07-25 10:02:15 -07:00
Erik Abair
248fc788c1
nv2a: Ignore pitch check for swizzled textures
2022-07-18 18:03:48 -07:00
Erik Abair
1e221e8da9
nv2a: Fallback to recreating texture on surface size mismatch.
...
There is no requirement that a surface and texture using the same VRAM address
match with respect to size (in particular pitch). This change prevents
incorrect reuse of a surface binding in the event that the texture size does
not match.
Fixes #1127
2022-07-18 11:33:53 -07:00
Erik Abair
ea0a906707
nv2a: Handle value in NV_PVIDEO_STOP writes
...
Interprets the value written to the `NV_PVIDEO_STOP` register in a manner more
consistent with hardware. Specifically, if the low bit of the value is not set,
the PVIDEO overlay should remain active.
Fixes #1049
[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/pvideo_tests.cpp )
Note that, as this is testing video behavior, this test is interactive and
the value passed to the final SetPvideoStop call needs to be mutated and the
behavior observed.
2022-07-18 11:14:15 -07:00
Erik Abair
f29c2ff42c
nv2a: Handle PVIDEO ds_dx and dt_dy registers
...
ds_dx and dt_dy describe how the PVIDEO content should be scaled to fit the
output area. Each is calculated via `((in - 1) << 20) / (out - 1)`, this
commit calculates the full frame scale (in / out) and applies that when
determining the texture coordinates for the overlay.
2022-07-18 10:59:08 -07:00
Erik Abair
9fd957d950
nv2a: Add hack for NV_PVIDEO_SIZE_IN sentinel
2022-07-18 10:59:08 -07:00
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.
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
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.
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.
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 )
2022-07-01 13:44:20 -07:00
mborgerson
db389b1508
nv2a: Fix missing emit_vertex param
2022-06-25 22:56:11 -07:00
Matt Borgerson
83e16c996d
nv2a: Store shading mode in CONTROL_3
2022-06-25 21:11:30 -07:00
Erik Abair
4132845336
nv2a: Implement SET_SHADE_MODEL
2022-06-25 20:39:55 -07:00
Erik Abair
0d84befb82
nv2a: Implement support for border textures
2022-06-25 18:08:55 -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
2022-06-24 23:47:36 -07:00
Erik Abair
f54b207812
nv2a: Handle invalid w in fixed function pipeline
2022-06-24 22:44:19 -07:00
Erik Abair
9d2d8691b5
nv2a: Implement NV097_LAUNCH_TRANSFORM_PROGRAM
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
cc21fbea78
nv2a: Stop passing ShaderState by value
2022-06-22 15:59:49 -07:00
Matt Borgerson
bb855d43da
nv2a: Reset all draw arrays tracking on expand
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
12134404df
nv2a: Refactor inline buffer clear, clear on draw flush
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>
2022-06-15 13:13:51 -07:00
Erik Abair
daa2748a2f
nv2a: Gracefully ignore draws with no target bindings
2022-06-14 18:35:00 -07:00
Matt Borgerson
191f927517
nv2a: Store zclamp config to registers
2022-06-14 17:52:55 -07:00
Erik Abair
875c0659d6
nv2a: Implement gl_depth_clamp control
2022-06-14 17:05:21 -07:00
Mike Davis
c16db47bab
nv2a: Add RenderDoc support for Windows builds
2022-06-14 14:03:26 -07:00
Erik Abair
30829497d2
nv2a: Assert on unimplemented writable const register path
2022-06-10 16:28:04 -07:00
Erik Abair
5cb31da44b
nv2a: Increase DrawArrays buffer size
...
Fixes #364
2022-06-09 22:28:28 -07:00
Erik Abair
30d3bb53b5
nv2a: Fix clip region at renderscales > 1
...
Fixes #1054
2022-06-09 20:41:38 -07:00
Erik Abair
176b574403
nv2a: Fix oFog write behavior with non-x destination masks.
2022-06-03 14:38:16 -07:00
Erik Abair
8a97cec99f
nv2a: Implement z16 float shadow comparison
2022-06-03 13:50:36 -07:00
Erik Abair
84fa8dac3e
nv2a: Check for CPU-modifications to textures before reusing
2022-06-03 13:29:38 -07:00
Erik Abair
7d6da227ba
nv2a: Fix combiner single stage color+alpha interdependence
2022-05-30 16:04:12 -07:00
Erik Abair
9f6b9670d6
nv2a: Ignore excess inline array data
2022-05-28 15:08:22 -07:00
Erik Abair
8334f294df
nv2a: Do not set surface dirty if writes were disabled
2022-05-28 11:58:27 -07:00
Matt Borgerson
0cdcdde70c
nv2a: Emulate floating Z24S8 with fixed Z24S8
2022-05-25 23:51:05 -07:00
Matt Borgerson
bb78ad0e2f
nv2a: Rename zeta surface map 'int' to 'fixed'
2022-05-25 23:51:05 -07:00
Erik Abair
7c5d8b6546
nv2a: Implement shadow comparison for PROJECT2D mode
2022-05-25 14:38:32 -07:00
Erik Abair
9fe352c56c
nv2a: Migrate surface dbg messages to trace framework
2022-05-24 16:42:23 -07:00
Matt Borgerson
280a1bb6a1
nv2a: Support compressed 2D texture padding
2022-05-24 01:46:38 -07:00
Matt Borgerson
14748d9bbb
nv2a: Limit base, max mipmap level
2022-05-24 01:46:38 -07:00
Matt Borgerson
0efef88181
nv2a: Use soft 2D texture decompression
2022-05-24 01:46:38 -07:00
Erik Abair
66b57dca9c
nv2a: Invalidate zeta when constructing non-matching color surface
2022-05-19 18:07:03 -07:00
Erik Abair
397957a36c
nv2a: Unbind dirty buffers on invalidate
2022-05-19 17:52:02 -07:00
Erik Abair
9a446a6544
nv2a: Add pitch to surface debug info
2022-05-18 16:52:32 -07:00
Erik Abair
e64ffe8091
nv2a: Invalidate GL textures after surface blit
2022-05-18 16:51:51 -07:00
Matt Borgerson
9fafe92b25
nv2a: Don't add clip offset to swizzled surfaces
2022-05-18 16:19:10 -07:00
Matt Borgerson
38a0e46f8c
nv2a: Don't bind unsampled textures
2022-05-18 03:40:04 -07:00
Matt Borgerson
2c1012ede4
nv2a: Add SHADOWCTL to shader dirty test
2022-05-17 18:13:35 -07:00
Matt Borgerson
a1f34c339a
nv2a: Add SHADOWCTL register to store depth func
2022-05-17 18:13:35 -07:00
Erik Abair
c33d96127c
nv2a: Implement shadow samplers
2022-05-17 17:45:16 -07:00
Erik Abair
b9aef0c57c
nv2a: Move palette offset behind texture reuse check
2022-05-17 17:32:32 -07:00
Erik Abair
b0f20c9bba
nv2a: Fix stale texture in surface input and output case
2022-05-17 17:18:15 -07:00
Matt Borgerson
3451fdb8c0
gloffscreen.h: Remove platform-specific includes
2022-05-17 16:55:41 -07:00
Erik Abair
a6cd0c2110
nv2a: Prevent GPU download after blit operation
2022-05-17 16:29:16 -07:00
Erik Abair
aec2883c6b
nv2a: Process pending surface uploads before render to texture
2022-05-10 17:56:58 -07:00
Erik Abair
2d50239832
nv2a: Fix subscreen pvideo overlay position
2022-05-10 14:51:51 -07:00
Erik Abair
989dbcc76d
nv2a: Match HW behavior when setting window clip
2022-05-10 13:15:30 -07:00
Erik Abair
306891b98c
nv2a: Disable stderr print on image_blit when GL debugging is enabled
2022-05-05 14:50:07 -07:00
Erik Abair
6d7f329880
nv2a: Fix glsl ambiguous overload to prevent renderdoc failure
2022-04-26 22:08:51 -07:00
Antonio Abbatangelo
4bd1a07706
nv2a: adjust display resolution in 1080i mode
2022-04-26 13:46:28 -07:00
Erik Abair
a654a1f99a
nv2a: Prevent renderdoc from crashing xemu when capturing a frame
2022-04-26 13:44:13 -07:00
Erik Abair
8125e1302f
nv2a: Fix renderdoc detection on macOS
2022-04-25 13:30:47 -07:00
Matt Borgerson
d14cdbc7ba
config: Migrate to genconfig system
2022-04-24 21:15:57 -07:00
Erik Abair
440f4c53ec
nv2a: Ignore color/depth mask in CLEAR_SURFACE
2022-04-24 15:41:10 -07:00
Erik Abair
6dbd51fbe1
nv2a: Fix MAC/ILU independence
2022-04-24 15:34:14 -07:00
Erik Abair
4c8342725e
nv2a: Make combiner assignment independent
2022-04-24 15:11:47 -07:00
Erik Abair
f245e08560
nv2a: Set oFog.x with most significant oFog mutation
2022-04-24 15:02:39 -07:00
Erik Abair
6f507c80af
nv2a: Fix handling of 0-stride vertex attributes
2022-03-22 17:35:26 -07:00
Matt Borgerson
6e1969001e
nv2a: Rename sum to muxsum, simplify mux string build
2022-03-18 18:28:09 -07:00
Erik Abair
cb0a92b46c
nv2a: Handle LSB mux flag
2022-03-18 17:35:32 -07:00
Erik Abair
f0abe3c4fc
nv2a: Fix handling of R8B8 and G8B8 texture modes
2022-03-18 16:09:55 -07:00
Erik Abair
2ff5f23235
nv2a: Implement v1r0_sum flags
2022-03-16 21:22:16 -07:00
Erik Abair
4cff9c27f3
nv2a: Fix swapped R and Q texgen planes
2022-03-16 20:36:41 -07:00
Erik Abair
83d4cbb418
nv2a: Update attribute inline_value as rendering side-effect
2022-02-22 15:01:46 -07:00
Antonio Abbatangelo
2218cdea67
nv2a/mcpx: fix freezing on loadvm failure
2022-02-22 14:40:26 -07:00
RageXbox
8919bae311
nv2a: Remove assertion in append_skinning_code
2022-02-10 22:31:22 -07:00
Erik Abair
f3c7a3afd1
nv2a: Add --enable-renderdoc build config
2022-02-10 14:41:43 -07:00
Erik Abair
8689e640bd
nv2a: Add missing vertex attribute setters
2022-02-10 14:35:53 -07:00
Erik Abair
517e4b3414
nv2a: Implement SET_MATERIAL_ALPHA and diffuse color src
...
This adds support for the material alpha command and updates the fixed function
shader to respect the diffuse source parameter (which was already piped through
but not utilized).
2022-02-05 15:22:03 -07:00
Matt Borgerson
be23a674f3
nv2a: Start using tracing infrastructure for logging
2022-02-01 23:34:53 -07:00
Erik Abair
a13f3f48a2
nv2a: Improve RenderDoc triggering
2022-01-31 20:46:41 -07:00
Erik Abair
ef0a262efe
nv2a: Fix swizzle_box for volumetric textures
2022-01-31 17:48:17 -07:00
Erik Abair
2d34f5108d
nv2a: Support depth in volumetric palettized textures
2022-01-31 17:27:20 -07:00
Erik Abair
caf84884c4
nv2a: Fix slots for vertex attribute setters
2022-01-24 18:22:16 -07:00
Erik Abair
d17e019684
nv2a: Implement vertex attribute setters
2022-01-24 16:22:52 -07:00
Erik Abair
6b821d2062
nv2a: Implement pvideo color keying
2022-01-22 13:54:40 -07:00
Erik Abair
b3f56db428
nv2a: Match HW behavior when dealing with infinite fog coord
2022-01-18 18:13:54 -07:00
Matt Borgerson
3fd15218c7
nv2a: Init puserdac palette on startup
2022-01-12 19:51:14 -07:00
Matt Borgerson
42c44dc241
nv2a: Fix register print debug macro
2022-01-12 19:51:14 -07:00
Matt Borgerson
7bd68b4bfc
nv2a: Specify method ranges in words
2022-01-12 19:51:14 -07:00
Matt Borgerson
0b838a6e4c
nv2a: Bring back non-inc/inc loops to avoid dead code
2022-01-12 19:51:14 -07:00
Matt Borgerson
27afd42164
nv2a: Add puserdac.palette to vmstate
2022-01-12 01:53:12 -07:00
Matt Borgerson
1b5b14f8ba
nv2a: Support local method loops for more methods
2022-01-12 01:13:02 -07:00
Matt Borgerson
909affdefe
nv2a: Merge inc and non-inc method defs
2022-01-12 01:13:02 -07:00
Matt Borgerson
a8fadd5a66
nv2a: Un-macroify loop wrappers
2022-01-11 22:03:08 -07:00
Matt Borgerson
a3f077779f
nv2a: Fold unnecessary macros
2022-01-11 22:03:08 -07:00
Matt Borgerson
fb019d7c1f
nv2a: Fold redundant loop macros
2022-01-11 15:07:48 -07:00
Matt Borgerson
7d101d5193
nv2a: Log exact method addr and name+offset if available
2022-01-11 14:20:00 -07:00
Matt Borgerson
13be29690a
nv2a: Fix logging for looped methods
2022-01-11 14:20:00 -07:00
Erik Abair
01c2f0fa74
nv2a: Fix handling of NV097_SET_VERTEX_DATA4S_M
2022-01-09 16:42:38 -07:00
Matt Borgerson
057e7fcfa1
nv2a: Add kelvin method names to LUT
2022-01-09 03:19:56 -07:00
Matt Borgerson
e2fc067073
nv2a: Fix debug printf warnings
2022-01-09 03:19:56 -07:00
Matt Borgerson
80fda910b1
nv2a: Batch process report queries
2022-01-09 02:47:58 -07:00
Matt Borgerson
d54ce00f02
nv2a: Simplify swizzled<>linear logic
2022-01-08 19:50:20 -07:00
Matt Borgerson
62d04a3636
nv2a: Permit limited swizzled<>linear surface migration
2022-01-08 19:20:37 -07:00
Matt Borgerson
1871699c2e
nv2a: Mark surface buffers dirty on DMA update
2022-01-08 19:20:37 -07:00
Matt Borgerson
eb87feae2c
nv2a: Only sync blit source surface if dirty
2022-01-08 02:45:48 -07:00
Matt Borgerson
76b26b13fc
nv2a: Make beta value be strictly uint32_t
2022-01-08 02:45:48 -07:00
Matt Borgerson
d91e6d304f
nv2a: Refactor blit operation logic
2022-01-08 02:45:48 -07:00
Erik Abair
6e2446e91b
nv2a: Support XRGB_ZRGB blit surface format
2022-01-08 02:45:48 -07:00
Erik Abair
a546f07df7
nv2a: Implement BLEND_AND image blit operation
2022-01-08 02:45:48 -07:00
Erik Abair
0d4e3d29b5
nv2a: Download destination surface for partial SRCCOPY blits
2022-01-08 02:45:48 -07:00
haxar
25b8fa8433
nv2a: Refactor VGA init
2022-01-07 16:19:30 -07:00
wutno
8f529d0d9c
nv2a: Set frequency to 233MHz
2021-12-28 17:40:50 -07:00
Erik Abair
41ef1ca5e5
nv2a: Add option to suppress irq and dma_map debug messages
2021-12-28 17:39:36 -07:00
antangelo
57795d81cb
nv2a: Don't mark surface dirty on unchanged offset, pitch
2021-12-28 15:53:47 -07:00
Matt Borgerson
69ceec4446
nv2a: Support gamma correction
2021-11-23 17:49:44 -07:00
Erik Abair
dcad9d62b3
nv2a: Discard unknown front face
2021-11-19 16:40:54 -07:00
Matt Borgerson
50a5368f47
Revert "nv2a/vsh: Use double precision in clip range remap"
...
This reverts commit 1a15d83c44
.
2021-11-19 13:48:04 -07:00
Erik Abair
1a15d83c44
nv2a/vsh: Use double precision in clip range remap
2021-11-18 17:17:59 -07:00
Erik Abair
1c6e75885c
nv2a: Enable 16-bit floating point z-buffer mode
2021-11-18 16:46:50 -07:00
Erik Abair
a3e507860e
nv2a: Respect pitch in YUV texture conversion, upload
2021-11-13 17:18:23 -07:00
Matt Borgerson
8602863f36
util: Add fast-hash.h to simplify xxHash usage
2021-10-25 16:30:38 -07:00
Matt Borgerson
a4115cf8b3
util: Move xxHash submodule to util/
2021-10-25 16:30:38 -07:00
Matt Borgerson
5622af4981
nv2a: Discard unknown blend equation
2021-10-13 16:51:30 -07:00
Matt Borgerson
21718399f2
nv2a: Discard unknown blend factors
2021-10-12 01:52:42 -07:00
Matt Borgerson
47b1487a71
nv2a: Move bump mat into pgraph register file
2021-10-12 01:32:08 -07:00
Matt Borgerson
1a49f6066f
nv2a: Discard bump env params for tex 0
2021-10-12 01:32:08 -07:00
Erik Abair
db2a6aaf6d
nv2a: Skip input decode if MAC and ILU are both NOP.
2021-10-12 00:17:50 -07:00
Matt Borgerson
fe4929c146
nv2a: Sync on surface type change
2021-09-05 15:24:31 -07:00
Matt Borgerson
c31cbf9f4e
nv2a: Writeback dirty surfaces on scale change, VM load
2021-07-26 15:03:52 -07:00
Matt Borgerson
59d3bfe268
nv2a: Add swizzle to surface compat check
2021-07-20 10:37:07 -07:00
Matt Borgerson
5ec33df112
nv2a: Minor refactor
2021-07-20 10:37:07 -07:00
Matt Borgerson
5778854dbd
nv2a: Scale point sprites by surface scaling factor
2021-07-20 10:37:07 -07:00
Matt Borgerson
52c670141a
nv2a: Skip sync when moving from color<->zeta
2021-07-20 10:37:07 -07:00
Matt Borgerson
4a8cc6f623
nv2a: Use scaling factor helper function
2021-07-20 10:37:07 -07:00
Matt Borgerson
5562a484e1
nv2a: Support integer scaling of surface dimensions
2021-07-20 10:37:07 -07:00
Matt Borgerson
814d7e0a9a
nv2a: Add flip option in glo_readpixels
2021-07-20 10:37:07 -07:00
Mike Davis
0b9a2e1a8f
nv2a: Support NV062_SET_COLOR_FORMAT_LE_Y32 blitting
2021-07-18 22:58:16 -07:00
Mike Davis
0f9b862e37
nv2a: Support texture format SZ_DEPTH_Y16_FIXED
2021-07-12 12:15:49 -07:00
Mike Davis
be3df6ab8e
nv2a: Support texture format LC_IMAGE_YB8CR8YA8CB8
2021-07-10 23:29:01 -07:00
Mike Davis
ed7cbef976
nv2a: Support texture format COLOR_LU_IMAGE_G8B8
2021-07-10 02:58:18 -07:00
Matt Borgerson
203c76f89c
nv2a: Handle point sprites, scaling
2021-07-10 02:42:15 -07:00
Mike Davis
f03015e20e
nv2a: Support texture format COLOR_SZ_B8G8R8A8
2021-07-03 13:10:31 -07:00
Matt Borgerson
473179b9f4
nv2a: Minimize clip origin for compatible surfaces
2021-07-02 17:42:25 -07:00
Matt Borgerson
aaf8522431
nv2a: Add offset to FF inv. viewport matrix
2021-07-02 14:18:30 -07:00
Matt Borgerson
315ac1ceaa
nv2a: Transform surface scissor y-coord by abs. surface height
2021-07-02 14:18:30 -07:00
Matt Borgerson
4716b7b980
nv2a: Transform clear y-coord by abs. surface height
2021-07-02 14:18:30 -07:00
Matt Borgerson
e0f83c8be7
nv2a: Check zeta dirty after color update
2021-07-02 14:18:30 -07:00
Matt Borgerson
364588f426
nv2a: Better field render handling
2021-07-02 14:18:30 -07:00
Matt Borgerson
f3f40b4c89
nv2a: Check surface expansion pitch and overlap
2021-07-02 14:18:30 -07:00
Matt Borgerson
a07b8f1a2a
nv2a: Factor surface entry population out
2021-07-02 14:18:30 -07:00
Matt Borgerson
fef3a463b6
nv2a: Remove old up/down debug messages
2021-07-02 14:18:30 -07:00
Matt Borgerson
e9ed81ac5a
nv2a: Factor zeta format decode out to a table
2021-07-02 14:18:30 -07:00
Matt Borgerson
be9360bb69
nv2a: Improve clipped surface handling
2021-07-02 14:18:30 -07:00
Matt Borgerson
a7f3f8f212
nv2a: Don't orphan display buffer
2021-06-17 04:19:24 -07:00
Matt Borgerson
6f477f02a6
nv2a: Enable exclusive clip
2021-06-02 18:08:06 -07:00
Matt Borgerson
ebcc77c6c8
nv2a: Fix window clip coordinate transform
2021-06-02 15:42:13 -07:00
Josef Šimánek
df940c0b3f
nv2a: Add NV062_SET_COLOR_FORMAT_LE_X8R8G8B8 definition
2021-05-18 13:34:18 -07:00
Matt Borgerson
dbc73bbd82
nv2a: Derive rho, phi, theta from spot direction
2021-05-18 10:18:45 -07:00
Matt Borgerson
74f724715d
nv2a: Fixup qstring to mstring
2021-05-18 10:18:45 -07:00
Wilhelm Kovatch
e2e3572301
nv2a: implement FFP LIGHT_SPOT
2021-05-18 10:17:19 -07:00
Matt Borgerson
ee18e7bf35
nv2a: Add custom mutable string object (QString is now immutable)
2021-04-18 23:41:28 -07:00
Matt Borgerson
dc8eab47f6
nv2a: Use new 'q' prefix for atomics
2021-04-18 23:41:28 -07:00
Matt Borgerson
b97b053282
nv2a: Use bool type for state change callback running parameter
2021-04-18 23:41:28 -07:00
Matt Borgerson
609aee0bbe
build: Convert xemu Makefiles to meson
2021-04-18 23:41:28 -07:00
Matt Borgerson
0214f88f91
nv2a: Move vertex decompression to shader
2021-03-16 16:00:42 -07:00
Matt Borgerson
e06d1c1343
ui: Bump to GL 4.0
2021-03-16 16:00:42 -07:00
Matt Borgerson
09e2357d02
nv2a: Cache inline elements in LRU
2021-03-16 16:00:42 -07:00
Matt Borgerson
559f105a88
nv2a: Bump up LRU bins
2021-03-16 16:00:42 -07:00
Mike
ceee8d67b9
nv2a: Verify surface format X1R5G5B5_Z1R5G5B5
2021-03-13 16:14:31 -07:00
Matt Borgerson
1c6f85cdd9
nv2a: Round inline array attr offsets to natural boundary
2021-03-12 05:18:10 -07:00
Matt Borgerson
8d5961ab8f
nv2a: Avoid shader lookups+binds
2021-03-12 04:45:53 -07:00
Matt Borgerson
2dbf966a50
nv2a: Include attribute data address in LRU key
2021-03-11 04:51:36 -07:00
Matt Borgerson
fcb3246d4f
nv2a: Connect draw arrays primitives originally within BEGIN/END
2021-03-11 03:07:52 -07:00
Matt Borgerson
2483bc59aa
Revert "nv2a: Don't attempt to connect primitives in arrays"
...
This reverts commit 33f8d3c88c
.
2021-03-11 03:07:52 -07:00
Matt Borgerson
5756a8892c
nv2a: Squash repeated draw arrays
2021-03-11 02:06:35 -07:00
Matt Borgerson
33f8d3c88c
nv2a: Don't attempt to connect primitives in arrays
2021-03-11 02:06:35 -07:00
Matt Borgerson
48ccf72e55
nv2a: Consider element range start in buffer uploads
2021-03-11 01:25:45 -07:00
Matt Borgerson
9ab3dcbd6c
nv2a: Update VSH constants only if different
2021-03-11 01:10:36 -07:00
Matt Borgerson
851407e07c
nv2a/vsh: Output muxed op first to avoid temp clobber
2021-03-06 19:06:47 -07:00
Matt Borgerson
105f86d973
nv2a: Factor Kelvin methods into functions
2021-03-06 01:45:40 -07:00
Matt Borgerson
9d545d17e7
nv2a: Relax stall conditions on pusher
2021-03-04 20:45:58 -07:00
Camden Smallwood
10863d1c0d
nv2a: Use GL_ELEMENT_ARRAY_BUFFER when calling glDrawElements
2021-03-04 17:53:08 -07:00
Matt Borgerson
fc73893f3c
nv2a: Fix clip range scaling precision loss
2021-03-03 18:10:49 -07:00
Matt Borgerson
6e564854fc
xemu: Update copyright
2021-03-03 03:48:11 -07:00
Matt Borgerson
7dae26380e
nv2a: Stall pusher for pending sync events
2021-03-03 03:41:20 -07:00
Matt Borgerson
48c1720da8
nv2a: Support PVIDEO overlays again
2021-03-01 18:40:30 -07:00
Matt Borgerson
f2bfa672e6
nv2a: Specify GL_STREAM/STATIC_DRAW buffer usages
2021-02-27 15:17:17 -07:00
Matt Borgerson
0d9ff0872a
nv2a: Swap glDrawRangeElements for glDrawElements
2021-02-27 15:17:17 -07:00
Matt Borgerson
f89dc5c446
nv2a: Add surface download complete event
2021-02-18 21:17:30 -07:00
Matt Borgerson
7b84142c4e
nv2a: Add fb sync complete event
2021-02-18 02:48:25 -07:00
Matt Borgerson
8326870f77
nv2a: Eliminate re-malloc of inline buffer
2021-02-12 18:55:06 -07:00
Matt Borgerson
b536ac07d6
nv2a: Fix surface debug print field
2021-02-11 16:45:36 -07:00
Matt Borgerson
7926347c8b
nv2a: Fix buffer size in surface flip
2021-02-11 16:33:47 -07:00
Matt Borgerson
afed1a4835
nv2a: Clear entire PSH struct before hashing
2021-02-11 16:10:34 -07:00
Matt Borgerson
a88b4cf9f5
nv2a: Minor cleanup
2021-02-11 16:10:34 -07:00
Matt Borgerson
3248c8ebbf
nv2a: Fast path PGRAPH method processing
2021-02-11 15:23:47 -07:00
Matt Borgerson
8e29469ddb
nv2a: Cache converted vertex data
2021-02-11 14:54:39 -07:00
Matt Borgerson
9b42f4aaa3
nv2a: Add binning to LRU
2021-02-11 14:30:52 -07:00
Matt Borgerson
d2990d0e47
nv2a: Use XXH3_64bits as fast hash
2021-02-11 14:09:52 -07:00
Matt Borgerson
fec0ad6f4c
nv2a: Add xxHash submodule
2021-02-11 14:09:52 -07:00
Matt Borgerson
30fe6cb3c4
nv2a: Drop xxHash inline sources
2021-02-11 14:09:52 -07:00
Matt Borgerson
7a08e93085
nv2a: Add simple frame metrics
2021-02-11 13:50:18 -07:00
wutno
9ca79f75d8
nv2a: Change stepping to match retail 1.0 Xbox
2021-01-23 16:52:57 -07:00
Matt Borgerson
996f3d4dc3
nv2a: Grab lock before marking pending download
2020-12-30 03:52:46 -07:00
Matt Borgerson
e431cbff82
nv2a: Fix compiler nits
2020-12-30 03:51:47 -07:00
Matt Borgerson
af35a8b728
nv2a: Approximate CLAMP_OGL with CLAMP_TO_EDGE
2020-12-07 19:25:48 -07:00
Matt Borgerson
2933d8d171
nv2a: Set VGA color mode after reset
2020-12-02 23:03:51 -07:00
Matt Borgerson
0bec22318a
nv2a: Add Gaussian convolution filter for AA
2020-12-02 16:49:58 -07:00
Matt Borgerson
a34cab69dd
nv2a: Support line and poly anti-aliasing
2020-12-01 22:36:09 -07:00
Matt Borgerson
59980ba1c7
nv2a: Refactor BUMPENVMAP[_LUM]
2020-11-14 16:30:59 -07:00
Matt Borgerson
183ed86aa6
nv2a: Fix color swizzle for SZ_G8B8 and SZ_R8B8
2020-11-14 16:30:59 -07:00
Wilhelm Kovatch
ff3deacae6
nv2a: Fix BUMPENVMAP[_LUM] texture modes
2020-11-14 16:27:12 -07:00
Wilhelm Kovatch
5aa0cec31b
nv2a: Support 3D texture decompression in software
2020-11-01 17:55:14 -07:00
Matt Borgerson
5cc4568dfe
nv2a: Force surface flush for mipmapped textures
2020-10-28 22:03:56 -07:00
Matt Borgerson
0c2368f37d
nv2a: Fix broken dot texture modes
2020-10-28 22:03:56 -07:00
Matt Borgerson
3c6596975d
nv2a: Implement dot texture modes and dotmapping
2020-10-28 15:59:20 -07:00
Matt Borgerson
9060302670
nv2a: Add GL error guard for glCompressedTexImage3D
...
This only works with DXT1/S3TC if the implementation has the
NV_texture_compression_vtc extension, otherwise GL_INVALID_ENUM will be
raised. Bail out in this case, until a software fallback is implemented.
2020-10-28 04:40:11 -07:00
Wilhelm Kovatch
b9df397493
nv2a: Fix compressed 3D textures
2020-10-26 21:43:12 -07:00
Wilhelm Kovatch
518c9f38cd
nv2a: Add support for compressed 3D textures
2020-10-26 19:49:47 -07:00
Matt Borgerson
6f777e73e6
nv2a: Add B8, G8B8 surface format placeholders
2020-10-26 00:20:48 -07:00
Matt Borgerson
0433c5e6bc
nv2a: Simulate PCRTC_RASTER register
2020-10-25 19:52:57 -07:00
Matt Borgerson
23096561a3
nv2a: Check for same zeta/color surface offset
2020-10-25 03:39:58 -07:00
Matt Borgerson
4cd7c98025
nv2a: Unbind surfaces when flushing
2020-10-23 14:33:45 -07:00
Dalai
6936945afa
nv2a: Support texture format COLOR_LU_IMAGE_DEPTH_Y16_FLOAT
2020-10-23 13:38:57 -07:00
Matt Borgerson
d6e52a02c4
nv2a: Lazily synchronize surface data to/from RAM
2020-10-22 21:29:53 -07:00
Matt Borgerson
6a2f6b3637
nv2a: Download surface before blit
2020-10-18 01:37:19 -07:00
Matt Borgerson
79989a0e3f
nv2a: Always use texture cache
2020-10-18 01:16:32 -07:00
Matt Borgerson
a3fc742bbe
nv2a: Remove nv2a_ prefix on files in nv2a dir
2020-10-18 00:55:08 -07:00
Matt Borgerson
c69e58ee0f
nv2a: Make files individually compilable
2020-10-18 00:55:08 -07:00
Matt Borgerson
fcd3764cce
nv2a: Handle color material ambient/emissive
2020-09-06 20:42:21 -07:00
Matt Borgerson
bb0fdef251
nv2a: Handle alignment padding between cubemap faces
2020-09-05 16:21:21 -07:00
Voxel9
c90335801c
nv2a: Fix FFP texgen assertions
...
Should compare against channel index instead of texture stage index
2020-06-29 07:49:51 -07:00
Voxel9
3bbea5269e
nv2a: Remove TEXGEN_SPHERE_MAP assertion
2020-06-29 07:49:51 -07:00
Matt Borgerson
60d3dc8ae1
nv2a: Add VMStateDescription
2020-06-19 05:43:14 -07:00
Matt Borgerson
c9cf9a9972
nv2a: Add state flushing to PGRAPH
2020-06-19 05:43:14 -07:00
Matt Borgerson
f898b5e875
nv2a: Rename PCIDevice dev to parent_obj per QEMU convention
2020-06-19 05:43:14 -07:00
Matt Borgerson
f2869790d9
nv2a: Check for PGRAPH FIFO access before context switch
2020-06-17 01:14:43 -07:00
Matt Borgerson
ec4e798426
nv2a: Merge pfifo pusher/puller threads
2020-06-12 00:06:06 -07:00