main: Use a derived value for the default sample count

Graphics / Mesa 3D Graphics Library / Mesa - Neil Roberts [linux.intel.com] - 5 February 2016 05:05 UTC

Previously the framebuffer default sample count was taken directly from the value given by the application. On the i965 driver on HSW if the value wasn't one that is supported by the hardware it would hit an assert when it tried to program the state for it. This patch fixes it by adding a derived sample count to the state for the default framebuffer. The driver can then quantize this to one of the valid
values in its UpdateState handler when the _NEW_BUFFERS state changes. _mesa_geometric_samples is changed to use the new derived value.

Fixes the piglit test arb_framebuffer_no_attachments-query

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93957 Cc: Ilia Mirkin

eb9cf3c main: Use a derived value for the default sample count
src/mesa/drivers/dri/i965/brw_context.c | 19 +++++++++++++++++++
src/mesa/main/framebuffer.h | 3 ++-
src/mesa/main/mtypes.h | 4 ++++
3 files changed, 25 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share