st/nine: Implement D3DUSAGE_SOFTWAREPROCESSING
authorAxel Davy <axel.davy@ens.fr>
Sun, 11 Sep 2016 13:57:12 +0000 (15:57 +0200)
committerAxel Davy <axel.davy@ens.fr>
Mon, 10 Oct 2016 21:43:49 +0000 (23:43 +0200)
Buffers with this flag must be usable with both software
and hardware vertex processing. Use Staging for fast cpu access.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
src/gallium/state_trackers/nine/buffer9.c

index 236a3ee66bdc09ec4e76dbe4936f1ea68f542ab8..e7c6a2fdcabeaf302c879035d5fa12c5ea442a36 100644 (file)
@@ -106,9 +106,10 @@ NineBuffer9_ctor( struct NineBuffer9 *This,
     /* if (pDesc->Usage & D3DUSAGE_NPATCHES) { } */
     /* if (pDesc->Usage & D3DUSAGE_POINTS) { } */
     /* if (pDesc->Usage & D3DUSAGE_RTPATCHES) { } */
+    /* The buffer must be usable with both sw and hw
+     * vertex processing. It is expected to be slower with hw. */
     if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
-        DBG("Application asked for Software Vertex Processing, "
-            "but this is unimplemented\n");
+        info->usage = PIPE_USAGE_STAGING;
     /* if (pDesc->Usage & D3DUSAGE_TEXTAPI) { } */
 
     info->height0 = 1;