diff options
author | Axel Davy <axel.davy@ens.fr> | 2015-01-19 17:13:57 +0100 |
---|---|---|
committer | Axel Davy <axel.davy@ens.fr> | 2015-02-06 00:07:19 +0100 |
commit | 1543defc5ea8a17cf5558bb6468031f9c29b9a15 (patch) | |
tree | cad602eac7521c1b388009f4b6bed393bd3434eb /src/gallium/state_trackers/nine/device9.c | |
parent | 49214a3dfc4f5173e22846d92c5dd0c2b24e3638 (diff) |
st/nine: Fix depth stencil formats bindings flags.
Reviewed-by: Tiziano Bacocco <tizbac2@gmail.com>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index dfec5f91770..fe251fe3ce0 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -971,7 +971,7 @@ create_zs_or_rt_surface(struct NineDevice9 *This, templ.bind = PIPE_BIND_SAMPLER_VIEW; /* StretchRect */ switch (type) { case 0: templ.bind |= PIPE_BIND_RENDER_TARGET; break; - case 1: templ.bind |= PIPE_BIND_DEPTH_STENCIL; break; + case 1: templ.bind = d3d9_get_pipe_depth_format_bindings(Format); break; default: assert(type == 2); break; @@ -1042,6 +1042,8 @@ NineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This, HANDLE *pSharedHandle ) { *ppSurface = NULL; + if (!depth_stencil_format(Format)) + return D3DERR_NOTAVAILABLE; return create_zs_or_rt_surface(This, 1, D3DPOOL_DEFAULT, Width, Height, Format, MultiSample, MultisampleQuality, |