summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r--src/gallium/state_trackers/nine/device9.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index b6e75b4514f..3ebff3a1b1f 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -1126,6 +1126,9 @@ create_zs_or_rt_surface(struct NineDevice9 *This,
templ.nr_samples, templ.bind,
FALSE);
+ if (templ.format == PIPE_FORMAT_NONE && Format != D3DFMT_NULL)
+ return D3DERR_INVALIDCALL;
+
desc.Format = Format;
desc.Type = D3DRTYPE_SURFACE;
desc.Usage = 0;