st/nine: Add debug warning when application uses sw processing
authorAxel Davy <axel.davy@ens.fr>
Sun, 22 Mar 2015 10:49:03 +0000 (11:49 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 29 Apr 2015 06:28:11 +0000 (08:28 +0200)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/cubetexture9.c
src/gallium/state_trackers/nine/device9.c
src/gallium/state_trackers/nine/indexbuffer9.c
src/gallium/state_trackers/nine/texture9.c
src/gallium/state_trackers/nine/vertexbuffer9.c
src/gallium/state_trackers/nine/volumetexture9.c

index e250315ebf97980a2486ab0e66820bca87a93570..d81cc70f659cce0c23ba6063c477dfb583870ee6 100644 (file)
@@ -93,6 +93,9 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
             PIPE_BIND_TRANSFER_READ |
             PIPE_BIND_TRANSFER_WRITE;
     }
+    if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
+        DBG("Application asked for Software Vertex Processing, "
+            "but this is unimplemented\n");
 
     This->surfaces = CALLOC(6 * (info->last_level + 1), sizeof(*This->surfaces));
     if (!This->surfaces)
index 0bd17177497144cbb1369a0278ed520414ad60b1..7ffede57c7319619c23ef86270fb5321829ff1c1 100644 (file)
@@ -199,6 +199,11 @@ NineDevice9_ctor( struct NineDevice9 *This,
     if (!(This->params.BehaviorFlags & D3DCREATE_FPU_PRESERVE))
         nine_setup_fpu();
 
+    if (This->params.BehaviorFlags & D3DCREATE_SOFTWARE_VERTEXPROCESSING)
+        DBG("Application asked full Software Vertex Processing. Ignoring.\n");
+    if (This->params.BehaviorFlags & D3DCREATE_MIXED_VERTEXPROCESSING)
+        DBG("Application asked mixed Software Vertex Processing. Ignoring.\n");
+
     This->pipe = This->screen->context_create(This->screen, NULL);
     if (!This->pipe) { return E_OUTOFMEMORY; } /* guess */
 
index 48553fd7451e07c1800363f8db1fd408815d2629..860313b7f7eae847a7ef47276423e1f2cff4cef1 100644 (file)
@@ -63,12 +63,14 @@ NineIndexBuffer9_ctor( struct NineIndexBuffer9 *This,
     if (pDesc->Pool == D3DPOOL_SYSTEMMEM)
         info->usage = PIPE_USAGE_STAGING;
 
-    /* if (This->desc.Usage & D3DUSAGE_DONOTCLIP) { } */
-    /* if (This->desc.Usage & D3DUSAGE_NONSECURE) { } */
-    /* if (This->desc.Usage & D3DUSAGE_NPATCHES) { } */
-    /* if (This->desc.Usage & D3DUSAGE_POINTS) { } */
-    /* if (This->desc.Usage & D3DUSAGE_RTPATCHES) { } */
-    /* if (This->desc.Usage & D3DUSAGE_SOFTWAREPROCESSING) { } */
+    /* if (pDesc->Usage & D3DUSAGE_DONOTCLIP) { } */
+    /* if (pDesc->Usage & D3DUSAGE_NONSECURE) { } */
+    /* if (pDesc->Usage & D3DUSAGE_NPATCHES) { } */
+    /* if (pDesc->Usage & D3DUSAGE_POINTS) { } */
+    /* if (pDesc->Usage & D3DUSAGE_RTPATCHES) { } */
+    if (pDesc->Usage & D3DUSAGE_SOFTWAREPROCESSING)
+        DBG("Application asked for Software Vertex Processing, "
+            "but this is unimplemented\n");
 
     info->height0 = 1;
     info->depth0 = 1;
index 0dbdd3739a636016861790ff4c6a6087cf1aebfb..78a632f54ba347f437c8fedb260ef63449e845d2 100644 (file)
@@ -125,6 +125,11 @@ NineTexture9_ctor( struct NineTexture9 *This,
             PIPE_BIND_TRANSFER_READ |
             PIPE_BIND_TRANSFER_WRITE;
     }
+
+    if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
+        DBG("Application asked for Software Vertex Processing, "
+            "but this is unimplemented\n");
+
     if (pSharedHandle)
         info->bind |= PIPE_BIND_SHARED;
 
index 11cc60f5a514e460096e68e6f79c9643ca7920b1..8e2eaaf8ff9532fca5bd768861e7c741d03b5f0d 100644 (file)
@@ -76,7 +76,9 @@ NineVertexBuffer9_ctor( struct NineVertexBuffer9 *This,
     /* if (pDesc->Usage & D3DUSAGE_NPATCHES) { } */
     /* if (pDesc->Usage & D3DUSAGE_POINTS) { } */
     /* if (pDesc->Usage & D3DUSAGE_RTPATCHES) { } */
-    /* if (pDesc->Usage & D3DUSAGE_SOFTWAREPROCESSING) { } */
+    if (pDesc->Usage & D3DUSAGE_SOFTWAREPROCESSING)
+        DBG("Application asked for Software Vertex Processing, "
+            "but this is unimplemented\n");
     /* if (pDesc->Usage & D3DUSAGE_TEXTAPI) { } */
 
     info->height0 = 1;
index 6c0073f6690cc052ed6da87da53a679c6a22164a..08fdd3d29cf5ad06b17989e1ed8c2e8a5816a5f7 100644 (file)
@@ -90,6 +90,9 @@ NineVolumeTexture9_ctor( struct NineVolumeTexture9 *This,
             PIPE_BIND_TRANSFER_READ |
             PIPE_BIND_TRANSFER_WRITE;
     }
+    if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
+        DBG("Application asked for Software Vertex Processing, "
+            "but this is unimplemented\n");
 
     This->volumes = CALLOC(info->last_level + 1, sizeof(*This->volumes));
     if (!This->volumes)