Commit Graph

83 Commits

Author SHA1 Message Date
Luke Benstead
4adc49cd40 Optimisations 2021-09-12 15:04:52 +01:00
Luke Benstead
3332dfa74a Handle running out of PVR memory correctly 2021-09-04 12:14:31 +01:00
Luke Benstead
f0383f8e1c Remove broken check 2021-05-16 20:33:49 +01:00
Luke Benstead
ce9f3677f6 Immediate mode optimisation 2021-04-18 21:33:23 +01:00
Luke Benstead
9ca68de427 Force 32-byte allocations 2021-04-18 13:57:00 +01:00
Luke Benstead
30d76eada9 Fix texture issues 2021-04-13 21:28:59 +01:00
Luke Benstead
fe616028bb X86 2021-04-09 15:24:47 +00:00
Luke Benstead
9ed6c0209e Defrag and retry if allocating texture memory fails 2021-02-20 15:04:40 +00:00
Luke Benstead
f9b7cd7985 Add a custom extension to query and defragment texture memory 2021-02-19 21:28:31 +00:00
Luke Benstead
425a0c2af1 Switch to yalloc 2021-02-19 07:08:58 +00:00
Luke Benstead
af82f7632f Fix default texture modulation 2020-05-19 21:27:34 +01:00
Hayden Kowalchuk
1c792df5ae fix: texture.c
- add const where needed
- move defines to private.h
- add vq offsets to mipmaplocation
- backend support for mipmap bias
- inline fixups
- have texture.c spit more helpful info on crash
- allow mipmap uploads to actuall complete
- note unused
2020-03-05 15:09:19 -05:00
Luke Benstead
1d1a980f16 Fix memory leak (thanks @HaydenKow) 2020-03-02 19:20:42 +00:00
Luke Benstead
937ad56c26 Fix out of bounds read 2020-02-29 09:48:52 +00:00
Luke Benstead
2c5b71b2b0 Implement mipmap generation for paletted textures 2019-09-26 09:17:07 +01:00
Luke Benstead
08ba39f6d1 Fix twiddled mipmap generation 2019-09-25 13:45:08 +01:00
Luke Benstead
2e1e28ce51 More mipmap generation fixes 2019-09-25 13:32:13 +01:00
Luke Benstead
e14db20a41 Fix a bunch of mipmap issues 2019-09-24 21:26:17 +01:00
Luke Benstead
2b53f50c46 Add some copy safety and remove some print statements 2019-09-24 19:39:23 +01:00
Luke Benstead
150c95bd33 Huge refactor of mipmap handling. All textures are now stored twiddled on the PVR 2019-09-24 15:47:23 +01:00
Luke Benstead
8f84cbb142 Various cleanups from @mrneo 2019-09-22 20:52:58 +01:00
Ben Baron
b192bfc451 Fixed comment 2019-09-17 08:28:43 -05:00
Ben Baron
cb675434c7 Fixed GL_ALPHA support (convert to argb format) 2019-09-16 20:48:06 -05:00
Luke Benstead
b6fccd3148 Use PVR_TXRENV_MODULATE instead of MODULATEALPHA. Fixes #48 2019-08-08 09:36:38 +01:00
Luke Benstead
3395f17687 Throw GL_INVALID_OPERATION if mipmaps are specified for non-square textures 2019-04-17 16:19:03 +01:00
Luke Benstead
62743d42cb Only allocate space for mipmaps when necessary 2019-04-17 14:55:30 +01:00
Luke Benstead
93311ff12c Fix twiddling code. Fixes #37 2019-03-29 07:54:50 +00:00
Luke Benstead
724ff628aa Fix some signedness issues 2019-03-13 15:14:09 +00:00
Luke Benstead
8b206f012e Make sure we correctly initalize the used banks 2019-03-13 12:05:06 +00:00
Luke Benstead
957ebfa662 Fix texture twiddling 2019-03-11 19:14:30 +00:00
Luke Benstead
588c082ec8 Allow specifying palette, autosort, memory options via glKosInitEx 2019-03-11 19:07:59 +00:00
Luke Benstead
8f26e9c364 Fix a bug in the morton_index function 2019-03-11 09:12:48 +00:00
Luke Benstead
e4186a05bf Start working on a test for GL_ALPHA_TEST 2019-03-10 19:38:47 +00:00
Luke Benstead
1807a0119c Add some missing function stubs 2019-03-10 12:19:45 +00:00
Luke Benstead
259a82e69f Add support for multiple shared palettes 2019-03-10 11:18:56 +00:00
Luke Benstead
864dc45d10 Allocate palette slots on a FIFO basis 2019-03-09 14:32:50 +00:00
Luke Benstead
516cae7893 Store palettes in RAM not VRAM 2019-03-08 21:36:53 +00:00
Luke Benstead
d7342fa0c0 Automatically twiddle non-twiddled palette data 2019-03-07 21:21:30 +00:00
Luke Benstead
7c0a123aac Correctly initialize the shared palette. Fixes #34 2019-03-04 08:44:19 +00:00
Luke Benstead
efa63ebff2 Don't apply the shared palette if it hasn't been specified yet. Fixes #34 2019-03-04 08:42:24 +00:00
Luke Benstead
11bb588279 Make sure we reupload the palette if it's changed by glColorTableEXT 2019-03-03 20:21:42 +00:00
Luke Benstead
526b1f0d16 Add some assertions 2019-03-03 19:49:28 +00:00
Luke Benstead
44ca14bcbd Add assertions 2019-03-03 19:11:53 +00:00
Luke Benstead
5f7fef2cf9 Prefix non-static private functions with '_gl' 2019-03-03 19:06:01 +00:00
Luke Benstead
926214bd82 Prefix some non-static private functions with '_gl' 2019-03-03 19:02:25 +00:00
Luke Benstead
2382126603 Make palette binding lazy 2019-03-03 18:56:18 +00:00
Luke Benstead
ef06af793a Don't apply the color table unless a texture is bound 2019-03-03 18:54:25 +00:00
Luke Benstead
3c3018450f Support twiddled and non-twiddled paletted textures 2019-03-03 18:49:33 +00:00
Luke Benstead
d12032c961 Store palette data in PVR ram 2019-03-03 18:49:06 +00:00
Luke Benstead
f349cd1b49 Fix packing order issue (thanks @mrneo240!) 2019-03-03 18:48:50 +00:00