On 07.06.2008 23:34, Tomas Carnecky wrote:
> Brian Paul wrote:
>> Eric Anholt wrote:
>>> On Fri, 2008-06-06 at 09:45 +0200, Tomas Carnecky wrote:
>>>> Some fragment shaders don't work right on i965. For example if I enable 
>>>> the 'neg' compiz plugin, all windows turn gray. And I tried my own 
>>>> plugin that does: MOV output.r, 1.0; and all windows turned red (or was 
>>>> it gray also? I don't remember...). I was told it's an issue in Mesa 
>>>> rather then the drivers. But I couldn't find any bug report describing 
>>>> that problem (not under mesa nor the xorg intel driver). Do you want me 
>>>> to open a new bug?
>>>> If you tell me where in mesa the bug could be, I'll try to look into it 
>>>> myself (as time permits). I really need shaders. Even thought these work 
>>>> fine on my desktop (nvidia blob), I'd like to be able to hack when on my 
>>>> laptop.
>>> We're always interested in short samples of code that fails on our
>>> driver.  Unfortunately, "configure compiz and enable a magic set of
>>> plugins" is kind of a high barrier to entry for bugfixing, and thus less
>>> likely to be poked at in one's spare time.
>> Yup.
>>
>> Above, Tomas wrote:  "And I tried my own plugin that does: MOV output.r, 
>> 1.0; and all windows turned red (or was it gray also? I don't remember...)"
>>
>> If all your fragment shader does is MOV output.r, 1.0; you're saying the 
>> output color's R channel will be 1.0 and the GBA channels will be 
>> undefined/random.  I wouldn't blame Mesa or the driver if you wound up 
>> with a red window.
> 
> I'm sorry, turns out I have a different problem. I need to create a 
> plugin for compiz that uses shaders and I was experimenting and trying 
> to figure out how compiz works. Compiz doesn't have any API 
> documentation, not even comments in the code. It's a nightmare.
> 
> Anyway, I brought it down to this: When I bind a texture to 
> GL_TEXTURE_RECTANGLE_ARB and then use the following fragment program code:
> 
> TEX tu, fragment.texcoords[0], texture[0], RECT
> 
> then I have to supply normalized texture coordinates (ie. in the range 
> [0 .. 1]). As far as I understand the ARB_texture_rectangle spec, when 
> the texture is bound to the RECTANGLE target then the coordinates should 
> be non-normalized.
Yes you're right. Same behaviour as when using fixed function pipeline.

> I even have a small application that demonstrates the problem. If this 
> is a new bug to you, should I open a bug and attach the app to it?
> 
> tom

I think the attached patch (against mesa master) should fix this
problem. I'll commit it if it actually works :-).

Roland

Attachment: i965_fixtexop.diff
Description: application/mbox

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to