New: Regression in r300g
https://bugs.freedesktop.org/show_bug.cgi?id=30007
Summary: Regression in r300g
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/r300
AssignedTo: [email protected]
ReportedBy: [email protected]
I updated mesa from git and the blur effect in kwin does not work anymore. I'm on gentoo linux using gallium on an ATI radeon mobility X700 with the gallium r300g driver.
The effect used to work; unfortunately I cannot tell which commit was fine with it.
Now instead than the blurred region I get a black area behind the transparency.
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.
[Bug 30007] Regression in r300g
https://bugs.freedesktop.org/show_bug.cgi?id=30007
Matt Turner <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |NEEDINFO
Component|Drivers/DRI/r300 |Drivers/Gallium/r300--- Comment #1 from Matt Turner <[email protected]> 2010-09-10 15:08:49 PDT --- If this is still a bug, you're going to have to provide more info than "it doesn't work anymore."
git bisect it. If you, for some reason, cannot do this, at least something like "it worked August 24 and stopped working September 3."
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #2 from davide <[email protected]> 2010-09-11 06:12:49 PDT --- Excuse me for not providing enough information in the first place.. I now made some tests and I am sure that the blur effect works with commit e01a49af61a4d56800b1ad672959ba7a88c1da1e (Aug. 14th)..
I suspect that the regression is due to the introduction of the new compiler, which (I think) was merged around the 17th or 18th of August..
Is this of any help?
(In reply to comment #1)
Quoted 5 lines
If this is still a bug, you're going to have to provide more info than "it doesn't work anymore."
git bisect it. If you, for some reason, cannot do this, at least something like "it worked August 24 and stopped working September 3."
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #3 from Marek Olšák <[email protected]> 2010-09-11 08:52:26 PDT --- A black area? It looks like a shader fail to compile. The driver always prints some info to stderr if anything goes wrong.
Can you somehow get the stderr output?
Also, is there anything in dmesg?
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #4 from davide <[email protected]> 2010-09-11 10:30:26 PDT --- Created an attachment (id=38627)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38627)
dmesg log
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #5 from davide <[email protected]> 2010-09-11 10:30:51 PDT --- I attached my dmesg..
I'm trying to figure out how to get the stderr output..
(In reply to comment #3)
Quoted 6 lines
A black area? It looks like a shader fail to compile. The driver always prints some info to stderr if anything goes wrong.
Can you somehow get the stderr output?
Also, is there anything in dmesg?
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Matt Turner <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #38627|application/octet-stream |text/plain
mime type| |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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #6 from davide <[email protected]> 2010-09-11 14:04:11 PDT --- I don't seem to be able to find a way to retrieve the stderr from the driver.. I'm on gentoo linux with mesa, libdrm and xf86-video-ati from git and xorg-server-1.9..
Can anybody suggest me how to retrieve that data so that I will be able to post it here?
(In reply to comment #5)
Quoted 10 lines
I attached my dmesg..
I'm trying to figure out how to get the stderr output..(In reply to comment #3)
Quoted 6 lines
A black area? It looks like a shader fail to compile. The driver always prints some info to stderr if anything goes wrong.
Can you somehow get the stderr output?
Also, is there anything in dmesg?
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #7 from Matt Turner <[email protected]> 2010-09-11 14:18:55 PDT --- He means stderr from the program causing the problem. I don't know how you run kwin (I don't use kde), to get catch stderr output you generally want to run it from the terminal with something like program-causing-problems &> ~/stderr.output.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #8 from davide <[email protected]> 2010-09-11 14:27:05 PDT --- Ok, here is something that probably confirms the fact that there is a problem with a shader - it is form kwin's stderr:
r300 FP: Compiler Error:
Fragment program does not support relative addressing of source operands. Using a dummy shader instead.
(In reply to comment #7)
Quoted 4 lines
He means stderr from the program causing the problem. I don't know how you run kwin (I don't use kde), to get catch stderr output you generally want to run it from the terminal with something like
program-causing-problems &> ~/stderr.output.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #9 from Marek Olšák <[email protected]> 2010-09-11 14:34:19 PDT --- Thanks. I am pretty sure the GLSL compiler fails to unroll a loop.
Also can you try recent Mesa git? IIRC the loop unrolling for the new compiler was merged on the 3rd September.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #10 from davide <[email protected]> 2010-09-11 14:37:00 PDT --- Actually, I'm using mesa compiled from git yesterday evening..
(In reply to comment #9)
Quoted 4 lines
Thanks. I am pretty sure the GLSL compiler fails to unroll a loop.
Also can you try recent Mesa git? IIRC the loop unrolling for the new compiler was merged on the 3rd September.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #11 from Tom Stellard <[email protected]> 2010-09-11 14:56:22 PDT --- Can your run kwin with the environment variable RADEON_DEBUG=fp and post the stderr output.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #12 from Marek Olšák <[email protected]> 2010-09-11 15:00:11 PDT --- Tom, I don't think we handle relative addressing when unrolling loops.
An alternative solution on ML:
http://lists.freedesktop.org/archives/mesa-dev/2010-September/002896.html
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|NEEDINFO |
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #13 from davide <[email protected]> 2010-09-11 16:41:27 PDT --- I'm attaching it right now..
Marek - I tried to apply that patch by modifying the mesa-9999 ebuild, but patching failes..
(In reply to comment #11)
Quoted 2 lines
Can your run kwin with the environment variable RADEON_DEBUG=fp and post the stderr output.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #14 from davide <[email protected]> 2010-09-11 16:42:06 PDT --- Created an attachment (id=38634)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38634)
kwin stderr with RADEON_DEBUG=fp
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #15 from Marek Olšák <[email protected]> 2010-09-11 17:24:36 PDT --- Yeah you probably need the other patches as well. It was actually the 10th patch in the series. Some of them have been committed, the others have not. I'm gonna wait until all of them are pushed to master.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #16 from davide <[email protected]> 2010-09-11 17:26:38 PDT --- Ah, ok..
If you could quickly figure out which patches are still to be committed and post them here, I could try if this solves the bug.
If that's too complicated, just let me know when they are merged, so I can give you feedback.
(In reply to comment #15)
Quoted 3 lines
Yeah you probably need the other patches as well. It was actually the 10th patch in the series. Some of them have been committed, the others have not. I'm gonna wait until all of them are pushed to master.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Matt Turner <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #38634|application/octet-stream |text/plain
mime type| |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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #17 from Fredrik Höglund <[email protected]> 2010-09-12 13:18:06 PDT --- Created an attachment (id=38652)
--> (https://bugs.freedesktop.org/attachment.cgi?id=38652)
Piglit test for the kwin blur shader
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Fredrik Höglund <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #18 from Fredrik Höglund <[email protected]> 2010-09-12 13:24:56 PDT --- (In reply to comment #9)
Quoted 1 line
Thanks. I am pretty sure the GLSL compiler fails to unroll a loop.
I think the shader that failed to compile is a different shader that we use for scaling textures for the taskbar thumbnails. The blur shader doesn't use loops.
But I have attached a piglit test that I hope can be used to reproduce the bug.
I don't have an R300, but the blur shader works for me with R600C and the new GLSL compiler. The piglit test fails with R600G, but not with the symptoms described in this bug report.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #19 from davide <[email protected]> 2010-09-12 13:38:28 PDT --- In fact I have the black thumbnails issue too; should I open a new bug for that?
Should I just recompile mesa with your patch and report what happens?
(In reply to comment #18)
Quoted 11 lines
(In reply to comment #9)
Quoted 1 line
Thanks. I am pretty sure the GLSL compiler fails to unroll a loop.
I think the shader that failed to compile is a different shader that we use for scaling textures for the taskbar thumbnails. The blur shader doesn't use loops.
But I have attached a piglit test that I hope can be used to reproduce the bug.
I don't have an R300, but the blur shader works for me with R600C and the new GLSL compiler. The piglit test fails with R600G, but not with the symptoms described in this bug report.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #20 from Marek Olšák <[email protected]> 2010-09-12 14:45:29 PDT --- (In reply to comment #18)
Quoted 11 lines
(In reply to comment #9)
Quoted 1 line
Thanks. I am pretty sure the GLSL compiler fails to unroll a loop.
I think the shader that failed to compile is a different shader that we use for scaling textures for the taskbar thumbnails. The blur shader doesn't use loops.
But I have attached a piglit test that I hope can be used to reproduce the bug.
I don't have an R300, but the blur shader works for me with R600C and the new GLSL compiler. The piglit test fails with R600G, but not with the symptoms described in this bug report.
Why would you use relative addressing (= indirect indexing) in the fragment shader then? If it's not indexing with a loop counter (my assumption), what is 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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #21 from Fredrik Höglund <[email protected]> 2010-09-12 15:51:45 PDT --- (In reply to comment #20)
Quoted 3 lines
Why would you use relative addressing (= indirect indexing) in the fragment shader then? If it's not indexing with a loop counter (my assumption), what is it?
The shader used for scaling the thumbnails is indeed indexing with a loop counter. That shader looks like this:
uniform sampler2D texUnit;
uniform vec2 offsets[25];
uniform vec4 kernel[25];
uniform int kernelSize;
void main(void)
{
vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0];
for (int i = 1; i < kernelSize; i++) {
sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) * kernel[i];
sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) * kernel[i];
}
gl_FragColor = sum;
}That's why I think it's this shader that failed to compile. But this is not the shader that's used by the blur effect (which this bug report was about). So I believe we're looking at two separate issues here.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #22 from davide <[email protected]> 2010-09-12 15:55:58 PDT --- Yes, for sure there are two separate issues: the black thumbnails (for which Fredrick seems to have identified the problem) and the blur issue I reported (for which, as far as I understood, it is not clear by what it is caused). Just let me know if I can do any test or something to help you track the source of the bug.
(In reply to comment #21)
Quoted 26 lines
(In reply to comment #20)
Quoted 3 lines
Why would you use relative addressing (= indirect indexing) in the fragment shader then? If it's not indexing with a loop counter (my assumption), what is it?
The shader used for scaling the thumbnails is indeed indexing with a loop counter. That shader looks like this:
uniform sampler2D texUnit;
uniform vec2 offsets[25];
uniform vec4 kernel[25];
uniform int kernelSize;void main(void)
{ vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0]; for (int i = 1; i < kernelSize; i++) { sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) * kernel[i]; sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) * kernel[i]; } gl_FragColor = sum; }That's why I think it's this shader that failed to compile. But this is not the shader that's used by the blur effect (which this bug report was about). So I believe we're looking at two separate issues here.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #23 from Tom Stellard <[email protected]> 2010-09-12 19:42:14 PDT --- I've created a new bug for kwin blur effect:
https://bugs.freedesktop.org/show_bug.cgi?id=30152
(In reply to comment #21)
Quoted 19 lines
The shader used for scaling the thumbnails is indeed indexing with a loop counter. That shader looks like this:
uniform sampler2D texUnit;
uniform vec2 offsets[25];
uniform vec4 kernel[25];
uniform int kernelSize;void main(void)
{ vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0]; for (int i = 1; i < kernelSize; i++) { sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) * kernel[i]; sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) * kernel[i]; } gl_FragColor = sum; }
Quoted 3 lines
That's why I think it's this shader that failed to compile. But this is not the shader that's used by the blur effect (which this bug report was about). So I believe we're looking at two separate issues here.
The r500 should be able to execute this, but there are two things that are currently preventing correct executions:
1. Relative addressing in loops is not yet supported.
2. The frontend declares the variable "i" as a regular constant and not an immediate, so the r300 compiler has no idea what its initial value is, or what is incremented by, so even with relative addressing in loops, this would still fail
Does kernelSize have to be a uniform? If it is always the same then adding it as a constant would allow the loop to be unrolled which would get around both of the above issue. Even something like this would be better:
uniform sampler2D texUnit;
uniform vec2 offsets[25];
uniform vec4 kernel[25];
uniform int kernelSize;
void main(void)
{
vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0];
for (int i = 1; i < 25; i++) {sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) * kernel[i];
sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) * kernel[i];
}
gl_FragColor = sum;
}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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #24 from Tom Stellard <[email protected]> 2010-09-12 19:46:10 PDT ---
Quoted 10 lines
uniform sampler2D texUnit;
uniform vec2 offsets[25];
uniform vec4 kernel[25];
uniform int kernelSize;void main(void)
{ vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0]; for (int i = 1; i < 25; i++) {
Quoted 5 lines
sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) * kernel[i];
sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) * kernel[i];
}
gl_FragColor = sum;
}Oops, I submitted before I was done. This shader would be better, because the loop could be unrolled even if kernelSize is different in each execution:
uniform sampler2D texUnit;
uniform vec2 offsets[25];
uniform vec4 kernel[25];
uniform int kernelSize;
void main(void)
{
vec4 sum = texture2D(texUnit, gl_TexCoord[0].st) * kernel[0];
for (int i = 1; i < 25; i++) {
if ( i < kernelSize) {
sum += texture2D(texUnit, gl_TexCoord[0].st - offsets[i]) *
kernel[i];
sum += texture2D(texUnit, gl_TexCoord[0].st + offsets[i]) *
kernel[i];
}
}
gl_FragColor = sum;
}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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #25 from Marek Olšák <[email protected]> 2010-09-12 21:37:52 PDT --- Fredrik, thanks for the feedback. I've pushed your patch to the piglit repository.
(In reply to comment #23)
Quoted 2 lines
The r500 should be able to execute this, but there are two things that are currently preventing correct executions
However the reporter has r400, so the hardware just cannot do it. I am nearly sure fglrx would fall back to software, which is not particularly useful for us. Specifying kernelSize at compile time should be enough for the compiler to unroll the loop.
(In reply to comment #24)
Quoted 2 lines
Oops, I submitted before I was done. This shader would be better, because the loop could be unrolled even if kernelSize is different in each execution:
Yeah, the shader could work provided the instruction scheduler generates no more than 4 TEX indirections. I'd personally lean towards making kernelSize a compile-time constant. So instead of calling glUniform1f(kernelSize, i), let's call glUseProgram(shader[i]);
Fredrik, please, would it be hard to implement this in kwin?
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #26 from Marek Olšák <[email protected]> 2010-09-12 21:44:05 PDT --- Another option for kwin would be using the shader only on GL3-capable hardware, because lots of GL2 hardware don't support indirect indexing.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #27 from Niels Ole Salscheider <[email protected]> 2010-09-13 15:15:32 PDT --- Are you sure that we have to change kwin?
For me, blur worked just fine on rv410 when using the old glsl compiler - it stopped working right after the merge of the new compiler.
Because of that, I wonder if it might just be a software (glsl2) issue. Or was there some sort of software fallback in the old compiler that is not available in the new one?
Concerning the thumbnail issue: I think that thumbnails used to work with kernel 2.6.34 and stopped working when I updated to 2.6.35 (some time before the compiler merge). Was there any feature added to 2.6.35 that could cause this issue?
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #28 from Fredrik Höglund <[email protected]> 2010-09-13 16:39:13 PDT --- (In reply to comment #25)
Quoted 2 lines
Fredrik, thanks for the feedback. I've pushed your patch to the piglit repository.
Thanks.
Quoted 10 lines
(In reply to comment #24)
Quoted 2 lines
Oops, I submitted before I was done. This shader would be better, because the loop could be unrolled even if kernelSize is different in each execution:
Yeah, the shader could work provided the instruction scheduler generates no more than 4 TEX indirections. I'd personally lean towards making kernelSize a compile-time constant. So instead of calling
glUniform1f(kernelSize, i), let's callglUseProgram(shader[i]);Fredrik, please, would it be hard to implement this in kwin?
It shouldn't be too hard, and it's actually something I've been planning to do but never got around to before the KDE 4.5 release.
In the meantime I've committed a change that gets rid of the kernelSize uniform
and makes the loop always do a fixed number of iterations instead (with the
unused kernel weights set to zero).
The MESA_GLSL=dump output shows that the loop is being unrolled, so with a bit of luck the shader should be working now.
(In reply to comment #26)
Quoted 2 lines
Another option for kwin would be using the shader only on GL3-capable hardware, because lots of GL2 hardware don't support indirect indexing.
Working well with the Mesa drivers and the hardware our users are using is something I consider a high priority, so if we can make the shader work without indirect indexing then I think that's the preferred approach.
Thanks to you and Tom for all the suggestions.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #29 from Fredrik Höglund <[email protected]> 2010-09-13 17:05:55 PDT --- (In reply to comment #27)
Quoted 8 lines
Are you sure that we have to change kwin?
For me, blur worked just fine on rv410 when using the old glsl compiler - it stopped working right after the merge of the new compiler.
Because of that, I wonder if it might just be a software (glsl2) issue. Or was there some sort of software fallback in the old compiler that is not available in the new one?
Well this discussion is only about the thumbnail issue now. The discussion about the blur effect has been moved to bug 30152.
Quoted 4 lines
Concerning the thumbnail issue: I think that thumbnails used to work with kernel 2.6.34 and stopped working when I updated to 2.6.35 (some time before the compiler merge). Was there any feature added to 2.6.35 that could cause this issue?
The only thing I can think of is if for some reason kwin decided not to use the shader with 2.6.34. If the upgrade make additional GL extensions available it could explain why the problem didn't show up before.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #30 from davide <[email protected]> 2010-09-13 17:27:15 PDT --- Sorry for the stupid question, but is the thumbnail bug fixed with kde svn + the latest mesa git?
Will we get the fixes with kde-SC-4.5.2 and mesa-1.9?
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #31 from Fredrik Höglund <[email protected]> 2010-09-13 18:14:44 PDT --- (In reply to comment #30)
Quoted 3 lines
Sorry for the stupid question, but is the thumbnail bug fixed with kde svn + the latest mesa git?
Will we get the fixes with kde-SC-4.5.2 and mesa-1.9?
Well I can't test it, but the commit I was referring to will be in 4.5.2.
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
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #32 from davide <[email protected]> 2010-09-13 18:36:42 PDT --- Would you be able to post a patch with this commit for the 4.5.1 source? If you do so, I could test it and give you feedback..
If this is not feasible, then I'll wait for 4.5.2..
(In reply to comment #31)
Quoted 6 lines
(In reply to comment #30)
Quoted 3 lines
Sorry for the stupid question, but is the thumbnail bug fixed with kde svn + the latest mesa git?
Will we get the fixes with kde-SC-4.5.2 and mesa-1.9?Well I can't test it, but the commit I was referring to will be in 4.5.2.
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #33 from davide <[email protected]> 2010-09-26 06:04:50 PDT --- The black thumbnails bug is now fixed for me with kde sc-4.5.1 and the latest git mesa..
The blur effects keeps being broken though..
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #34 from davide <[email protected]> 2010-11-06 19:29:24 PDT --- Just to keep the bug up to date..
I got a new laptop with an integrated intel graphics card (core i5, using i965 classic driver) and the blur effect is broken exactly as it was with r300g (black background instead of blurred image).
Probably the bug is not in the driver but in kwin..
(In reply to comment #33)
Quoted 3 lines
The black thumbnails bug is now fixed for me with kde sc-4.5.1 and the latest git mesa..
The blur effects keeps being broken though..
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.
[Bug 30007] Regression in r300g
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
--- Comment #35 from Marek Olšák <[email protected]> 2010-11-12 04:33:58 PST --- (In reply to comment #8)
Quoted 3 lines
r300 FP: Compiler Error:
Fragment program does not support relative addressing of source operands. Using a dummy shader instead.
Relative addressing is supported since commitcbfdf262ccf8b573f1fa4c0065a8eb1fb87d93da.
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
[Bug 30007] [r300g] kwin blur effect broken
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Regression in r300g |[r300g] kwin blur effect
| |brokenSignature · 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
[Bug 30007] [r300g] kwin thumbnails broken
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[r300g] kwin blur effect |[r300g] kwin thumbnails
|broken |broken--- Comment #36 from Marek Olšák <[email protected]> 2010-12-14 11:24:46 PST --- Thumbnails don't work on r5xx because the r300 compiler fails to do any register allocation inside loops. Disabling the "register rename" pass may fix it.
davide, the thumbnails cannot work for you anyway because ATI X700 doesn't support loops. Not sure what's the current status in latest kwin, I am using kwin 4.5.1.
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
[Bug 30007] [r300g] kwin thumbnails broken
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #37 from Marek Olšák <[email protected]> 2010-12-17 04:30:14 PST --- *** Bug 29400 has been marked as a duplicate of this bug. ***
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
[Bug 30007] [r300g] kwin thumbnails broken
In reply to [email protected]https://bugs.freedesktop.org/show_bug.cgi?id=30007
Marek Olšák <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED--- Comment #38 from Marek Olšák <[email protected]> 2011-01-04 13:31:44 PST --- First some findings. The current implemention of thumbnails in kwin is strictly targeted for GL3 hardware and should not work on GL2 hardware. This simple fact can be seen from how the GLSL shader looks like and what features it uses (you might also notice that the shader cannot be even ported to DirectX 9 without a complete rewrite). However, the GLSL compiler in Mesa does something fglrx didn't do: it lowers indirect addressing to conditional moves, but the cost is such shaders end up being too long and therefore very slow. This is something KDE people should fix if they want to ever compete with the performance of other compositors. So far my impression from reading Kwin shaders isn't very good and their shaders really need a broader review before getting accepted unless Kwin is a toy project not suitable for every day use.
Commit 8543902bfbdfc15c39525bd99bee22e2f2126e74 fixes the Kwin thumbnails for R5xx GPUs, but we can't really do anything with the speed.
One way to address this and other well-known performance issues with Kwin is to refraing from using loops in GLSL shaders.
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