summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2016-02-04 16:12:07 +0000
committerNeil Roberts <neil@linux.intel.com>2016-02-05 11:05:10 +0000
commiteb9cf3cfc99db0cff0a5a584941e8be43ac9b961 (patch)
tree3109de36e560b9a90ea9f1d12a7d1a448e4497fe /src/mesa/main/framebuffer.h
parent5fd848f6c9ee86b3d0e024cfa6255cd2d721462f (diff)
downloadexternal_mesa3d-eb9cf3cfc99db0cff0a5a584941e8be43ac9b961.zip
external_mesa3d-eb9cf3cfc99db0cff0a5a584941e8be43ac9b961.tar.gz
external_mesa3d-eb9cf3cfc99db0cff0a5a584941e8be43ac9b961.tar.bz2
main: Use a derived value for the default sample count
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 <imirkin@alum.mit.edu> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/mesa/main/framebuffer.h')
-rw-r--r--src/mesa/main/framebuffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h
index ab077ed..fa434d4 100644
--- a/src/mesa/main/framebuffer.h
+++ b/src/mesa/main/framebuffer.h
@@ -97,7 +97,8 @@ static inline GLuint
_mesa_geometric_samples(const struct gl_framebuffer *buffer)
{
return buffer->_HasAttachments ?
- buffer->Visual.samples : buffer->DefaultGeometry.NumSamples;
+ buffer->Visual.samples :
+ buffer->DefaultGeometry._NumSamples;
}
static inline GLuint