Skip to contentSkip to conversation

New: occlusion queries are messed up in ut2004 (regression, bisected)

Bug 37724 [email protected] 1 participant 23 messages May 29, 2011 – Mar 11, 2017

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=37724

Summary: occlusion queries are messed up in ut2004 (regression,
bisected)
Product: Mesa
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: [email protected]
ReportedBy: [email protected]

The majority of the 3d objects disappear periodically since this commit:
f76787b3eae3f0b8af839fabfb24b57715a017f6 is the first bad commit commit f76787b3eae3f0b8af839fabfb24b57715a017f6

Author: Marek Olšák <[email protected]>
Date:   Sun May 29 04:36:36 2011 +0200

r300g: fix occlusion queries when depth test is disabled or zbuffer is
missing

From now on, depth test is always enabled in hardware.

If depth test is disabled in Gallium, the hardware Z function is set to
ALWAYS.

If there is no zbuffer set, the colorbuffer0 memory is set as a zbuffer to silence the CS checker.

This fixes piglit:
- occlusion-query-discard
- NV_conditional_render/bitmap
- NV_conditional_render/drawpixels
- NV_conditional_render/vertex_array

:040000 040000 baeff41ffed8952cbb1666d04941c6d5d01ca4fc
cdb64f4b684804b818df4b65c04109eaad568e11 M src

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

[Bug 37724] occlusion queries are messed up in ut2004 (regression, bisected)

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #1 from Marek Olšák <[email protected]> 2011-05-29 10:57:11 PDT --- Created an attachment (id=47288)
View: https://bugs.freedesktop.org/attachment.cgi?id=47288
Review: https://bugs.freedesktop.org/review?bug=37724&attachment=47288

possible fix

Can you try this patch?

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

[Bug 37724] occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #2 from almos <[email protected]> 2011-05-29 12:41:57 PDT --- (In reply to comment #1)

Quoted 1 line

Created an attachment (id=47288)

View: https://bugs.freedesktop.org/attachment.cgi?id=47288
Review: https://bugs.freedesktop.org/review?bug=37724&attachment=47288

Quoted 3 lines

possible fix

Can you try this patch?

More things remain visible with the patch, but it doesn't fix the issue completely.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 37724] occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

Marek Olšák <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #47288|0                           |1

is obsolete| |

--- Comment #3 from Marek Olšák <[email protected]> 2011-05-30 04:03:13 PDT --- Created an attachment (id=47307)
View: https://bugs.freedesktop.org/attachment.cgi?id=47307
Review: https://bugs.freedesktop.org/review?bug=37724&attachment=47307

possible fix 2

Can you try this patch instead?

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

[Bug 37724] occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #4 from almos <[email protected]> 2011-05-30 11:31:28 PDT --- (In reply to comment #3)

Quoted 1 line

Created an attachment (id=47307)

View: https://bugs.freedesktop.org/attachment.cgi?id=47307
Review: https://bugs.freedesktop.org/review?bug=37724&attachment=47307

Quoted 3 lines

possible fix 2

Can you try this patch instead?

No apparent change compared to the first fix.

Now I see that I haven't mentioned that I use RADEON_HYPERZ=1. Without it there are no rendering errors.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#5 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

Marek Olšák <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|occlusion queries are       |r300g with HyperZ/Z
                   |messed up in ut2004         |compression: occlusion
                   |(regression, bisected)      |queries are messed up in
                   |                            |ut2004 (regression,
                   |                            |bisected)

--- Comment #5 from Marek Olšák <[email protected]> 2011-05-30 13:59:23 PDT --- Ah ok.

I don't consider Hyper-Z ready yet but thanks for testing it.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #6 from Fabio Pedretti <[email protected]> 2011-06-09 04:37:34 PDT ---

Quoted 1 line

I don't consider Hyper-Z ready yet but thanks for testing it.

It is enabled by default now, is it by accident?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#7 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #7 from Marek Olšák <[email protected]> 2011-06-09 07:21:05 PDT --- (In reply to comment #6)

Quoted 3 lines
Quoted 1 line

I don't consider Hyper-Z ready yet but thanks for testing it.

It is enabled by default now, is it by accident?

It's disabled. There are some annoying bugs and I have no clue how to fix them.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #8 from almos <[email protected]> 2011-06-09 07:59:43 PDT --- (In reply to comment #6)

Quoted 3 lines
Quoted 1 line

I don't consider Hyper-Z ready yet but thanks for testing it.

It is enabled by default now, is it by accident?

Perhaps you mean that it always reports this?
r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: NO

It used to mean that those features are enabled, but now it means that those are available in HW. Now if hyperz is enabled, these are printed:
radeon: Acquired Hyper-Z.
radeon: Released Hyper-Z.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#9 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #9 from Fabio Pedretti <[email protected]> 2011-06-10 00:47:52 PDT --- (In reply to comment #8)

Quoted 11 lines

(In reply to comment #6)

Quoted 3 lines
Quoted 1 line

I don't consider Hyper-Z ready yet but thanks for testing it.

It is enabled by default now, is it by accident?

Perhaps you mean that it always reports this?
r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: NO

It used to mean that those features are enabled, but now it means that those are available in HW. Now if hyperz is enabled, these are printed:
radeon: Acquired Hyper-Z.
radeon: Released Hyper-Z.

Yes, I see this:
r300: DRM version: 2.8.0, Name: ATI RV530, ID: 0x71c5, GB: 1, Z: 2
r300: GART size: 509 MB, VRAM size: 256 MB
r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: YES

I didn't noticed the
radeon: Acquired Hyper-Z.
radeon: Released Hyper-Z.
that indeed get printed when RADEON_HYPERZ=1 is set, however I also noticed that with openarena I get the same FPS with or without it.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#10 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

Pavel Ondračka <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #10 from Pavel Ondračka <[email protected]> 2012-01-05 14:04:19 PST --- This isn't actually limited to ut2004. I did notice almost completely black scenes in Lightsmark, broken lightning and black objects in Cogs and occasional black screen in HoN with RADEON_HYPERZ=1, all broken by f76787b3eae3f0b8af839fabfb24b57715a017f6. (RV530 here)

Any chance a revert can happen?

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#11 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #11 from Marek Olšák <[email protected]> 2012-01-05 15:14:59 PST --- The problematic commit fixes occlusion queries for some cases, so I'm sorry but I can't revert it just because it breaks an optimization which is not even enabled by default. I can take a look at the issue and see if Z compression is fixable.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#12 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #12 from Pavel Ondračka <[email protected]> 2012-01-05 15:54:31 PST --- (In reply to comment #11)

Quoted 4 lines

The problematic commit fixes occlusion queries for some cases, so I'm sorry but I can't revert it just because it breaks an optimization which is not even enabled by default. I can take a look at the issue and see if Z compression is fixable.

OK, I see revert is not an option. It still would be nice if this could be fixed, but it's not a priority.

BTW I did quick check of r300g bugs and did find only three about HyperZ including this one. This doesn't seems like a large number but it may be only a lack of testing. Is there a possibility to enable just some features on some generations? For example there are no bug reports about hiz on r500 cards... I could do more testing if needed, maybe some piglit runs.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#13 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #13 from Marek Olšák <[email protected]> 2012-01-05 16:03:28 UTC --- I am sure bug 35095 also affects r500.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#14 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #14 from Marek Olšák <[email protected]> 2012-01-05 16:18:14 PST --- Well maybe not, I am not sure.

I recall there was another bug with HiZ, which could be triggered by changing the depth function. The workaround was to flush the zbuffer cache when the depth function was changed. However flushing the cache is a very costly operation, so it wasn't even an option.

I just gave up after that, because it made no ******* sense. Zbuffer cache should have nothing to with HiZ.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#15 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

Marek Olšák <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #15 from Marek Olšák <[email protected]> ---
I reverted the commit and I also fixed the bug with Lightsmark. So far everything seems to work. Maybe it's time to enable HyperZ by default?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#16 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #16 from [email protected] ---
Is it enabled by default now?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#17 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #17 from Pavel Ondračka <[email protected]> --- (In reply to cosiekvfj from comment #16)

Quoted 1 line

Is it enabled by default now?

IIRC the HyperZ should be enabled by default on r500 but was never enabled on r300 and r400 due to lack of testing.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#18 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #18 from [email protected] ---
Created attachment 129931
--> https://bugs.freedesktop.org/attachment.cgi?id=129931&action=edit
piglit w/o hyperz

I'm testing mesa with patch for this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=98869
And also dri3 is related to: https://bugs.freedesktop.org/show_bug.cgi?id=99970

Test results:
dri3 w/o patch 890 fps
dri3 w/o patch 1113 fps hyperz=1 dri3 patch 912 fps
dri3 patch 1115 hyperz=1 dri2 w/o patch 1136
dri2 w/o patch 1417 hyperz=1 dri2 patch 1138
dri2 patch 1417 hyperz=1

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#19 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #19 from [email protected] ---
Created attachment 129952
--> https://bugs.freedesktop.org/attachment.cgi?id=129952&action=edit
piglit hyperz

Above results are from glxgears.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#20 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #20 from [email protected] ---
Is there anything else needed?
If you want more tests or you want me to redo previous tests or if you are unsure about results, I'm happy to help.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#21 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #21 from [email protected] ---
Created attachment 130162
--> https://bugs.freedesktop.org/attachment.cgi?id=130162&action=edit
mesa 17.0.1 kernel 4.10.1

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#22 lore raw

[Bug 37724] r300g with HyperZ/Z compression: occlusion queries are messed up in ut2004 (regression, bisected)

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=37724

--- Comment #22 from [email protected] ---
Created attachment 130163
--> https://bugs.freedesktop.org/attachment.cgi?id=130163&action=edit
mesa 17.0.1 kernel 4.10.1 hyperz on

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel