[Piglit] [PATCH 2/9] all.py: Use the same MSAA_SAMPLE_COUNTS idiom almost everywhere

Dylan Baker baker.dylan.c at gmail.com
Fri Nov 20 16:54:05 PST 2015


On Fri, Nov 20, 2015 at 03:21:23PM -0800, Ian Romanick wrote:
> On 11/20/2015 02:13 PM, Dylan Baker wrote:
> > On Thu, Nov 19, 2015 at 08:00:08PM -0800, Ian Romanick wrote:
> >> From: Ian Romanick <ian.d.romanick at intel.com>
> >>
> >> I could not figure out how to get
> >>
> >>     for sample_count in (str(x) for x in MSAA_SAMPLE_COUNTS):
> >>
> >> to work with the (0,) + MSAA_SAMPLE_COUNTS places.
> > 
> > I think it actually makes sense to just convert MSAA_SAMPLE_COUNTS to
> > strings instead of ints. I just looked through all.py and can't find a
> > single use of MSAA_SAMPLE_COUNTS as an int, it's cast to str in every
> > case.
> 
> There is one case. :(  add_fbo_depthstencil_tests expects its
> num_samples parameter to be an int because it will compare it with zero.
>  One of the callers of add_fbo_depthstencil_tests uses MSAA_SAMPLE_COUNTS.
> 

Easy enough to call int() in that one case, rather than str() in every
other case though. :shrug:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151120/bedc6bdf/attachment.sig>


More information about the Piglit mailing list