<div dir="ltr">No. I have a 78 column line highlight in my editor.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 16, 2014 at 7:46 AM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 12/15/2014 06:22 PM, Laura Ekstrand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
src/mapi/glapi/gen/ARB_direct_<u></u>state_access.xml | 6 +++<br>
src/mesa/main/texparam.c | 52 +++++++++++++++++++-------<br>
src/mesa/main/texparam.h | 8 ++++<br>
3 files changed, 53 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml b/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml<br>
index 0757b98..8279ad2 100644<br>
--- a/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml<br>
+++ b/src/mapi/glapi/gen/ARB_<u></u>direct_state_access.xml<br>
@@ -81,6 +81,12 @@<br>
<param name="param" type="GLfloat" /><br>
</function><br>
<br>
+ <function name="TextureParameterfv" offset="assign"><br>
+ <param name="texture" type="GLuint" /><br>
+ <param name="pname" type="GLenum" /><br>
+ <param name="param" type="const GLfloat *" /><br>
+ </function><br>
+<br>
<function name="BindTextureUnit" offset="assign"><br>
<param name="unit" type="GLuint" /><br>
<param name="texture" type="GLuint" /><br>
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c<br>
index cd1a094..b19e4f1 100644<br>
--- a/src/mesa/main/texparam.c<br>
+++ b/src/mesa/main/texparam.c<br>
@@ -818,17 +818,12 @@ _mesa_texture_parameterf(<u></u>struct gl_context *ctx,<br>
}<br>
<br>
<br>
-void GLAPIENTRY<br>
-_mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)<br>
+void<br>
+_mesa_texture_parameterfv( struct gl_context *ctx,<br>
+ struct gl_texture_object *texObj,<br>
+ GLenum pname, const GLfloat *params, bool dsa )<br>
{<br>
GLboolean need_update;<br>
- struct gl_texture_object *texObj;<br>
- GET_CURRENT_CONTEXT(ctx);<br>
-<br>
- texObj = get_texobj(ctx, target, GL_FALSE);<br>
- if (!texObj)<br>
- return;<br>
-<br>
switch (pname) {<br>
case GL_TEXTURE_MIN_FILTER:<br>
case GL_TEXTURE_MAG_FILTER:<br>
@@ -849,7 +844,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)<br>
GLint p[4];<br>
p[0] = (GLint) params[0];<br>
p[1] = p[2] = p[3] = 0;<br>
- need_update = set_tex_parameteri(ctx, texObj, pname, p, false);<br>
+ need_update = set_tex_parameteri(ctx, texObj, pname, p, dsa);<br>
}<br>
break;<br>
case GL_TEXTURE_CROP_RECT_OES:<br>
@@ -860,7 +855,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)<br>
iparams[1] = (GLint) params[1];<br>
iparams[2] = (GLint) params[2];<br>
iparams[3] = (GLint) params[3];<br>
- need_update = set_tex_parameteri(ctx, texObj, pname, iparams, false);<br>
+ need_update = set_tex_parameteri(ctx, texObj, pname, iparams, dsa);<br>
}<br>
break;<br>
case GL_TEXTURE_SWIZZLE_R_EXT:<br>
@@ -876,12 +871,12 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)<br>
p[2] = (GLint) params[2];<br>
p[3] = (GLint) params[3];<br>
}<br>
- need_update = set_tex_parameteri(ctx, texObj, pname, p, false);<br>
+ need_update = set_tex_parameteri(ctx, texObj, pname, p, dsa);<br>
}<br>
break;<br>
default:<br>
/* this will generate an error if pname is illegal */<br>
- need_update = set_tex_parameterf(ctx, texObj, pname, params, false);<br>
+ need_update = set_tex_parameterf(ctx, texObj, pname, params, dsa);<br>
}<br>
<br>
if (ctx->Driver.TexParameter && need_update) {<br>
@@ -1002,6 +997,19 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)<br>
_mesa_texture_parameterf(ctx, texObj, pname, param, false);<br>
}<br>
<br>
+void GLAPIENTRY<br>
+_mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)<br>
+{<br>
+ struct gl_texture_object *texObj;<br>
+ GET_CURRENT_CONTEXT(ctx);<br>
+<br>
+ texObj = get_texobj(ctx, target, GL_FALSE);<br>
+ if (!texObj)<br>
+ return;<br>
+<br>
+ _mesa_texture_parameterfv(ctx, texObj, pname, params, false);<br>
+}<br>
+<br>
/**<br>
* Set tex parameter to integer value(s). Primarily intended to set<br>
* integer-valued texture border color (for integer-valued textures).<br>
@@ -1059,6 +1067,24 @@ _mesa_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)<br>
/* XXX no driver hook for TexParameterIuiv() yet */<br>
}<br>
<br>
+<br>
+void GLAPIENTRY<br>
+_mesa_TextureParameterfv( GLuint texture, GLenum pname,<br>
+ const GLfloat *params )<br>
</blockquote>
<br></div></div>
Would the whole declaration fit on a 78-column line?<br>
<br>
Same thing for the next patch.<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+{<br>
+ struct gl_texture_object *texObj;<br>
+ GET_CURRENT_CONTEXT(ctx);<br>
+<br>
+ texObj = get_texobj_by_name(ctx, texture, GL_FALSE);<br>
+ if (!texObj) {<br>
+ /* User passed a non-generated name. */<br>
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glTextureParameterfv(texture)<u></u>");<br>
+ return;<br>
+ }<br>
+<br>
+ _mesa_texture_parameterfv(ctx, texObj, pname, params, true);<br>
+}<br>
+<br>
void GLAPIENTRY<br>
_mesa_TextureParameterf( GLuint texture, GLenum pname, GLfloat param )<br>
{<br>
diff --git a/src/mesa/main/texparam.h b/src/mesa/main/texparam.h<br>
index a138b56..1514f42 100644<br>
--- a/src/mesa/main/texparam.h<br>
+++ b/src/mesa/main/texparam.h<br>
@@ -39,6 +39,10 @@ _mesa_texture_parameterf( struct gl_context *ctx,<br>
struct gl_texture_object *texObj,<br>
GLenum pname, GLfloat param, bool dsa );<br>
<br>
+extern void<br>
+_mesa_texture_parameterfv( struct gl_context *ctx,<br>
+ struct gl_texture_object *texObj,<br>
+ GLenum pname, const GLfloat *params, bool dsa );<br>
/*@}*/<br>
<br>
/**<br>
@@ -88,8 +92,12 @@ _mesa_TexParameterIiv(GLenum target, GLenum pname, const GLint *params);<br>
extern void GLAPIENTRY<br>
_mesa_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params);<br>
<br>
+extern void GLAPIENTRY<br>
+_mesa_TextureParameterfv( GLuint texture, GLenum pname,<br>
+ const GLfloat *params );<br>
<br>
extern void GLAPIENTRY<br>
_mesa_TextureParameterf( GLuint texture, GLenum pname, GLfloat param );<br>
<br>
+<br>
#endif /* TEXPARAM_H */<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div></div>