summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@tungstengraphics.com>2008-06-27 16:02:43 +0200
committerRoland Scheidegger <sroland@tungstengraphics.com>2008-06-27 16:10:16 +0200
commit429a08384c2ea66d446e46beb28e33ee3b764d52 (patch)
tree102e5b46bf7982195af6e5b5f158eb3d328d43b7 /src/gallium
parenta1fb565ea7ac9f86beb4deece6a24d79e7b7860e (diff)
gallium: handle msaa
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/include/pipe/p_state.h6
-rw-r--r--src/gallium/winsys/dri/intel/intel_screen.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 2992e2f3b3..5546796936 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -276,7 +276,7 @@ struct pipe_surface
unsigned layout; /**< PIPE_SURFACE_LAYOUT_x */
unsigned offset; /**< offset from start of buffer, in bytes */
unsigned refcount;
- unsigned usage; /**< PIPE_BUFFER_USAGE_* */
+ unsigned usage; /**< PIPE_BUFFER_USAGE_* */
struct pipe_winsys *winsys; /**< winsys which owns/created the surface */
@@ -311,7 +311,9 @@ struct pipe_texture
unsigned last_level:8; /**< Index of last mipmap level present/defined */
unsigned compressed:1;
-
+
+ unsigned nr_samples:8; /**< for multisampled surfaces, nr of samples */
+
unsigned tex_usage; /* PIPE_TEXTURE_USAGE_* */
/* These are also refcounted:
diff --git a/src/gallium/winsys/dri/intel/intel_screen.c b/src/gallium/winsys/dri/intel/intel_screen.c
index 89de188ada..cfecebdb8c 100644
--- a/src/gallium/winsys/dri/intel/intel_screen.c
+++ b/src/gallium/winsys/dri/intel/intel_screen.c
@@ -483,11 +483,13 @@ intelFillInModes(unsigned pixel_bits, unsigned depth_bits,
uint8_t depth_bits_array[3];
uint8_t stencil_bits_array[3];
+ uint8_t msaa_samples_array[1];
depth_bits_array[0] = 0;
depth_bits_array[1] = depth_bits;
depth_bits_array[2] = depth_bits;
+ msaa_samples_array[0] = 0;
/* Just like with the accumulation buffer, always provide some modes
* with a stencil buffer. It will be a sw fallback, but some apps won't
@@ -521,7 +523,7 @@ intelFillInModes(unsigned pixel_bits, unsigned depth_bits,
if (!driFillInModes(&m, fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor, back_buffer_modes,
- back_buffer_factor, GLX_TRUE_COLOR)) {
+ back_buffer_factor, msaa_samples_array, 1, GLX_TRUE_COLOR)) {
fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
__LINE__);
return NULL;
@@ -529,7 +531,7 @@ intelFillInModes(unsigned pixel_bits, unsigned depth_bits,
if (!driFillInModes(&m, fb_format, fb_type,
depth_bits_array, stencil_bits_array,
depth_buffer_factor, back_buffer_modes,
- back_buffer_factor, GLX_DIRECT_COLOR)) {
+ back_buffer_factor, msaa_samples_array, 1, GLX_DIRECT_COLOR)) {
fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
__LINE__);
return NULL;