svga: fix constant indices for texcoord scale factors and texture buffer size
[mesa.git] / src / gallium / state_trackers / nine / adapter9.c
index 09bfa3989ff76266ca0786ae98f7e9188668d522..98b3255c0320d83e437dc305fca52a4bab735e16 100644 (file)
@@ -297,7 +297,11 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
 
     bind = 0;
     if (Usage & D3DUSAGE_RENDERTARGET) bind |= PIPE_BIND_RENDER_TARGET;
-    if (Usage & D3DUSAGE_DEPTHSTENCIL) bind |= PIPE_BIND_DEPTH_STENCIL;
+    if (Usage & D3DUSAGE_DEPTHSTENCIL) {
+        if (!depth_stencil_format(CheckFormat))
+            return D3DERR_NOTAVAILABLE;
+        bind |= d3d9_get_pipe_depth_format_bindings(CheckFormat);
+    }
 
     /* API hack because setting RT[0] to NULL is forbidden */
     if (CheckFormat == D3DFMT_NULL && bind == PIPE_BIND_RENDER_TARGET &&
@@ -389,7 +393,7 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
         /* In error cases return only 1 quality level supported */
         *pQualityLevels = 1;
     }
-    user_assert(MultiSampleType < D3DMULTISAMPLE_16_SAMPLES, D3DERR_INVALIDCALL);
+    user_assert(MultiSampleType <= D3DMULTISAMPLE_16_SAMPLES, D3DERR_INVALIDCALL);
 
     hr = NineAdapter9_GetScreen(This, DeviceType, &screen);
     if (FAILED(hr))
@@ -596,7 +600,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
                                D3DPMISCCAPS_BLENDOP |
                                D3DPIPECAP(INDEP_BLEND_ENABLE, D3DPMISCCAPS_INDEPENDENTWRITEMASKS) |
                                D3DPMISCCAPS_PERSTAGECONSTANT |
-                               /*D3DPMISCCAPS_POSTBLENDSRGBCONVERT |*/ /* TODO */
+                               /*D3DPMISCCAPS_POSTBLENDSRGBCONVERT |*/ /* TODO: advertise if Ex and dx10 able card */
                                D3DPMISCCAPS_FOGANDSPECULARALPHA | /* Note: documentation of the flag is wrong */
                                D3DPIPECAP(BLEND_EQUATION_SEPARATE, D3DPMISCCAPS_SEPARATEALPHABLEND) |
                                D3DPIPECAP(MIXED_COLORBUFFER_FORMATS, D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS) |