From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 110897] HyperZ is broken for r300 (bad z for some micro and macrotiles?)
Date: Fri, 14 Jun 2019 22:01:40 +0000 [thread overview]
Message-ID: <bug-110897-502-G24NvKAORf@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-110897-502@http.bugs.freedesktop.org/>
[-- Attachment #1.1: Type: text/plain, Size: 3790 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=110897
--- Comment #36 from Richard Thier <u9vata@gmail.com> ---
Okay it seems pipes=1 is working on my machine.
diff --git a/src/gallium/drivers/r300/r300_texture_desc.c
b/src/gallium/drivers/r300/r300_texture_desc.c
index 77d272bfb6b..029b28570d7 100644
--- a/src/gallium/drivers/r300/r300_texture_desc.c
+++ b/src/gallium/drivers/r300/r300_texture_desc.c
@@ -358,6 +358,9 @@ static void r300_setup_hyperz_properties(struct r300_screen
*screen,
pipes = screen->info.r300_num_z_pipes;
} else {
pipes = screen->info.r300_num_gb_pipes;
+ /* FIXME: Quickfix only for Mobility Radeon Xpress 200M in asus
laptop! */
+ pipes = 2; // Half the screen is bad for me
+ pipes = 1; // Whole screen is ok for me
}
for (i = 0; i <= tex->b.b.last_level; i++) {
I do not even dare uploading this patch as it likely only works on my specific
machine! The know-how seems to be worthy of knowing though so in case anyone
see something like this, they can try something similar until there is a proper
fix.
317 /* The tile size of 1 DWORD in ZMASK RAM is:
318 *
319 * GPU Pipes 4x4 mode 8x8 mode
320 * ------------------------------------------
321 * R580 4P/1Z 32x32 64x64
322 * RV570 3P/1Z 48x16 96x32
323 * RV530 1P/2Z 32x16 64x32
324 * 1P/1Z 16x16 32x32
325 */
326 static unsigned zmask_blocks_x_per_dw[4] = {4, 8, 12, 8};
327 static unsigned zmask_blocks_y_per_dw[4] = {4, 4, 4, 8};
I should have thought that pipes=1 is for me. As you can see here, there are
hardcoded values for X and Y block counts. Originally drm reports pipes=3 for
my card so I end up using the third column in this table: 12*4 blocks.
Now remembering I had to half both of them earlier using the hacky patch (6*2)
it was sure that "pipes=2" would not work still, because 4*8 = 32 is still much
more than 6*2=12 I provided. Of course 4*4=16 so now I see my earlier hack was
a bit miscalculated.
Also now I see exactly why 1/3 of the screen was only "working": because 12/4 =
3 and 4/4=1. You can clearly see this from the table!!! Wow!
I see that "r300_num_gb_pipes" is used at some of the other places:
src/gallium/drivers/r300/r300_query.c
src/gallium/drivers/r300/r300_emit.c (also for some queries)
src/gallium/drivers/r300/r300_context.c (only fprintf-ing for debugging)
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c (this where the drm query is)
I do not really know what kind of "queries" are these, but I might go and
change code so that winsys returns gb_pipes=1 itself without hacks at other
places and see if there are other glitches (a bit prolonged testing).
Who knows, maybe things actually get less glitchy if this query stuff is really
used and the value was bad before!
Then if I see that I really only have one pipeline, then maybe I should look at
the other side of this drm call to see why it returns this value and not else.
PS.: One other thing that I do not know is if pipes can exist maybe but can be
turned off or something? But I really have no idea about that.
PS.: I also grow to understand the logic why the smaller values here actually
make more to be properly rendered on screen! Because if there are two or three
pipes for example, you clear things similarly to this pattern:
01012323.... etc (I saw them in docs or source comments). So if there would be
two pipes, you can z-delete two blocks at the same time etc. it is only simple
maths to see the smaller values are better here then.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 4670 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-06-14 22:01 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 18:03 [Bug 110897] HyperZ is broken for r300 (bad z for some micro and macrotiles?) bugzilla-daemon
2019-06-11 18:07 ` bugzilla-daemon
2019-06-11 18:18 ` bugzilla-daemon
2019-06-11 23:21 ` bugzilla-daemon
2019-06-11 23:26 ` bugzilla-daemon
2019-06-11 23:56 ` bugzilla-daemon
2019-06-12 0:43 ` bugzilla-daemon
2019-06-12 0:54 ` bugzilla-daemon
2019-06-12 1:13 ` bugzilla-daemon
2019-06-12 1:22 ` bugzilla-daemon
2019-06-12 17:33 ` bugzilla-daemon
2019-06-12 17:51 ` bugzilla-daemon
2019-06-12 20:18 ` bugzilla-daemon
2019-06-12 20:55 ` bugzilla-daemon
2019-06-12 21:04 ` bugzilla-daemon
2019-06-13 8:56 ` bugzilla-daemon
2019-06-13 9:00 ` bugzilla-daemon
2019-06-13 10:16 ` bugzilla-daemon
2019-06-13 11:20 ` bugzilla-daemon
2019-06-13 11:21 ` bugzilla-daemon
2019-06-13 12:32 ` bugzilla-daemon
2019-06-13 12:35 ` bugzilla-daemon
2019-06-13 15:35 ` bugzilla-daemon
2019-06-13 15:38 ` bugzilla-daemon
2019-06-13 15:38 ` bugzilla-daemon
2019-06-13 20:07 ` bugzilla-daemon
2019-06-13 23:18 ` bugzilla-daemon
2019-06-13 23:37 ` bugzilla-daemon
2019-06-14 12:06 ` bugzilla-daemon
2019-06-14 12:28 ` bugzilla-daemon
2019-06-14 12:28 ` bugzilla-daemon
2019-06-14 12:52 ` bugzilla-daemon
2019-06-14 13:20 ` bugzilla-daemon
2019-06-14 15:00 ` bugzilla-daemon
2019-06-14 15:11 ` bugzilla-daemon
2019-06-14 15:30 ` bugzilla-daemon
2019-06-14 17:20 ` bugzilla-daemon
2019-06-14 17:26 ` bugzilla-daemon
2019-06-14 21:44 ` bugzilla-daemon
2019-06-14 22:01 ` bugzilla-daemon [this message]
2019-06-14 22:11 ` bugzilla-daemon
2019-06-14 23:05 ` bugzilla-daemon
2019-06-14 23:09 ` bugzilla-daemon
2019-06-14 23:10 ` bugzilla-daemon
2019-06-14 23:20 ` bugzilla-daemon
2019-06-14 23:30 ` bugzilla-daemon
2019-06-15 1:23 ` bugzilla-daemon
2019-06-15 1:27 ` bugzilla-daemon
2019-06-15 2:31 ` bugzilla-daemon
2019-06-15 13:27 ` bugzilla-daemon
2019-06-15 15:15 ` bugzilla-daemon
2019-06-15 15:20 ` bugzilla-daemon
2019-06-15 17:39 ` bugzilla-daemon
2019-06-15 17:40 ` bugzilla-daemon
2019-06-15 17:45 ` bugzilla-daemon
2019-06-15 21:48 ` bugzilla-daemon
2019-06-15 22:10 ` bugzilla-daemon
2019-06-16 9:05 ` bugzilla-daemon
2019-06-16 11:21 ` bugzilla-daemon
2019-06-16 11:23 ` bugzilla-daemon
2019-06-16 14:17 ` bugzilla-daemon
2019-06-16 15:44 ` bugzilla-daemon
2019-06-16 15:47 ` bugzilla-daemon
2019-06-16 17:22 ` bugzilla-daemon
2019-06-16 17:41 ` bugzilla-daemon
2019-06-16 20:16 ` bugzilla-daemon
2019-06-16 20:49 ` bugzilla-daemon
2019-06-16 23:24 ` bugzilla-daemon
2019-06-17 6:19 ` bugzilla-daemon
2019-06-17 9:22 ` bugzilla-daemon
2019-06-17 18:30 ` bugzilla-daemon
2019-06-17 19:40 ` bugzilla-daemon
2019-06-17 20:49 ` bugzilla-daemon
2019-06-17 21:48 ` bugzilla-daemon
2019-06-19 3:07 ` bugzilla-daemon
2019-09-18 18:55 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-110897-502-G24NvKAORf@http.bugs.freedesktop.org/ \
--to=bugzilla-daemon@freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox