svga: Dump SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN commands.
authorJosé Fonseca <jfonseca@vmware.com>
Sat, 5 Dec 2009 06:34:59 +0000 (06:34 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 5 Dec 2009 06:34:59 +0000 (06:34 +0000)
src/gallium/drivers/svga/svgadump/svga_dump.c
src/gallium/drivers/svga/svgadump/svga_dump.py

index 18e0eb5139a8f2162875116a1003cc23b229637b..e6d4a74e8681e9c25ba1ed6a4aa35d777c6fb538 100644 (file)
@@ -1416,6 +1416,32 @@ dump_SVGA3dCmdDefineSurface(const SVGA3dCmdDefineSurface *cmd)
    _debug_printf("\t\t.face[5].numMipLevels = %u\n", (*cmd).face[5].numMipLevels);
 }
 
+static void
+dump_SVGASignedRect(const SVGASignedRect *cmd)
+{
+   _debug_printf("\t\t.left = %i\n", (*cmd).left);
+   _debug_printf("\t\t.top = %i\n", (*cmd).top);
+   _debug_printf("\t\t.right = %i\n", (*cmd).right);
+   _debug_printf("\t\t.bottom = %i\n", (*cmd).bottom);
+}
+
+static void
+dump_SVGA3dCmdBlitSurfaceToScreen(const SVGA3dCmdBlitSurfaceToScreen *cmd)
+{
+   _debug_printf("\t\t.srcImage.sid = %u\n", (*cmd).srcImage.sid);
+   _debug_printf("\t\t.srcImage.face = %u\n", (*cmd).srcImage.face);
+   _debug_printf("\t\t.srcImage.mipmap = %u\n", (*cmd).srcImage.mipmap);
+   _debug_printf("\t\t.srcRect.left = %i\n", (*cmd).srcRect.left);
+   _debug_printf("\t\t.srcRect.top = %i\n", (*cmd).srcRect.top);
+   _debug_printf("\t\t.srcRect.right = %i\n", (*cmd).srcRect.right);
+   _debug_printf("\t\t.srcRect.bottom = %i\n", (*cmd).srcRect.bottom);
+   _debug_printf("\t\t.destScreenId = %u\n", (*cmd).destScreenId);
+   _debug_printf("\t\t.destRect.left = %i\n", (*cmd).destRect.left);
+   _debug_printf("\t\t.destRect.top = %i\n", (*cmd).destRect.top);
+   _debug_printf("\t\t.destRect.right = %i\n", (*cmd).destRect.right);
+   _debug_printf("\t\t.destRect.bottom = %i\n", (*cmd).destRect.bottom);
+}
+
 
 void            
 svga_dump_commands(const void *commands, uint32_t size)
@@ -1710,6 +1736,18 @@ svga_dump_commands(const void *commands, uint32_t size)
                body = (const uint8_t *)&cmd[1];
             }
             break;
+         case SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN:
+            _debug_printf("\tSVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN\n");
+            {
+               const SVGA3dCmdBlitSurfaceToScreen *cmd = (const SVGA3dCmdBlitSurfaceToScreen *)body;
+               dump_SVGA3dCmdBlitSurfaceToScreen(cmd);
+               body = (const uint8_t *)&cmd[1];
+               while(body + sizeof(SVGASignedRect) <= next) {
+                  dump_SVGASignedRect((const SVGASignedRect *)body);
+                  body += sizeof(SVGASignedRect);
+               }
+            }
+            break;
          default:
             _debug_printf("\t0x%08x\n", cmd_id);
             break;
index dc5f3267e2c5d6daf7ca15f5b8a02177f7e15f3e..a1ada29ef840a74d097e475ad9472ca00d32e8ea 100755 (executable)
@@ -202,6 +202,7 @@ cmds = [
     ('SVGA_3D_CMD_END_QUERY', 'SVGA3dCmdEndQuery', (), None),
     ('SVGA_3D_CMD_WAIT_FOR_QUERY', 'SVGA3dCmdWaitForQuery', (), None),
     #('SVGA_3D_CMD_PRESENT_READBACK', None, (), None),
+    ('SVGA_3D_CMD_BLIT_SURFACE_TO_SCREEN', 'SVGA3dCmdBlitSurfaceToScreen', (), 'SVGASignedRect'),
 ]
 
 def dump_cmds():
@@ -294,18 +295,18 @@ def main():
     print '#include "svga_shader_dump.h"'
     print '#include "svga3d_reg.h"'
     print
-    print '#include "pipe/p_debug.h"'
+    print '#include "util/u_debug.h"'
     print '#include "svga_dump.h"'
     print
 
     config = parser.config_t(
-        include_paths = ['include'],
+        include_paths = ['../../../include', '../include'],
         compiler = 'gcc',
     )
 
     headers = [
-        'include/svga_types.h', 
-        'include/svga3d_reg.h', 
+        'svga_types.h', 
+        'svga3d_reg.h', 
     ]
 
     decls = parser.parse(headers, config, parser.COMPILATION_MODE.ALL_AT_ONCE)