summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/adapter9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-01-21 08:59:05 +0100
committerAxel Davy <[email protected]>2015-02-06 00:07:19 +0100
commitd8d48f6f7181fa6cc7c4ff5b1c0e8883d6f8ce6d (patch)
treef698ecba2619e225cc9c8b8cdc23831c673c308b /src/gallium/state_trackers/nine/adapter9.c
parenta1d369e804623663e78002c0101d668bd3d42762 (diff)
st/nine: Fix multisampling support detection
Reviewed-by: Tiziano Bacocco <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/adapter9.c')
-rw-r--r--src/gallium/state_trackers/nine/adapter9.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c
index e9bb9c08ee9..069cc03a031 100644
--- a/src/gallium/state_trackers/nine/adapter9.c
+++ b/src/gallium/state_trackers/nine/adapter9.c
@@ -359,6 +359,7 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
struct pipe_screen *screen;
HRESULT hr;
enum pipe_format pf;
+ unsigned bind;
DBG("This=%p DeviceType=%s SurfaceFormat=%s Windowed=%i MultiSampleType=%u "
"pQualityLevels=%p\n", This, nine_D3DDEVTYPE_to_str(DeviceType),
@@ -369,9 +370,14 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
if (FAILED(hr))
return hr;
- pf = d3d9_to_pipe_format_checked_no_bind(screen, SurfaceFormat,
- PIPE_TEXTURE_2D,
- MultiSampleType, FALSE);
+ if (depth_stencil_format(SurfaceFormat))
+ bind = d3d9_get_pipe_depth_format_bindings(SurfaceFormat);
+ else /* render-target */
+ bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_TRANSFER_READ |
+ PIPE_BIND_TRANSFER_WRITE | PIPE_BIND_RENDER_TARGET;
+
+ pf = d3d9_to_pipe_format_checked(screen, SurfaceFormat, PIPE_TEXTURE_2D,
+ MultiSampleType, bind, FALSE);
if (pf == PIPE_FORMAT_NONE) {
DBG("%s with %u samples not available.\n",