On 03/31/2014 02:04 AM, Iago Toral Quiroga wrote:
Currently, we raise an error when doing this which breaks a conformance test
from the OpenGL samples pack. Even if this is a bit silly it is not an error.

 From 
https://urldefense.proofpoint.com/v1/url?u=http://www.opengl.org/wiki/Rectangle_Texture:&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=9VmTtCnJCAzB8sf7vr%2FcmnyolzG2PfcshaM2f3%2BhLK4%3D%0A&s=86ad96c8d9a940b8cf878d1a4dc902dd825da505c6f5f3c5c9df1d4cd919a408

"Rectangle textures contain exactly one image; they cannot have mipmaps.
Therefore, any texture parameters that depend on LODs are irrelevant when used
with rectangle textures; attempting to set these parameters to any value other
than 0 will result in an error."

Bugzilla: 
https://urldefense.proofpoint.com/v1/url?u=https://bugs.freedesktop.org/show_bug.cgi?id%3D76496&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=9VmTtCnJCAzB8sf7vr%2FcmnyolzG2PfcshaM2f3%2BhLK4%3D%0A&s=27d250e33673dedc00ab15e5c382135437d0fe6eacd562ebc52facc8500aca99
---
  src/mesa/main/texparam.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index bfb2e1b..40790ff 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -352,7 +352,8 @@ set_tex_parameteri(struct gl_context *ctx,
        if (texObj->MaxLevel == params[0])
           return GL_FALSE;

-      if (params[0] < 0 || texObj->Target == GL_TEXTURE_RECTANGLE_ARB) {
+      if (params[0] < 0 ||
+          (texObj->Target == GL_TEXTURE_RECTANGLE_ARB && params[0] > 0)) {
           _mesa_error(ctx, GL_INVALID_VALUE,
                       "glTexParameter(param=%d)", params[0]);
           return GL_FALSE;


Reviewed-by: Brian Paul <bri...@vmware.com>

I can commit/push this for you.

-Brian

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to