Commit graph

2309 commits

Author SHA1 Message Date
salvy
1a8aa9b8e1 [!] Fixed bad assumption for sprite2D in Glover
[!] Accurate TMEM can be used on the PSP (Just define DAEDALUS_ACCURATE_TMEM)
[!] Use StrmnNrmn's PrepareTexRectUVs for PSP(No need for hacks and I don't think is too expensive at the end)
[~] Fixed a SP DMA bug in W32 (I still think we should use the PSP method, since it works fine)
[~] Set rounding mode in W32/OSX (NOP for PSP)
[+] Handle more regs in MTC0
[~] Some clean ups


git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1358 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-22 06:55:04 +00:00
strmnnrmn
3d7b560cb3 [~] Better assert for 'Specifying negative width/height for tile descriptor'
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1357 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-21 22:16:57 +00:00
strmnnrmn
a7b569ac71 [!] Fix PrepareTexRectUVs - it was applying GU_CLAMP when uv0.{x,y} was already >0, but uv1.{x,y} was <0 or >size
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1356 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-21 22:16:51 +00:00
Corn
940a205123 [!] Kirby 64 also needs the "no clamp hack"
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1355 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-21 20:16:24 +00:00
Corn
f2d0f4cd0f [!] Force Clamp for textures on texrects (and use a hack to disable it on Lamborghini)
[!] Fix off by one in UV mapping for texrects (california speed)

git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1354 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-21 19:20:09 +00:00
strmnnrmn
fd03012d0d [!] Possible fix for loading savestates - mpCacheHashTable wasn't being cleared, so 'if( mpCacheHashTable[ixa] && mpCacheHashTable[ixa]->GetTextureInfo() == ti )' could dereference an uninitialised pointer.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1353 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 08:08:38 +00:00
salvy
1be5f67228 [!] Better keep Process Pif in one function to avoid redundancy
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1352 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 05:33:56 +00:00
salvy
6e122cb4bc [~] Check for palette NULL is only needed when DAEDALUS_FAST_TMEM is defined
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1351 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 01:53:18 +00:00
strmnnrmn
50bbb7bb1c [~] Fix a small texrect uv issue - if the uv1 x/y is outside of bounds, don't force clamping (all the offseting should be fine)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1350 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 01:00:19 +00:00
strmnnrmn
95ff470496 [-] PSP renderer doesn't need to remove mTileTopLeft from texrect uvs now (PrepareTexRectUVs should have set it to zero and fixed everything up already)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1349 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 01:00:11 +00:00
strmnnrmn
f8d4b4d190 [!] Fix glitchy borders in TexRect. Use GU_CLAMP/GL_CLAMP_TO_EDGE, but only after fixing up UVs so that they're positive.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1348 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:42:24 +00:00
strmnnrmn
f959a9c940 [~] OSX doesn't use mScale in CNativeTexture
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1347 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:42:16 +00:00
strmnnrmn
65928a7b4f [~] Fix Draw2DTextureBlit on OSX. It's only needed on PSP and Draw2DTexture works fine for OSX. So move the logic for calling (w>=512) to RendererPSP::Draw2DTexture, and remove Draw2DTextureBlit from the BaseRenderer abstract interface.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1346 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:42:08 +00:00
strmnnrmn
9a33890661 [~] Implement the Draw2DTexture functions on OSX. Still not sure these are correct - Wipeout intro text is a bit garbled
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1345 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:58 +00:00
strmnnrmn
b7486694f9 [~] Pass S2DEX/Sprite2D texture loads through the renderer so that it can keep track of what's loaded
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1344 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:51 +00:00
strmnnrmn
5888665fb5 [~] Add some debug logging in case the shader couldn't be compiled
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1343 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:44 +00:00
strmnnrmn
992841a92d [~] Keep the UV coords sane, even though they're not used (avoid future copy-paste errors :)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1342 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:37 +00:00
strmnnrmn
a9ddb29935 [~] If TextureInfo.Line isn't set, fall back to ConvertTexture
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1341 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:30 +00:00
strmnnrmn
be013e48ba [~] Improve an assert in GetUpdatedTextureDescriptor - print out the .left value
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1340 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:23 +00:00
strmnnrmn
849a797321 [~] Add an assert to ConvertTile if Line hasn't been set
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1339 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:17 +00:00
strmnnrmn
69cde1d3ce [~] Fix indentation in ConvertTile.cpp (there shouldn't be any functional changes)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1338 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:10 +00:00
strmnnrmn
ff498e4443 [~] Improve assert in ABI3.cpp and remove redundant second assert (code doesn't change between asserts). I'm not even sure what this is asserting for - should assert earlier, where code is used to compute vscale?
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1337 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:41:03 +00:00
strmnnrmn
c8225f941d [~] Rename ConvertGenericPalettised* to something a bit more meaningful
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1336 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:57 +00:00
strmnnrmn
cc9adb280e [*] Tidy/simplify/optimise CI texture conversion. For all dest formats we decode the palette first, which simplifies the conversion loop for the RGBA8888 case and means we can remove some duplicated code which is no longer needed.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1335 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:50 +00:00
strmnnrmn
7b79e66b00 [!] Fix crash on OSX when forcing the native texture format to RGBA 8888
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1334 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:44 +00:00
strmnnrmn
e112b852ac [~] On OSX, just pass the texture width/height through as uTexScale rather than the reciprocal
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1333 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:38 +00:00
strmnnrmn
65cf2d0128 [!] Fix broken texels in the first byte of each row (e.g. mariokart) in the new accurate tmem mode
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1332 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:31 +00:00
strmnnrmn
bb7cae6784 [+] Use ConvertTile when DAEDALUS_ACCURATE_TMEM is set
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1330 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:19 +00:00
strmnnrmn
8c223d0680 [~] Fix CopyLine etc - forgot that we need to unswap the words. Should be able to improve this (copy as byteswapped, do fiddling in the texture decoder)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1329 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:10 +00:00
strmnnrmn
f18ec33db0 [~] BSWAP32 is defined twice
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1328 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:40:03 +00:00
strmnnrmn
8415e94977 [~] No need for cont input args here
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1326 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:51 +00:00
strmnnrmn
e068c9da98 [~] Rename mRecentTexture* to mBoundTexture*
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1325 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:41 +00:00
strmnnrmn
648d139117 [~] Not we can move the code to set up mRecentTexture earlier (hopefully into RDPStateManager::GetUpdatedTextureDescriptor
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1324 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:33 +00:00
strmnnrmn
7e9a6f8eb0 [*] Remove mTileScale. No need to cache this, as we can always figure it out from the native texture (less state to keep in sync is better)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1323 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:27 +00:00
strmnnrmn
c2b6206b51 [~] RendererPSP::RenderUsingRenderSettings - outer check for mRecentTexture != NULL isn't needed
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1322 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:17 +00:00
strmnnrmn
3f197704c5 [~] Tidy
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1321 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:10 +00:00
strmnnrmn
575bc9fd2e [~] Rename GetTextureDescriptor to GetUpdatedTextureDescriptor, and remove mutable
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1320 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:39:04 +00:00
strmnnrmn
545e2c4221 [~] Tidy UpdateTexture a little
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1319 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:56 +00:00
strmnnrmn
dc91fe455b [~] We can store raw pointers to CachedTextures, and save a little overhead.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1318 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:50 +00:00
strmnnrmn
7061f3d30a [-] CachedTexture::Touch isn't used
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1317 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:43 +00:00
strmnnrmn
c72b2ce625 [~] STextureInfoSnapshot can use a CNativeTexture
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1316 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:35 +00:00
strmnnrmn
240081f9ff [~] Don't store a separate mpWhiteTexture per CachedTexture. Make it a separate attribute of the key (TextureInfo) and cache it directly.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1315 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:26 +00:00
strmnnrmn
231b248979 [~] CTextureCache::GetOrCreateTexture can return a CNativeTexture now.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1314 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:17 +00:00
strmnnrmn
af29743eab [~] Keep track of NativeTextures, not CachedTextures. I'm going to introduce a new CachedTile type for OSX, and it's simpler for the renderer to only know about the native texture type (common to CachedTexture and CachedTile)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1313 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:09 +00:00
strmnnrmn
be4b8e85c4 [~] RenderUsingCurrentBlendMode and DebugBlendmode can use a reference to the texture RefPtr
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1312 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:38:00 +00:00
strmnnrmn
f0c89b1874 [~] Make CachedTexture::UpdateIfNecessary private. Always do this when returning from CTextureCache::GetOrCreateTexture (the mFrameLastUsed check in IsFresh ensure that this does nothing if called many times in a frame)
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1311 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:37:50 +00:00
strmnnrmn
7855c69a86 [~] ConvertTexture on OSX isn't quite ready for OSX RGBA8888 only
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1310 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:37:41 +00:00
strmnnrmn
d3678e876d [~] Specify DAEDALUS_ACCURATE_TMEM in the OSX build. MAybe should be in the OSX Platform.h
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1309 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:37:34 +00:00
strmnnrmn
bc2c3207d5 [!] Fix bug in new tmem emulation code
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1308 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:37:27 +00:00
strmnnrmn
d04bd5b013 [~] Shuffle around the arguments to ConvertTexture a bit. Define TextureDestInfo in the cpp file, and just plumb though the required arguments directly. All this so I can try to add a ConvertTile function which decodes directly from emulated TMEM.
git-svn-id: https://subversion.assembla.com/svn/Daedalusx64/trunk@1307 42e9bfbe-799a-4a2d-bad1-236e862a387a
2013-03-20 00:37:19 +00:00