Commit Graph

642 Commits

Author SHA1 Message Date
50134535dc restored multitextured functionality (for lightmaps) 2026-08-09 23:28:48 -05:00
f8bef6fe2f fixed color issues not mapping properly 2026-08-03 23:26:52 -05:00
971d3d37e6 (rebased) experimental support for parsing from a float16 mesh (or a float32-quantized-as-ushort mesh) 2026-07-24 16:07:09 -05:00
GPF
f11f7c966a texture: fix Dreamcast hardware texture and scissor regressions
Fix several Dreamcast hardware regressions found while testing real PVR behavior.

- Upload the default white texture through the platform texture loader instead of memcpy directly into PVR texture memory.
- Add GPUTextureLoad so SH4 uses pvr_txr_load while the software backend keeps memcpy behavior.
- Track scissor/userclip application per polygon list and invalidate scissor state at buffer swap.
- Submit queued geometry before USERCLIP/header transitions in the SH4 submit path.
- Remove the stale packed 4bpp source-size double-halving in glTexImage2D.
- Add texture regression coverage for packed 4bpp, unpack row length, compressed palette4 forwarding, and 8bpp-to-4bpp packing.
- Update the scissor sample and add polygon_compare as a small hardware comparison sample.

Verified:
- make -C dcbuild gldc_tests scissor polygon_compare
- scissor sample on Dreamcast hardware
- polygon_compare sample on Dreamcast hardware
- existing strided texture sample on Dreamcast hardware
2026-07-03 09:37:12 -07:00
GPF
862bcf70d1 Use release-compatible PVR texture stride setup 2026-07-01 20:48:06 -07:00
Luke Benstead
e823205ebc Merge branch 'glPolygonMode-limited-scope-integration' into 'master'
add limited-scope compatability glPolygonMode state for GL_TRIANGLES + GL_LINE/GL_POINT

See merge request simulant/GLdc!169
2026-06-27 06:33:55 +00:00
Luke Benstead
cbc83deee0 Merge branch 'master' into 'feature/kos-texture-stride'
# Conflicts:
#   tests/test_glteximage2d.h
2026-06-23 05:25:48 +00:00
Luke Benstead
c3a7776f30 Add more extensive test suite 2026-06-22 09:05:44 +01:00
GPF
7b48abc040 Updated the MR based on the feedback:
Replaced GL_KOS_texture_stride with GL_KOS_texture_non_power_of_two
Removed the explicit texture parameter and made supported NPOT GL_TEXTURE_2D textures automatically use the PVR strided backend
Added clamp-only validation and retained the existing restrictions around mipmaps, wrapping, and unsupported formats

The underlying PVR strided implementation remains the same. GL_NV_texture_rectangle can be considered as a future follow-up.
2026-06-20 14:34:27 -07:00
GPF
6915d7a58c Merge remote-tracking branch 'upstream/master' into feature/kos-texture-stride
# Conflicts:
#	GL/texture.c
2026-06-20 01:12:32 -07:00
GPF
8aa9a0ec43 Add GL_KOS_texture_stride support 2026-06-20 00:45:11 -07:00
GPF
5065405e71 Optimize streaming texture updates 2026-06-05 21:11:02 -07:00
Luke Benstead
8aa0e305eb Many texture and lighting fixes 2026-05-04 08:59:12 +01:00
Luke Benstead
b0ef8ed151 Fix fast path calculation 2026-05-03 21:31:58 +01:00
Luke Benstead
57ab4b60a6 Avoid copies when converting textures 2026-05-03 18:47:58 +01:00
Luke Benstead
d85b8e515c Fix lighting issues 2026-04-26 21:24:58 +01:00
Luke Benstead
ce67e37c5d Switch to m4-single 2026-04-23 20:00:48 +01:00
Luke Benstead
8743b0a5b9 Add tests 2026-04-20 22:23:31 +01:00
iann
fca24d106f add limited-scope compatability glPolygonMode state for GL_TRIANGLES + GL_LINE/GL_POINT 2026-04-16 19:27:19 +09:00
Luke Benstead
71da98a0cd Clean up some state 2026-03-04 21:13:42 +00:00
Luke Benstead
21a66c8284 Fix behaviour of current color, normal etc. 2026-03-04 21:04:24 +00:00
Luke Benstead
f0eefc4125 Get non textured polys working 2026-03-01 08:13:04 +00:00
Luke Benstead
13a7de3633 Fix software build 2026-02-28 22:04:08 +00:00
Luke Benstead
bf45f36e82 More float color work 2026-02-28 14:26:22 +00:00
Luke Benstead
cb3153d763 Start refactoring everything 2026-02-23 21:41:00 +00:00
Luke Benstead
ba10615722 Allow compiling containers on Xbox
Obviously GLdc doesn't work on XBox but the containers are fairly generic and are (ab)used
in the Simulant engine which does compile there.
2026-02-15 07:33:44 +00:00
Luke Benstead
b67c8976db Don't fail when passing GL_TEXTURE_BINDING_CUBE_MAP_ARB to glGet 2025-11-01 21:15:03 +00:00
darc
67f2671618 Allow for proper shutdown/deinitialization 2025-09-15 16:50:02 -05:00
jnmartin84
cae97a2cce mirrored repeat param should only alter mirrored repeat state 2025-09-15 16:50:02 -05:00
jnmartin84
b5bde0a259 sorry, I was wrong about the clamp state for MIRRORED_REPEAT 2025-09-15 16:50:02 -05:00
Falco Girgis
88e7130e98 Changed fabs() to fabfs() within glClipEdge(). 2025-09-15 16:50:02 -05:00
jnmartin84
7ff32cec48 clear clamp when setting mirrored repeat 2025-07-13 01:07:49 -04:00
jnmartin84
0cd447dbcf don't waste a full byte on mirror/flip setting
moved MIRROR bits into bits 2 and 3 of what used to be `uv_clamp` member of TextureObject
renamed `uv_clamp` member to `uv_wrap`
updated and commented code accessing `uv_wrap` for both clamp and mirror settings
2025-07-13 00:16:43 -04:00
jnmartin84
708566af72 initial support for GL_MIRRORED_REPEAT 2025-07-12 12:07:04 -04:00
Luke Benstead
f09760dda3 Merge branch 'tnl_effects' into 'master'
Add support for texture and colour matrices

See merge request simulant/GLdc!157
2025-05-24 20:19:01 +00:00
bruceleeto
dccc26d532 Fix compiler ICE with double-to-float macro conversion 2025-05-24 05:32:04 +01:00
UnknownShadow200
b4f2a80a0b Optimise twiddle index calculation 2025-04-12 10:46:09 +10:00
UnknownShadow200
cf3a29e097 Fix clipped triangle in THIRD_VISIBLE case producing vertices in wrong direction, which would result in them being culled when face culling was enabled 2025-03-31 21:12:05 +11:00
UnknownShadow200
135f4c58c5 Fix gluBuild2DMipmaps not returning a value 2025-03-31 21:08:53 +11:00
T_chan
ca8ebf7fc0 Change all ifdefs to support both DC & Naomi 2025-02-22 14:42:00 +01:00
UnknownShadow200
6ce38521c9 Fix tnl_effects sample not working at all on native desktop OpenGL 2025-02-22 22:41:49 +11:00
UnknownShadow200
0e112ffb3c Merge branch 'master' into tnl_effects 2025-02-22 22:35:41 +11:00
Luke Benstead
0285e2027d Merge branch 'sketchy_vertex_formats' into 'master'
Implemented support for all vertex attribute fmts.

See merge request simulant/GLdc!156
2025-02-22 08:23:38 +00:00
Luke Benstead
6bd42b87b9 Merge branch 'fog_fix' into 'master'
Fixed OpenGL Fog implementation + Added New Sample

See merge request simulant/GLdc!155
2025-02-22 08:23:16 +00:00
Luke Benstead
d630041cc8 Merge branch 'glCompressedTexSubImage2D-recreated' into 'master'
creates new GLext function glCompressedTexSubImage2D, updated nehe_06_vq.elf sample to use the new function.

See merge request simulant/GLdc!147
2025-02-22 08:21:10 +00:00
David Reichelt
32e3f4374e Call fsincos with angle degrees instead of passing in radians 2025-02-22 08:20:21 +00:00
UnknownShadow200
ff942e804e Add texture/color matrix sample 2025-02-22 10:52:09 +11:00
UnknownShadow200
2669a9266f When texture validation fails, log reason why using INFO_MSG 2025-02-22 10:08:55 +11:00
UnknownShadow200
e3f61f3c78 Initial work on texture and colour matrix support 2025-02-22 09:33:08 +11:00
UnknownShadow200
ebdb454a75 Simplify T&L effect code 2025-02-22 08:46:58 +11:00