On 12/10/2013 09:42 AM, Francisco Jerez wrote:
Brian Paul <bri...@vmware.com> writes:

On 12/07/2013 06:17 PM, Francisco Jerez wrote:
[...]
+   default:
+      unreachable();

I think I'd like to see an assertion or _mesa_problem() call to catch
unhandled cases if new texture targets are added in the future.


How about having the unreachable() macro print out an error and abort if
it's ever reached?  See the attached patch.

OK, but wouldn't a simple assert suffice?



+   }
+}
+
+
+/**
+ * Return the number of layers present in the given level of an array,
+ * cubemap or 3D texture.  If the texture is not layered return zero.
+ */
+GLuint
+_mesa_get_texture_layers(struct gl_texture_object *texObj, GLint level)

The pointer could be const-qualifed and level could be GLuint.


I made level a signed integer deriberately, because texture levels seem
to be declared as GLint everywhere else.

OK.

-Brian


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

Reply via email to