I agree that if a texture was created as GL_TEXTURE_RECTANGLE, meaning that all shaders use the TGSI_TEXTURE_RECT sampler type, it makes sense to use unnormalized coordinates. However if a texture is NPOT as in OpenGL, meaning that all shaders use the TGSI_TEXTURE_2D sampler type, we shouldn&#39;t force unnormalized texture coordinates everywhere and trade effectivity and simplicity of one driver (nvfx/nv30) at the expense of another (r300). Also I don&#39;t like changing pipe_resource::flags after a texture is created.<br>


<br>Some time ago I think Brian suggested to add PIPE_TEXTURE_RECT as another texture type and make it match the meaning of GL_TEXTURE_RECTANGLE. We would do this change but we had no time back then. This seems to be the solution that would work best for everybody.<br>


<br>-Marek<br>
<br><div class="gmail_quote">On Wed, Aug 11, 2010 at 6:27 PM, Luca Barbieri <span dir="ltr">&lt;<a href="mailto:luca@luca-barbieri.com" target="_blank">luca@luca-barbieri.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



<div>&gt; I am not sure if the following is legal, but I think we will just mask this<br>
&gt; unnormalized flag out in resource_create, because r300 doesn&#39;t like (read:<br>
&gt; doesn&#39;t support in hardware) unnormalized texture coordinates, and switching<br>
&gt; shaders just because of the flag is silly.<br>
<br>
</div>Hmm I thought it support GL_TEXTURE_RECTANGLE natively.<br>
<br>
This is making me think that my patchset is wrong in having<br>
blitter/blit set the flag themselves on NPOT textures.<br>
<br>
It might even be a good idea to split it in two flags, one for state<br>
tracker-&gt;driver communication, and another for the driver-&gt;state<br>
tracker.<br>
This way, r300g won&#39;t have to do anything.<br>
<br>
Not sure on how to call the flags though, since the current name is<br>
already too long.<br>
</blockquote></div><br>