<div dir="ltr">If we're going to make a utility function declared in glformats.h, let's move the function body to glformats.c.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 6, 2014 at 4:57 PM, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Cc: <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
---<br>
src/mesa/main/glformats.h | 3 +++<br>
src/mesa/main/teximage.c | 12 ++++++------<br>
2 files changed, 9 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/src/mesa/main/glformats.h b/src/mesa/main/glformats.h<br>
index af10899..5c3b2e3 100644<br>
--- a/src/mesa/main/glformats.h<br>
+++ b/src/mesa/main/glformats.h<br>
@@ -125,6 +125,9 @@ extern GLenum<br>
_mesa_es3_error_check_format_and_type(GLenum format, GLenum type,<br>
GLenum internalFormat);<br>
<br>
+extern GLboolean<br>
+_mesa_target_can_be_compressed(const struct gl_context *ctx, GLenum target,<br>
+ GLenum intFormat);<br>
<br>
#ifdef __cplusplus<br>
}<br>
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
index 845ba80..b8627a3 100644<br>
--- a/src/mesa/main/teximage.c<br>
+++ b/src/mesa/main/teximage.c<br>
@@ -1779,9 +1779,9 @@ compressedteximage_only_format(const struct gl_context *ctx, GLenum format)<br>
* Helper function to determine whether a target and specific compression<br>
* format are supported.<br>
*/<br>
-static GLboolean<br>
-target_can_be_compressed(const struct gl_context *ctx, GLenum target,<br>
- GLenum intFormat)<br>
+GLboolean<br>
+_mesa_target_can_be_compressed(const struct gl_context *ctx, GLenum target,<br>
+ GLenum intFormat)<br>
{<br>
(void) intFormat; /* not used yet */<br>
<br>
@@ -2204,7 +2204,7 @@ texture_error_check( struct gl_context *ctx,<br>
<br>
/* additional checks for compressed textures */<br>
if (_mesa_is_compressed_format(ctx, internalFormat)) {<br>
- if (!target_can_be_compressed(ctx, target, internalFormat)) {<br>
+ if (!_mesa_target_can_be_compressed(ctx, target, internalFormat)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glTexImage%dD(target can't be compressed)", dimensions);<br>
return GL_TRUE;<br>
@@ -2260,7 +2260,7 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,<br>
GLenum error = GL_NO_ERROR;<br>
char *reason = ""; /* no error */<br>
<br>
- if (!target_can_be_compressed(ctx, target, internalFormat)) {<br>
+ if (!_mesa_target_can_be_compressed(ctx, target, internalFormat)) {<br>
reason = "target";<br>
error = GL_INVALID_ENUM;<br>
goto error;<br>
@@ -2694,7 +2694,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,<br>
}<br>
<br>
if (_mesa_is_compressed_format(ctx, internalFormat)) {<br>
- if (!target_can_be_compressed(ctx, target, internalFormat)) {<br>
+ if (!_mesa_target_can_be_compressed(ctx, target, internalFormat)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glCopyTexImage%dD(target)", dimensions);<br>
return GL_TRUE;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>