On 15 January 2018 at 16:10, Gert Wollny <gw.foss...@gmail.com> wrote: > According to the ARB_multisample Visual.samples is a non-negative Integer. > Consequently define it, and related functions and values as such and fail > in glx/choose_visual if a negative number is given. > > Signed-off-by: Gert Wollny <gw.foss...@gmail.com> > --- > The patch was motivated by Emil: > https://lists.freedesktop.org/archives/mesa-dev/2017-November/177218.html > Thanks Gert.
> It should be noted that the sample count was already converted to unsigned in > many places, e.g. in XMesaCreateVisual when passing it to > pipe_screen::is_format_supported. > > PS: I have not commit rights. > > src/gallium/include/state_tracker/st_api.h | 2 +- > src/gallium/state_trackers/glx/xlib/glx_api.c | 8 ++++++-- > src/mesa/main/context.c | 4 ++-- > src/mesa/main/context.h | 4 ++-- > src/mesa/main/mtypes.h | 2 +- > src/mesa/main/multisample.c | 2 +- > 6 files changed, 13 insertions(+), 9 deletions(-) > Please split this in two patches ("mesa: ..." and "gallium: ..."), updating st_new_renderbuffer_fb as part of the latter patch. Mildly related: brw_context::num_samples should be unsigned as well. -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev