<div dir="ltr"><div>I've removed extra spaces in my function headers in this patch and those previous. As I continue to address comments on patches, I will try to remove any other extra spaces I see.<br><br></div>Thanks.<br><br>Laura<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 2, 2015 at 7:50 AM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br><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/30/2014 06:45 PM, Anuj Phogat wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Dec 16, 2014 at 6:52 AM, Laura Ekstrand <<a href="mailto:laura@jlekstrand.net" target="_blank">laura@jlekstrand.net</a>> 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 | 20 ++++++++++<br>
3 files changed, 68 insertions(+), 10 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 f54c3f8..0757b98 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>
@@ -75,6 +75,12 @@<br>
<param name="pixels" type="const GLvoid *" /><br>
</function><br>
<br>
+ <function name="TextureParameterf" offset="assign"><br>
+ <param name="texture" type="GLuint" /><br>
+ <param name="pname" type="GLenum" /><br>
+ <param name="param" type="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 6121346..cd1a094 100644<br>
--- a/src/mesa/main/texparam.c<br>
+++ b/src/mesa/main/texparam.c<br>
@@ -758,16 +758,12 @@ invalid_enum:<br>
}<br>
<br>
<br>
-void GLAPIENTRY<br>
-_mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)<br>
+void<br>
+_mesa_texture_parameterf(<u></u>struct gl_context *ctx,<br>
+ struct gl_texture_object *texObj,<br>
+ GLenum pname, GLfloat param, 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>
@@ -795,16 +791,24 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)<br>
((param < INT_MIN) ? INT_MIN : (GLint) (param - 0.5));<br>
<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_BORDER_COLOR:<br>
+ case GL_TEXTURE_SWIZZLE_RGBA:<br>
+ {<br>
+ _mesa_error(ctx, GL_INVALID_ENUM,<br>
+ "glTex%sParameterf(non-scalar pname)",<br>
+ dsa ? "ture" : "");<br>
+ return;<br>
+ }<br>
default:<br>
{<br>
/* this will generate an error if pname is illegal */<br>
GLfloat p[4];<br>
p[0] = param;<br>
p[1] = p[2] = p[3] = 0.0F;<br>
- need_update = set_tex_parameterf(ctx, texObj, pname, p, false);<br>
+ need_update = set_tex_parameterf(ctx, texObj, pname, p, dsa);<br>
}<br>
}<br>
<br>
@@ -985,6 +989,19 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)<br>
}<br>
<br>
<br>
+void GLAPIENTRY<br>
+_mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)<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_parameterf(ctx, texObj, pname, param, 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>
@@ -1042,6 +1059,21 @@ _mesa_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)<br>
/* XXX no driver hook for TexParameterIuiv() yet */<br>
}<br>
<br>
+void GLAPIENTRY<br>
+_mesa_TextureParameterf( GLuint texture, GLenum pname, GLfloat param )<br>
</blockquote>
Mesa don't use whitespace after opening (and before closing) function braces.<br>
Other patches in this series also use such whitespaces.<br>
</blockquote>
<br></div></div>
Many years ago I did put spaces there so that style is still found in the older code. But nowadays we omit the spaces.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Brian<br>
<br>
</font></span></blockquote></div><br></div>