mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-04-25 14:16:10 +03:00
[GH-ISSUE #3046] God of war's graphics issue #1253
Labels
No labels
Atrac3+
Audio
CPU emulation
D3D11
D3D9 (removed)
Depth / Z
Feature Request
Font Atlas
GE emulation
Guardband / Range Culling
HLE/Kernel
I/O
Input/Controller
MP3
Multithreading
Needs hardware testing
Networking/adhoc/infrastructure
No Feedback / Outdated?
OpenGL
PGF / sceFont
PSMF / MPEG
Platform-specific (Android)
Platform-specific (Windows)
Platform-specific (iOS)
PowerVR GPU
SDL2
Saving issue
User Interface
Vulkan
arm64jit
armjit
armv6
x86jit
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ppsspp#1253
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @arcade1977 on GitHub (Aug 4, 2013).
Original GitHub issue: https://github.com/hrydgard/ppsspp/issues/3046
981~1067:
@arcade1977 commented on GitHub (Aug 4, 2013):
I don't know why can not upload pictures:(
Please look it:
http://tieba.baidu.com/p/2507244709
@arcade1977 commented on GitHub (Aug 4, 2013):
@unknownbrackets ,can you fix god of war's graphics issue since 981 ( 974 still OK,but 981 is destroyed) ?
@unknownbrackets commented on GitHub (Aug 4, 2013):
I don't have this game, but I think #3029 may work around it for now.
-[Unknown]
@dbz400 commented on GitHub (Aug 4, 2013):
I have retested that scene and confrim working okay with #3029
@arcade1977 commented on GitHub (Aug 9, 2013):
At 0.81.1167, this problem appeared again:(
@arcade1977 commented on GitHub (Aug 9, 2013):
http://tieba.baidu.com/p/2520154867
@arcade1977 commented on GitHub (Aug 9, 2013):
好像不是 #3082 的问题,1165 战神就有这个问题了,但是1152是正常的,我正在测试到底是哪个版本开始破坏它的
@arcade1977 commented on GitHub (Aug 9, 2013):
OK,找到把战神破坏的版本了,是v0.8.1-1158
@hrydgard commented on GitHub (Aug 9, 2013):
English in reports please, at least in addition to the Chinese.
@dbz400 commented on GitHub (Aug 10, 2013):
@hrydgard , they're mentioning the broken commit is git 1158
[Rename gpuStats.numFrames to numVBlanks. Switch to using numFlips for things like cache expirations.]
@unknownbrackets commented on GitHub (Aug 10, 2013):
Please reopen if this isn't fully fixed. Thanks @raven02.
-[Unknown]
@dbz400 commented on GitHub (Sep 1, 2013):
Same issue happened again since i changed from invalid to valid
@dbz400 commented on GitHub (Sep 1, 2013):
@unknownbrackets , just wonder if MAX_SUBAREA_Y_OFFSET related to (entry->addr - address) / entry->bufw
@unknownbrackets commented on GitHub (Sep 1, 2013):
@raven02: you have to think of all of this as MEMORY. Everything goes back to memory.
Let's use easy small numbers to make things simple to explain. My memory goes from 0 to 1000. Framebuffers are 200 bytes.
So let's say I do what's normal, and create two framebuffers: one at 0 and the other at 200. What I'm doing is essentially "allocating" the space from 0-199 for fb 1, and 200-399 for fb 2, right? These are the buffers I show on the screen.
Now suppose I draw a texture. I start this texture at 20. 20 is INSIDE 0-199.
If we assume this theoretical display uses a stride/width of 20, then the texture actually starts 1 pixel lower than the start of the framebuffer, right? If I say I want the texture starting at 20, and ending just before 80, then really I'm asking for this:
In other words, the texture is actually only 3px high, unlike my normal 10px high framebuffers (these are all simple numbers.)
So back to the formula and original question:
This tells me how many pixels (rows) below the start of the framebuffer the texture starts at.
-[Unknown]
@dbz400 commented on GitHub (Sep 1, 2013):
Humm it complicated than that i imagaine originally :)
So MAX_SUBAREA_Y_OFFSET = 32 means max 32 pixels below the start of framebuffer ?
@unknownbrackets commented on GitHub (Sep 1, 2013):
Yes. The reason for it is that if I allowed large numbers (e.g. anything within the buffer), we got glitches in a lot of places. SAO in particular.
-[Unknown]
@dbz400 commented on GitHub (Sep 1, 2013):
Alright . In God of War , it keep tracek its offset like this
30:09:212 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=16
30:09:212 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=18
30:09:212 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=19
30:09:215 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=2
30:09:215 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=3
30:09:215 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=2
30:09:215 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=3
30:09:216 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=16
30:09:216 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=18
30:09:216 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=19
30:09:226 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=2
30:09:226 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=3
30:09:226 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=2
30:09:226 user_main I[HLE]: GLES\TextureCache.cpp:219 offset=3
@dbz400 commented on GitHub (Sep 1, 2013):
However the max offset above is 19 which is still smaller than MAX_SUBAREA_Y_OFFSET but generate following black texture
@unknownbrackets commented on GitHub (Sep 2, 2013):
Really strange. What are the texture heights and framebuffer heights for these cases? That's how I compared for other games.
-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
@dbz400 commented on GitHub (Sep 2, 2013):
46:11:645 user_main I[HLE]: GLES\TextureCache.cpp:226 texture height = 512 , framebuffer height=272
46:11:647 user_main I[HLE]: GLES\TextureCache.cpp:226 texture height = 512 , framebuffer height=272
46:11:647 user_main I[HLE]: GLES\TextureCache.cpp:226 texture height = 512 , framebuffer height=272
46:11:647 user_main I[HLE]: GLES\TextureCache.cpp:226 texture height = 512 , framebuffer height=272
@dbz400 commented on GitHub (Sep 2, 2013):
I checked Tactic Orge and SOA which use subarea offset texture , texture height are 256 and 128 which is smaller than framebuffer height
@unknownbrackets commented on GitHub (Sep 2, 2013):
Make sure you're checking the initial intro battle against the guy in red. That's where it has a ton of effects.
Just delete / rename savedata to see it.
-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
Yep , just checked it .It is that battle scene against those guy in red.

This one line fixes the God of War issue here while still maintains all stuffs in Tactic Orge and SOA
} else if ((entry->addr - address) / entry->bufw < framebuffer->height && entry->bufw < framebuffer->height) {
@unknownbrackets commented on GitHub (Sep 2, 2013):
Okay, but that's obviously pure hackery, right? To be fair, limiting the height at all is hackery, but the bufw isn't really related to the height at all...
-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
Yep , however texture height is defintely bigger than that of framebuffer height in GOW so it explains the black textures?
@unknownbrackets commented on GitHub (Sep 2, 2013):
To be clear (fun ascii art time again):
In this example, we subtract the texture start memory address from the framebuffer address, and now we have how many bytes into the framebuffer the texture starts at
(entry->addr - address).The only reason to divide by
bufwis to determine the y value (regardless of width) to compare it to the framebuffer height and make sure it's not outside the framebuffer. That check in other words is verifying that this is not happening:That said, as I write this, I wonder if it's not taking into account the bits per pixel correctly... bufw is not bytes, it's pixels.
-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
Basically , I did feel strange when i first try to check the value of "(entry->addr - address) / entry->bufw" (at that moment i don't know it is pixel) is always return very small number when compare to framebuffer height
@unknownbrackets commented on GitHub (Sep 2, 2013):
bitsPerPixel[gstate.getTextureFormat()]should be the bits, so the correct divisor is probably:Or similar.
-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
Something like this to check ?
} else if ((entry->addr - address) / bufwBytes < framebuffer->height) {
@unknownbrackets commented on GitHub (Sep 2, 2013):
Yeah... does that help at all?
-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
Humm didn't help ....
@dbz400 commented on GitHub (Sep 2, 2013):
I did one observation .For Tactic Orge and SOA , offset is value of 2 and (6,2,8,11,13) respectively . However in , GOW , offset is (0,4) which has 0 offset
@unknownbrackets commented on GitHub (Sep 2, 2013):
Hmm, well if offset is 0, it should be an exact match. If that's the case, and
framebuffer->format == entry->formathow is it even getting there?-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
Just tried something but not too sure if this makes sense but it works for all .
@unknownbrackets commented on GitHub (Sep 2, 2013):
Hmm, what that means essentially is that you are disabling it for non-clut types, e.g. these:
It'd be better to just replace
bufwBytes < fbByteswithframebuffer->format == entry->format. But I think the height check still should be there, without it there was some game I was getting a definitely wrong texture pulled in (it may have been SAO.)-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
This one includes height check and format check as well. All 3 titles are working good as well .
@unknownbrackets commented on GitHub (Sep 2, 2013):
Well,
bufwBytes < fbBytesisn't a height check. It's a width check. Since there's alreadyframebuffer->fb_stride == entry->bufw, it literally ONLY checks that there's no clut being used (or the same depth of clut is being used.)It'd be better to add back the height check.
-[Unknown]
@dbz400 commented on GitHub (Sep 2, 2013):
To be precise changes as follow (somehow still cannot make GOW happy though)
if ((entry->addr - address) / bufwBytes < framebuffer->height && framebuffer->format == entry->format) {
@dbz400 commented on GitHub (Sep 3, 2013):
I do think GOW here somehow incorrectly fall into the subarea render texture .It should be a exact match .
@unknownbrackets commented on GitHub (Sep 3, 2013):
I hadn't realized you had height in the "fbBytes", so now I just don't even understand what the logic behind that compare even was, sorry. Can you explain what you're trying to do with an ascii box?
-[Unknown]
@dbz400 commented on GitHub (Sep 3, 2013):
I think my logic mostly get wrong at the beginning.Originally i just want to compare them Bytes by Bytes rather than pixel so derived something wrong below.
@dbz400 commented on GitHub (Sep 3, 2013):
I think more likely to be this one for a valid width check.
u32 fbBytes = bitsPerPixel[framebuffer->format] * framebuffer->fb_stride / 8;
@unknownbrackets commented on GitHub (Sep 8, 2013):
So are the graphics okay in this game now?
-[Unknown]
@dbz400 commented on GitHub (Sep 8, 2013):
@unknownbrackets , the graphics all look okay now in-game .I think can be closed :)