On Fri, 2016-06-10 at 16:42 -0700, Dylan Baker wrote:

[snip]

> +class Scalar(Container):
> +    """A base class for Scalar types."""
> +    def __init__(self, name, contains):
> +        super(Scalar, self).__init__(name, is_scalar=True,
> contains=contains)

I would be passing rows=1 and columns=1. In the end, this is correct
from my POV and avoids to have to be doing always (type.columns or 1)
in the rest of the code ...

> +class Vector(Container):
> +    """A base class for Vector Containers."""
> +    def __init__(self, name, rows, contains):
> +        assert isinstance(rows, int), 'rows must be an integer'
> +        assert rows in [2, 3, 4], 'vecs can only be 2-4 in GLSL'
> +
> +        super(Vector, self).__init__(name, is_vector=True,
> rows=rows,
> +                                     contains=contains)

I would be passing columns=1 for the same reason than above.

In any case, consider this a nit pick. You can ignore freely.

Other than that, this is:

Reviewed-by: Andres Gomez <[email protected]>
-- 
Br,

Andres


_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to