Bug 50230 - offset mapping in nexuiz results in bad texturing with the llvm compiler
Summary: offset mapping in nexuiz results in bad texturing with the llvm compiler
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 12:48 UTC by almos
Modified: 2012-05-25 10:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
[PATCH] Revert "r600g: set round_mode to truncate and get rid of tgsi_f2i on evergreen" (5.32 KB, patch)
2012-05-22 22:58 UTC, Vadim Girlin
Details | Splinter Review
nexuiz problem.jpg (641.03 KB, image/jpeg)
2012-05-23 04:05 UTC, almos
Details
nexuiz settings.jpg (231.41 KB, image/jpeg)
2012-05-23 04:12 UTC, almos
Details
nexuiz_stderr.txt.gz (309.97 KB, application/gzip)
2012-05-23 08:54 UTC, almos
Details
[PATCH] radeon/llvm: fix sampler index in llvm_emit_tex (1.29 KB, patch)
2012-05-24 07:38 UTC, Vadim Girlin
Details | Splinter Review

Description almos 2012-05-22 12:48:06 UTC
tested with nexuiz 2.5.2 and mesa 7a75e7d6e85d27e102ff7e15583c33b1ce282fe4
Comment 1 Vadim Girlin 2012-05-22 22:58:23 UTC
Created attachment 61997 [details] [review]
[PATCH] Revert "r600g: set round_mode to truncate and get rid of  tgsi_f2i on evergreen"

I see some regression with both compilers. Have you tested it with non-llvm compiler? IIRC you are using BARTS card?

It seems the issue is triggered by the combination of commits:

60bf0f05 "r600g: set round_mode to truncate and get rid of tgsi_f2i on evergreen"  and 
04e32400 "gallium: remove PIPE_SHADER_CAP_OUTPUT_READ".

Reverting any of them fixes the problem for me, I'll try to figure out what exactly is going wrong. You might want to test the attached patch (reverts first commit).
Comment 2 Vadim Girlin 2012-05-22 23:42:10 UTC
In fact it seems the problem is with the first commit, second just made it much more noticeable.
Comment 3 almos 2012-05-23 01:49:30 UTC
I only see this with the LLVM compiler, the old one seems fine. There is a texture flickering on some surfaces, but that affects both of them (I use the level Q1DM6 for testing).

Yes, I use a BARTS card (HD6850).
Comment 4 Vadim Girlin 2012-05-23 02:37:16 UTC
(In reply to comment #3)
> I only see this with the LLVM compiler, the old one seems fine. There is a
> texture flickering on some surfaces, but that affects both of them (I use the
> level Q1DM6 for testing).

That flickering is the issue I was talking about. The patch attached earlier should help with it.

I don't see anything wrong with both compilers after applying the patch. If there is another issue and the patch doesn't fix it, could you provide some screenshots and hints how to reproduce it? 

> 
> Yes, I use a BARTS card (HD6850).
Comment 5 almos 2012-05-23 04:05:49 UTC
Created attachment 62012 [details]
nexuiz problem.jpg

Attaching screenshot of the problem.
Comment 6 almos 2012-05-23 04:12:41 UTC
Created attachment 62013 [details]
nexuiz settings.jpg

These are the settings I use. Basicaly everything is enabled. On the video tab gl2 shaders and occlusion queries are enabled, vbos for vertices and triangles and texture compression is set to good.

If I disable offset mapping, texturing returns to normal. Relief mapping is indifferent, and so are all the other settings.
Comment 7 Vadim Girlin 2012-05-23 08:22:16 UTC
I can't reproduce it neither with latest mesa, nor with 7a75e7d6. 

Do you have any errors in dmesg? You might want to try latest mesa, kernel, etc. Also you might want to try debug build of the mesa (with --enable-debug) to see if there are any errors/asserts.

If it doesn't help, please attach the shader dump (output with "R600_DUMP_SHADERS=1" env var).
Comment 8 almos 2012-05-23 08:54:18 UTC
Created attachment 62020 [details]
nexuiz_stderr.txt.gz

(In reply to comment #7)
> I can't reproduce it neither with latest mesa, nor with 7a75e7d6. 
> 
> Do you have any errors in dmesg? You might want to try latest mesa, kernel,
> etc. Also you might want to try debug build of the mesa (with --enable-debug)
> to see if there are any errors/asserts.
I'm using kernel 3.3.1 with the tiling patches from J. Glisse. I'll try 3.4 later. I always compile with enable-debug, but there are no errors printed. There is nothing in dmesg either.

> 
> If it doesn't help, please attach the shader dump (output with
> "R600_DUMP_SHADERS=1" env var).
Attaching stderr. I just started the game, loaded Q1DM3, and exited.
Comment 9 Vadim Girlin 2012-05-24 07:38:10 UTC
Created attachment 62057 [details] [review]
[PATCH] radeon/llvm: fix sampler index in llvm_emit_tex

Does this patch help?
Comment 10 almos 2012-05-24 13:25:32 UTC
(In reply to comment #9)
> Created attachment 62057 [details] [review] [review]
> [PATCH] radeon/llvm: fix sampler index in llvm_emit_tex
> 
> Does this patch help?
Yes, the patch fixes it. I also tried the revert patch, and that fixes the lightmap flickering.
Comment 11 almos 2012-05-25 10:54:31 UTC
I see the fixes were pushed to mesa master. Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.