summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/surface9.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index 71aa4f46ffd..5fd662fa049 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -111,6 +111,8 @@ NineSurface9_ctor( struct NineSurface9 *This,
if (pDesc->Usage & D3DUSAGE_RENDERTARGET) {
This->base.info.bind |= PIPE_BIND_RENDER_TARGET;
} else if (pDesc->Usage & D3DUSAGE_DEPTHSTENCIL) {
+ if (!depth_stencil_format(pDesc->Format))
+ return D3DERR_INVALIDCALL;
This->base.info.bind = d3d9_get_pipe_depth_format_bindings(pDesc->Format);
if (TextureType)
This->base.info.bind |= PIPE_BIND_SAMPLER_VIEW;