Changeset 88830 in vbox for trunk/src/VBox/Devices
- Timestamp:
- May 3, 2021 12:26:34 PM (4 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics/svgadump
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/svgadump/svga_dump.c
r88829 r88830 29 29 * 30 30 * Generated automatically from svga3d_reg.h by svga_dump.py. 31 * 32 * Modified for VirtualBox. 31 33 */ 32 34 33 #include "../svga_format.h"34 35 #include "svga_types.h" 35 #include "svga_shader_dump.h" 36 #if RT_GNUC_PREREQ(4, 6) 37 # pragma GCC diagnostic push 38 # pragma GCC diagnostic ignored "-Wpedantic" 39 #endif 40 #pragma pack(1) 36 41 #include "svga3d_reg.h" 37 38 #include "util/u_debug.h" 42 #pragma pack() 43 #if RT_GNUC_PREREQ(4, 6) 44 # pragma GCC diagnostic pop 45 #endif 46 39 47 #include "svga_dump.h" 48 49 #define LOG_GROUP LOG_GROUP_DEV_VMSVGA 50 #include <VBox/log.h> 51 52 #define _debug_printf(...) Log7((__VA_ARGS__)); 53 54 #ifdef LOG_ENABLED 55 struct SVGAFormatName 56 { 57 SVGA3dSurfaceFormat f; 58 const char *pszName; 59 }; 60 61 static struct SVGAFormatName g_formats[] = 62 { 63 { SVGA3D_FORMAT_INVALID , "INVALID" }, 64 { SVGA3D_X8R8G8B8 , "X8R8G8B8" }, 65 { SVGA3D_A8R8G8B8 , "A8R8G8B8" }, 66 { SVGA3D_R5G6B5 , "R5G6B5" }, 67 { SVGA3D_X1R5G5B5 , "X1R5G5B5" }, 68 { SVGA3D_A1R5G5B5 , "A1R5G5B5" }, 69 { SVGA3D_A4R4G4B4 , "A4R4G4B4" }, 70 { SVGA3D_Z_D32 , "Z_D32" }, 71 { SVGA3D_Z_D16 , "Z_D16" }, 72 { SVGA3D_Z_D24S8 , "Z_D24S8" }, 73 { SVGA3D_Z_D15S1 , "Z_D15S1" }, 74 { SVGA3D_LUMINANCE8 , "LUMINANCE8" }, 75 { SVGA3D_LUMINANCE4_ALPHA4 , "LUMINANCE4_ALPHA4" }, 76 { SVGA3D_LUMINANCE16 , "LUMINANCE16" }, 77 { SVGA3D_LUMINANCE8_ALPHA8 , "LUMINANCE8_ALPHA8" }, 78 { SVGA3D_DXT1 , "DXT1" }, 79 { SVGA3D_DXT2 , "DXT2" }, 80 { SVGA3D_DXT3 , "DXT3" }, 81 { SVGA3D_DXT4 , "DXT4" }, 82 { SVGA3D_DXT5 , "DXT5" }, 83 { SVGA3D_BUMPU8V8 , "BUMPU8V8" }, 84 { SVGA3D_BUMPL6V5U5 , "BUMPL6V5U5" }, 85 { SVGA3D_BUMPX8L8V8U8 , "BUMPX8L8V8U8" }, 86 { SVGA3D_FORMAT_DEAD1 , "FORMAT_DEAD1" }, 87 { SVGA3D_ARGB_S10E5 , "ARGB_S10E5" }, 88 { SVGA3D_ARGB_S23E8 , "ARGB_S23E8" }, 89 { SVGA3D_A2R10G10B10 , "A2R10G10B10" }, 90 { SVGA3D_V8U8 , "V8U8" }, 91 { SVGA3D_Q8W8V8U8 , "Q8W8V8U8" }, 92 { SVGA3D_CxV8U8 , "CxV8U8" }, 93 { SVGA3D_X8L8V8U8 , "X8L8V8U8" }, 94 { SVGA3D_A2W10V10U10 , "A2W10V10U10" }, 95 { SVGA3D_ALPHA8 , "ALPHA8" }, 96 { SVGA3D_R_S10E5 , "R_S10E5" }, 97 { SVGA3D_R_S23E8 , "R_S23E8" }, 98 { SVGA3D_RG_S10E5 , "RG_S10E5" }, 99 { SVGA3D_RG_S23E8 , "RG_S23E8" }, 100 { SVGA3D_BUFFER , "BUFFER" }, 101 { SVGA3D_Z_D24X8 , "Z_D24X8" }, 102 { SVGA3D_V16U16 , "V16U16" }, 103 { SVGA3D_G16R16 , "G16R16" }, 104 { SVGA3D_A16B16G16R16 , "A16B16G16R16" }, 105 { SVGA3D_UYVY , "UYVY" }, 106 { SVGA3D_YUY2 , "YUY2" }, 107 { SVGA3D_NV12 , "NV12" }, 108 { SVGA3D_FORMAT_DEAD2 , "FORMAT_DEAD2" }, 109 { SVGA3D_R32G32B32A32_TYPELESS , "R32G32B32A32_TYPELESS" }, 110 { SVGA3D_R32G32B32A32_UINT , "R32G32B32A32_UINT" }, 111 { SVGA3D_R32G32B32A32_SINT , "R32G32B32A32_SINT" }, 112 { SVGA3D_R32G32B32_TYPELESS , "R32G32B32_TYPELESS" }, 113 { SVGA3D_R32G32B32_FLOAT , "R32G32B32_FLOAT" }, 114 { SVGA3D_R32G32B32_UINT , "R32G32B32_UINT" }, 115 { SVGA3D_R32G32B32_SINT , "R32G32B32_SINT" }, 116 { SVGA3D_R16G16B16A16_TYPELESS , "R16G16B16A16_TYPELESS" }, 117 { SVGA3D_R16G16B16A16_UINT , "R16G16B16A16_UINT" }, 118 { SVGA3D_R16G16B16A16_SNORM , "R16G16B16A16_SNORM" }, 119 { SVGA3D_R16G16B16A16_SINT , "R16G16B16A16_SINT" }, 120 { SVGA3D_R32G32_TYPELESS , "R32G32_TYPELESS" }, 121 { SVGA3D_R32G32_UINT , "R32G32_UINT" }, 122 { SVGA3D_R32G32_SINT , "R32G32_SINT" }, 123 { SVGA3D_R32G8X24_TYPELESS , "R32G8X24_TYPELESS" }, 124 { SVGA3D_D32_FLOAT_S8X24_UINT , "D32_FLOAT_S8X24_UINT" }, 125 { SVGA3D_R32_FLOAT_X8X24 , "R32_FLOAT_X8X24" }, 126 { SVGA3D_X32_G8X24_UINT , "X32_G8X24_UINT" }, 127 { SVGA3D_R10G10B10A2_TYPELESS , "R10G10B10A2_TYPELESS" }, 128 { SVGA3D_R10G10B10A2_UINT , "R10G10B10A2_UINT" }, 129 { SVGA3D_R11G11B10_FLOAT , "R11G11B10_FLOAT" }, 130 { SVGA3D_R8G8B8A8_TYPELESS , "R8G8B8A8_TYPELESS" }, 131 { SVGA3D_R8G8B8A8_UNORM , "R8G8B8A8_UNORM" }, 132 { SVGA3D_R8G8B8A8_UNORM_SRGB , "R8G8B8A8_UNORM_SRGB" }, 133 { SVGA3D_R8G8B8A8_UINT , "R8G8B8A8_UINT" }, 134 { SVGA3D_R8G8B8A8_SINT , "R8G8B8A8_SINT" }, 135 { SVGA3D_R16G16_TYPELESS , "R16G16_TYPELESS" }, 136 { SVGA3D_R16G16_UINT , "R16G16_UINT" }, 137 { SVGA3D_R16G16_SINT , "R16G16_SINT" }, 138 { SVGA3D_R32_TYPELESS , "R32_TYPELESS" }, 139 { SVGA3D_D32_FLOAT , "D32_FLOAT" }, 140 { SVGA3D_R32_UINT , "R32_UINT" }, 141 { SVGA3D_R32_SINT , "R32_SINT" }, 142 { SVGA3D_R24G8_TYPELESS , "R24G8_TYPELESS" }, 143 { SVGA3D_D24_UNORM_S8_UINT , "D24_UNORM_S8_UINT" }, 144 { SVGA3D_R24_UNORM_X8 , "R24_UNORM_X8" }, 145 { SVGA3D_X24_G8_UINT , "X24_G8_UINT" }, 146 { SVGA3D_R8G8_TYPELESS , "R8G8_TYPELESS" }, 147 { SVGA3D_R8G8_UNORM , "R8G8_UNORM" }, 148 { SVGA3D_R8G8_UINT , "R8G8_UINT" }, 149 { SVGA3D_R8G8_SINT , "R8G8_SINT" }, 150 { SVGA3D_R16_TYPELESS , "R16_TYPELESS" }, 151 { SVGA3D_R16_UNORM , "R16_UNORM" }, 152 { SVGA3D_R16_UINT , "R16_UINT" }, 153 { SVGA3D_R16_SNORM , "R16_SNORM" }, 154 { SVGA3D_R16_SINT , "R16_SINT" }, 155 { SVGA3D_R8_TYPELESS , "R8_TYPELESS" }, 156 { SVGA3D_R8_UNORM , "R8_UNORM" }, 157 { SVGA3D_R8_UINT , "R8_UINT" }, 158 { SVGA3D_R8_SNORM , "R8_SNORM" }, 159 { SVGA3D_R8_SINT , "R8_SINT" }, 160 { SVGA3D_P8 , "P8" }, 161 { SVGA3D_R9G9B9E5_SHAREDEXP , "R9G9B9E5_SHAREDEXP" }, 162 { SVGA3D_R8G8_B8G8_UNORM , "R8G8_B8G8_UNORM" }, 163 { SVGA3D_G8R8_G8B8_UNORM , "G8R8_G8B8_UNORM" }, 164 { SVGA3D_BC1_TYPELESS , "BC1_TYPELESS" }, 165 { SVGA3D_BC1_UNORM_SRGB , "BC1_UNORM_SRGB" }, 166 { SVGA3D_BC2_TYPELESS , "BC2_TYPELESS" }, 167 { SVGA3D_BC2_UNORM_SRGB , "BC2_UNORM_SRGB" }, 168 { SVGA3D_BC3_TYPELESS , "BC3_TYPELESS" }, 169 { SVGA3D_BC3_UNORM_SRGB , "BC3_UNORM_SRGB" }, 170 { SVGA3D_BC4_TYPELESS , "BC4_TYPELESS" }, 171 { SVGA3D_ATI1 , "ATI1" }, 172 { SVGA3D_BC4_SNORM , "BC4_SNORM" }, 173 { SVGA3D_BC5_TYPELESS , "BC5_TYPELESS" }, 174 { SVGA3D_ATI2 , "ATI2" }, 175 { SVGA3D_BC5_SNORM , "BC5_SNORM" }, 176 { SVGA3D_R10G10B10_XR_BIAS_A2_UNORM , "R10G10B10_XR_BIAS_A2_UNORM" }, 177 { SVGA3D_B8G8R8A8_TYPELESS , "B8G8R8A8_TYPELESS" }, 178 { SVGA3D_B8G8R8A8_UNORM_SRGB , "B8G8R8A8_UNORM_SRGB" }, 179 { SVGA3D_B8G8R8X8_TYPELESS , "B8G8R8X8_TYPELESS" }, 180 { SVGA3D_B8G8R8X8_UNORM_SRGB , "B8G8R8X8_UNORM_SRGB" }, 181 { SVGA3D_Z_DF16 , "Z_DF16" }, 182 { SVGA3D_Z_DF24 , "Z_DF24" }, 183 { SVGA3D_Z_D24S8_INT , "Z_D24S8_INT" }, 184 { SVGA3D_YV12 , "YV12" }, 185 { SVGA3D_R32G32B32A32_FLOAT , "R32G32B32A32_FLOAT" }, 186 { SVGA3D_R16G16B16A16_FLOAT , "R16G16B16A16_FLOAT" }, 187 { SVGA3D_R16G16B16A16_UNORM , "R16G16B16A16_UNORM" }, 188 { SVGA3D_R32G32_FLOAT , "R32G32_FLOAT" }, 189 { SVGA3D_R10G10B10A2_UNORM , "R10G10B10A2_UNORM" }, 190 { SVGA3D_R8G8B8A8_SNORM , "R8G8B8A8_SNORM" }, 191 { SVGA3D_R16G16_FLOAT , "R16G16_FLOAT" }, 192 { SVGA3D_R16G16_UNORM , "R16G16_UNORM" }, 193 { SVGA3D_R16G16_SNORM , "R16G16_SNORM" }, 194 { SVGA3D_R32_FLOAT , "R32_FLOAT" }, 195 { SVGA3D_R8G8_SNORM , "R8G8_SNORM" }, 196 { SVGA3D_R16_FLOAT , "R16_FLOAT" }, 197 { SVGA3D_D16_UNORM , "D16_UNORM" }, 198 { SVGA3D_A8_UNORM , "A8_UNORM" }, 199 { SVGA3D_BC1_UNORM , "BC1_UNORM" }, 200 { SVGA3D_BC2_UNORM , "BC2_UNORM" }, 201 { SVGA3D_BC3_UNORM , "BC3_UNORM" }, 202 { SVGA3D_B5G6R5_UNORM , "B5G6R5_UNORM" }, 203 { SVGA3D_B5G5R5A1_UNORM , "B5G5R5A1_UNORM" }, 204 { SVGA3D_B8G8R8A8_UNORM , "B8G8R8A8_UNORM" }, 205 { SVGA3D_B8G8R8X8_UNORM , "B8G8R8X8_UNORM" }, 206 { SVGA3D_BC4_UNORM , "BC4_UNORM" }, 207 { SVGA3D_BC5_UNORM , "BC5_UNORM" }, 208 { SVGA3D_B4G4R4A4_UNORM , "B4G4R4A4_UNORM" }, 209 { SVGA3D_BC6H_TYPELESS , "BC6H_TYPELESS" }, 210 { SVGA3D_BC6H_UF16 , "BC6H_UF16" }, 211 { SVGA3D_BC6H_SF16 , "BC6H_SF16" }, 212 { SVGA3D_BC7_TYPELESS , "BC7_TYPELESS" }, 213 { SVGA3D_BC7_UNORM , "BC7_UNORM" }, 214 { SVGA3D_BC7_UNORM_SRGB , "BC7_UNORM_SRGB" }, 215 { SVGA3D_AYUV , "AYUV" }, 216 }; 217 218 219 static const char * 220 svga_format_name(SVGA3dSurfaceFormat format) 221 { 222 if (format < RT_ELEMENTS(g_formats)) 223 return g_formats[format].pszName; 224 return "???"; 225 } 226 40 227 41 228 static const char * … … 304 491 } 305 492 _debug_printf("\t\t.value = %u\n", (*cmd).value); 306 _debug_printf("\t\t.floatValue = % f\n", (*cmd).floatValue);493 _debug_printf("\t\t.floatValue = %R[float]\n", (*cmd).floatValue); 307 494 } 308 495 … … 310 497 dump_SVGA3dViewport(const SVGA3dViewport *cmd) 311 498 { 312 _debug_printf("\t\t.x = % f\n", (*cmd).x);313 _debug_printf("\t\t.y = % f\n", (*cmd).y);314 _debug_printf("\t\t.width = % f\n", (*cmd).width);315 _debug_printf("\t\t.height = % f\n", (*cmd).height);316 _debug_printf("\t\t.minDepth = % f\n", (*cmd).minDepth);317 _debug_printf("\t\t.maxDepth = % f\n", (*cmd).maxDepth);499 _debug_printf("\t\t.x = %R[float]\n", (*cmd).x); 500 _debug_printf("\t\t.y = %R[float]\n", (*cmd).y); 501 _debug_printf("\t\t.width = %R[float]\n", (*cmd).width); 502 _debug_printf("\t\t.height = %R[float]\n", (*cmd).height); 503 _debug_printf("\t\t.minDepth = %R[float]\n", (*cmd).minDepth); 504 _debug_printf("\t\t.maxDepth = %R[float]\n", (*cmd).maxDepth); 318 505 } 319 506 … … 375 562 _debug_printf("\t\t.cid = %u\n", (*cmd).cid); 376 563 _debug_printf("\t\t.index = %u\n", (*cmd).index); 377 _debug_printf("\t\t.plane[0] = % f\n", (*cmd).plane[0]);378 _debug_printf("\t\t.plane[1] = % f\n", (*cmd).plane[1]);379 _debug_printf("\t\t.plane[2] = % f\n", (*cmd).plane[2]);380 _debug_printf("\t\t.plane[3] = % f\n", (*cmd).plane[3]);564 _debug_printf("\t\t.plane[0] = %R[float]\n", (*cmd).plane[0]); 565 _debug_printf("\t\t.plane[1] = %R[float]\n", (*cmd).plane[1]); 566 _debug_printf("\t\t.plane[2] = %R[float]\n", (*cmd).plane[2]); 567 _debug_printf("\t\t.plane[3] = %R[float]\n", (*cmd).plane[3]); 381 568 } 382 569 … … 464 651 break; 465 652 } 466 _debug_printf("\t\t.material.diffuse[0] = % f\n", (*cmd).material.diffuse[0]);467 _debug_printf("\t\t.material.diffuse[1] = % f\n", (*cmd).material.diffuse[1]);468 _debug_printf("\t\t.material.diffuse[2] = % f\n", (*cmd).material.diffuse[2]);469 _debug_printf("\t\t.material.diffuse[3] = % f\n", (*cmd).material.diffuse[3]);470 _debug_printf("\t\t.material.ambient[0] = % f\n", (*cmd).material.ambient[0]);471 _debug_printf("\t\t.material.ambient[1] = % f\n", (*cmd).material.ambient[1]);472 _debug_printf("\t\t.material.ambient[2] = % f\n", (*cmd).material.ambient[2]);473 _debug_printf("\t\t.material.ambient[3] = % f\n", (*cmd).material.ambient[3]);474 _debug_printf("\t\t.material.specular[0] = % f\n", (*cmd).material.specular[0]);475 _debug_printf("\t\t.material.specular[1] = % f\n", (*cmd).material.specular[1]);476 _debug_printf("\t\t.material.specular[2] = % f\n", (*cmd).material.specular[2]);477 _debug_printf("\t\t.material.specular[3] = % f\n", (*cmd).material.specular[3]);478 _debug_printf("\t\t.material.emissive[0] = % f\n", (*cmd).material.emissive[0]);479 _debug_printf("\t\t.material.emissive[1] = % f\n", (*cmd).material.emissive[1]);480 _debug_printf("\t\t.material.emissive[2] = % f\n", (*cmd).material.emissive[2]);481 _debug_printf("\t\t.material.emissive[3] = % f\n", (*cmd).material.emissive[3]);482 _debug_printf("\t\t.material.shininess = % f\n", (*cmd).material.shininess);653 _debug_printf("\t\t.material.diffuse[0] = %R[float]\n", (*cmd).material.diffuse[0]); 654 _debug_printf("\t\t.material.diffuse[1] = %R[float]\n", (*cmd).material.diffuse[1]); 655 _debug_printf("\t\t.material.diffuse[2] = %R[float]\n", (*cmd).material.diffuse[2]); 656 _debug_printf("\t\t.material.diffuse[3] = %R[float]\n", (*cmd).material.diffuse[3]); 657 _debug_printf("\t\t.material.ambient[0] = %R[float]\n", (*cmd).material.ambient[0]); 658 _debug_printf("\t\t.material.ambient[1] = %R[float]\n", (*cmd).material.ambient[1]); 659 _debug_printf("\t\t.material.ambient[2] = %R[float]\n", (*cmd).material.ambient[2]); 660 _debug_printf("\t\t.material.ambient[3] = %R[float]\n", (*cmd).material.ambient[3]); 661 _debug_printf("\t\t.material.specular[0] = %R[float]\n", (*cmd).material.specular[0]); 662 _debug_printf("\t\t.material.specular[1] = %R[float]\n", (*cmd).material.specular[1]); 663 _debug_printf("\t\t.material.specular[2] = %R[float]\n", (*cmd).material.specular[2]); 664 _debug_printf("\t\t.material.specular[3] = %R[float]\n", (*cmd).material.specular[3]); 665 _debug_printf("\t\t.material.emissive[0] = %R[float]\n", (*cmd).material.emissive[0]); 666 _debug_printf("\t\t.material.emissive[1] = %R[float]\n", (*cmd).material.emissive[1]); 667 _debug_printf("\t\t.material.emissive[2] = %R[float]\n", (*cmd).material.emissive[2]); 668 _debug_printf("\t\t.material.emissive[3] = %R[float]\n", (*cmd).material.emissive[3]); 669 _debug_printf("\t\t.material.shininess = %R[float]\n", (*cmd).material.shininess); 483 670 } 484 671 … … 512 699 } 513 700 _debug_printf("\t\t.data.inWorldSpace = %u\n", (*cmd).data.inWorldSpace); 514 _debug_printf("\t\t.data.diffuse[0] = % f\n", (*cmd).data.diffuse[0]);515 _debug_printf("\t\t.data.diffuse[1] = % f\n", (*cmd).data.diffuse[1]);516 _debug_printf("\t\t.data.diffuse[2] = % f\n", (*cmd).data.diffuse[2]);517 _debug_printf("\t\t.data.diffuse[3] = % f\n", (*cmd).data.diffuse[3]);518 _debug_printf("\t\t.data.specular[0] = % f\n", (*cmd).data.specular[0]);519 _debug_printf("\t\t.data.specular[1] = % f\n", (*cmd).data.specular[1]);520 _debug_printf("\t\t.data.specular[2] = % f\n", (*cmd).data.specular[2]);521 _debug_printf("\t\t.data.specular[3] = % f\n", (*cmd).data.specular[3]);522 _debug_printf("\t\t.data.ambient[0] = % f\n", (*cmd).data.ambient[0]);523 _debug_printf("\t\t.data.ambient[1] = % f\n", (*cmd).data.ambient[1]);524 _debug_printf("\t\t.data.ambient[2] = % f\n", (*cmd).data.ambient[2]);525 _debug_printf("\t\t.data.ambient[3] = % f\n", (*cmd).data.ambient[3]);526 _debug_printf("\t\t.data.position[0] = % f\n", (*cmd).data.position[0]);527 _debug_printf("\t\t.data.position[1] = % f\n", (*cmd).data.position[1]);528 _debug_printf("\t\t.data.position[2] = % f\n", (*cmd).data.position[2]);529 _debug_printf("\t\t.data.position[3] = % f\n", (*cmd).data.position[3]);530 _debug_printf("\t\t.data.direction[0] = % f\n", (*cmd).data.direction[0]);531 _debug_printf("\t\t.data.direction[1] = % f\n", (*cmd).data.direction[1]);532 _debug_printf("\t\t.data.direction[2] = % f\n", (*cmd).data.direction[2]);533 _debug_printf("\t\t.data.direction[3] = % f\n", (*cmd).data.direction[3]);534 _debug_printf("\t\t.data.range = % f\n", (*cmd).data.range);535 _debug_printf("\t\t.data.falloff = % f\n", (*cmd).data.falloff);536 _debug_printf("\t\t.data.attenuation0 = % f\n", (*cmd).data.attenuation0);537 _debug_printf("\t\t.data.attenuation1 = % f\n", (*cmd).data.attenuation1);538 _debug_printf("\t\t.data.attenuation2 = % f\n", (*cmd).data.attenuation2);539 _debug_printf("\t\t.data.theta = % f\n", (*cmd).data.theta);540 _debug_printf("\t\t.data.phi = % f\n", (*cmd).data.phi);701 _debug_printf("\t\t.data.diffuse[0] = %R[float]\n", (*cmd).data.diffuse[0]); 702 _debug_printf("\t\t.data.diffuse[1] = %R[float]\n", (*cmd).data.diffuse[1]); 703 _debug_printf("\t\t.data.diffuse[2] = %R[float]\n", (*cmd).data.diffuse[2]); 704 _debug_printf("\t\t.data.diffuse[3] = %R[float]\n", (*cmd).data.diffuse[3]); 705 _debug_printf("\t\t.data.specular[0] = %R[float]\n", (*cmd).data.specular[0]); 706 _debug_printf("\t\t.data.specular[1] = %R[float]\n", (*cmd).data.specular[1]); 707 _debug_printf("\t\t.data.specular[2] = %R[float]\n", (*cmd).data.specular[2]); 708 _debug_printf("\t\t.data.specular[3] = %R[float]\n", (*cmd).data.specular[3]); 709 _debug_printf("\t\t.data.ambient[0] = %R[float]\n", (*cmd).data.ambient[0]); 710 _debug_printf("\t\t.data.ambient[1] = %R[float]\n", (*cmd).data.ambient[1]); 711 _debug_printf("\t\t.data.ambient[2] = %R[float]\n", (*cmd).data.ambient[2]); 712 _debug_printf("\t\t.data.ambient[3] = %R[float]\n", (*cmd).data.ambient[3]); 713 _debug_printf("\t\t.data.position[0] = %R[float]\n", (*cmd).data.position[0]); 714 _debug_printf("\t\t.data.position[1] = %R[float]\n", (*cmd).data.position[1]); 715 _debug_printf("\t\t.data.position[2] = %R[float]\n", (*cmd).data.position[2]); 716 _debug_printf("\t\t.data.position[3] = %R[float]\n", (*cmd).data.position[3]); 717 _debug_printf("\t\t.data.direction[0] = %R[float]\n", (*cmd).data.direction[0]); 718 _debug_printf("\t\t.data.direction[1] = %R[float]\n", (*cmd).data.direction[1]); 719 _debug_printf("\t\t.data.direction[2] = %R[float]\n", (*cmd).data.direction[2]); 720 _debug_printf("\t\t.data.direction[3] = %R[float]\n", (*cmd).data.direction[3]); 721 _debug_printf("\t\t.data.range = %R[float]\n", (*cmd).data.range); 722 _debug_printf("\t\t.data.falloff = %R[float]\n", (*cmd).data.falloff); 723 _debug_printf("\t\t.data.attenuation0 = %R[float]\n", (*cmd).data.attenuation0); 724 _debug_printf("\t\t.data.attenuation1 = %R[float]\n", (*cmd).data.attenuation1); 725 _debug_printf("\t\t.data.attenuation2 = %R[float]\n", (*cmd).data.attenuation2); 726 _debug_printf("\t\t.data.theta = %R[float]\n", (*cmd).data.theta); 727 _debug_printf("\t\t.data.phi = %R[float]\n", (*cmd).data.phi); 541 728 } 542 729 … … 948 1135 } 949 1136 _debug_printf("\t\t.uintValue = %u\n", (*cmd).uintValue); 950 _debug_printf("\t\t.floatValue = % f\n", (*cmd).floatValue);1137 _debug_printf("\t\t.floatValue = %R[float]\n", (*cmd).floatValue); 951 1138 } 952 1139 … … 991 1178 fvalues = (const float (*)[4]) buf; 992 1179 for (i = 0; i < numConsts; ++i) { 993 _debug_printf("\t\t.values[%u] = {% f, %f, %f, %f}\n",1180 _debug_printf("\t\t.values[%u] = {%R[float], %R[float], %R[float], %R[float]}\n", 994 1181 start + i, 995 1182 fvalues[i][0], … … 1061 1248 { 1062 1249 _debug_printf("\t\t.cid = %u\n", (*cmd).cid); 1063 _debug_printf("\t\t.zRange.min = % f\n", (*cmd).zRange.min);1064 _debug_printf("\t\t.zRange.max = % f\n", (*cmd).zRange.max);1250 _debug_printf("\t\t.zRange.min = %R[float]\n", (*cmd).zRange.min); 1251 _debug_printf("\t\t.zRange.max = %R[float]\n", (*cmd).zRange.max); 1065 1252 } 1066 1253 … … 1258 1445 break; 1259 1446 } 1260 _debug_printf("\t\t.matrix[0] = % f\n", (*cmd).matrix[0]);1261 _debug_printf("\t\t.matrix[1] = % f\n", (*cmd).matrix[1]);1262 _debug_printf("\t\t.matrix[2] = % f\n", (*cmd).matrix[2]);1263 _debug_printf("\t\t.matrix[3] = % f\n", (*cmd).matrix[3]);1264 _debug_printf("\t\t.matrix[4] = % f\n", (*cmd).matrix[4]);1265 _debug_printf("\t\t.matrix[5] = % f\n", (*cmd).matrix[5]);1266 _debug_printf("\t\t.matrix[6] = % f\n", (*cmd).matrix[6]);1267 _debug_printf("\t\t.matrix[7] = % f\n", (*cmd).matrix[7]);1268 _debug_printf("\t\t.matrix[8] = % f\n", (*cmd).matrix[8]);1269 _debug_printf("\t\t.matrix[9] = % f\n", (*cmd).matrix[9]);1270 _debug_printf("\t\t.matrix[10] = % f\n", (*cmd).matrix[10]);1271 _debug_printf("\t\t.matrix[11] = % f\n", (*cmd).matrix[11]);1272 _debug_printf("\t\t.matrix[12] = % f\n", (*cmd).matrix[12]);1273 _debug_printf("\t\t.matrix[13] = % f\n", (*cmd).matrix[13]);1274 _debug_printf("\t\t.matrix[14] = % f\n", (*cmd).matrix[14]);1275 _debug_printf("\t\t.matrix[15] = % f\n", (*cmd).matrix[15]);1447 _debug_printf("\t\t.matrix[0] = %R[float]\n", (*cmd).matrix[0]); 1448 _debug_printf("\t\t.matrix[1] = %R[float]\n", (*cmd).matrix[1]); 1449 _debug_printf("\t\t.matrix[2] = %R[float]\n", (*cmd).matrix[2]); 1450 _debug_printf("\t\t.matrix[3] = %R[float]\n", (*cmd).matrix[3]); 1451 _debug_printf("\t\t.matrix[4] = %R[float]\n", (*cmd).matrix[4]); 1452 _debug_printf("\t\t.matrix[5] = %R[float]\n", (*cmd).matrix[5]); 1453 _debug_printf("\t\t.matrix[6] = %R[float]\n", (*cmd).matrix[6]); 1454 _debug_printf("\t\t.matrix[7] = %R[float]\n", (*cmd).matrix[7]); 1455 _debug_printf("\t\t.matrix[8] = %R[float]\n", (*cmd).matrix[8]); 1456 _debug_printf("\t\t.matrix[9] = %R[float]\n", (*cmd).matrix[9]); 1457 _debug_printf("\t\t.matrix[10] = %R[float]\n", (*cmd).matrix[10]); 1458 _debug_printf("\t\t.matrix[11] = %R[float]\n", (*cmd).matrix[11]); 1459 _debug_printf("\t\t.matrix[12] = %R[float]\n", (*cmd).matrix[12]); 1460 _debug_printf("\t\t.matrix[13] = %R[float]\n", (*cmd).matrix[13]); 1461 _debug_printf("\t\t.matrix[14] = %R[float]\n", (*cmd).matrix[14]); 1462 _debug_printf("\t\t.matrix[15] = %R[float]\n", (*cmd).matrix[15]); 1276 1463 } 1277 1464 … … 1319 1506 } 1320 1507 _debug_printf("\t\t.color = %u\n", (*cmd).color); 1321 _debug_printf("\t\t.depth = % f\n", (*cmd).depth);1508 _debug_printf("\t\t.depth = %R[float]\n", (*cmd).depth); 1322 1509 _debug_printf("\t\t.stencil = %u\n", (*cmd).stencil); 1323 1510 } … … 1505 1692 { 1506 1693 SVGA3D_DUMP_PARAMETER(shaderId, u); 1507 debug_printf("\t\t.type = %s\n", shader_name(cmd->type));1694 _debug_printf("\t\t.type = %s\n", shader_name(cmd->type)); 1508 1695 } 1509 1696 … … 1511 1698 { 1512 1699 SVGA3D_DUMP_PARAMETER(startSampler, u); 1513 debug_printf("\t\t.type = %s\n", shader_name(cmd->type));1700 _debug_printf("\t\t.type = %s\n", shader_name(cmd->type)); 1514 1701 /* XXX: note we're not printing the sampler IDs at this time */ 1515 1702 } … … 1547 1734 SVGA3D_DUMP_HEADER(DrawAuto) 1548 1735 { 1736 (void)cmd; 1549 1737 } 1550 1738 … … 1552 1740 { 1553 1741 SVGA3D_DUMP_PARAMETER(blendId, u); 1554 _debug_printf("\t\t.blendFactor[4] = % f %f %f %f\n", cmd->blendFactor[0],1742 _debug_printf("\t\t.blendFactor[4] = %R[float] %R[float] %R[float] %R[float]\n", cmd->blendFactor[0], 1555 1743 cmd->blendFactor[1], 1556 1744 cmd->blendFactor[2], … … 1639 1827 SVGA3D_DUMP_HEADER(SetSOTargets) 1640 1828 { 1829 (void)cmd; 1641 1830 } 1642 1831 … … 1650 1839 SVGA3D_DUMP_HEADER(SetViewports) 1651 1840 { 1652 1841 (void)cmd; 1653 1842 /* XXX: note we're not printing the SVGA3dViewport list at this time */ 1654 1843 } … … 1656 1845 SVGA3D_DUMP_HEADER(SetScissorRects) 1657 1846 { 1658 1847 (void)cmd; 1659 1848 /* XXX: note we're not printing the SVGASignedRect list at this time */ 1660 1849 } … … 1663 1852 { 1664 1853 SVGA3D_DUMP_PARAMETER(renderTargetViewId, u); 1665 SVGA3D_DUMP_PARAMETER(rgba.r, f);1666 SVGA3D_DUMP_PARAMETER(rgba.g, f);1667 SVGA3D_DUMP_PARAMETER(rgba.b, f);1668 SVGA3D_DUMP_PARAMETER(rgba.a, f);1854 SVGA3D_DUMP_PARAMETER(rgba.r, R[float]); 1855 SVGA3D_DUMP_PARAMETER(rgba.g, R[float]); 1856 SVGA3D_DUMP_PARAMETER(rgba.b, R[float]); 1857 SVGA3D_DUMP_PARAMETER(rgba.a, R[float]); 1669 1858 } 1670 1859 … … 1674 1863 SVGA3D_DUMP_PARAMETER(stencil, u); 1675 1864 SVGA3D_DUMP_PARAMETER(depthStencilViewId, u); 1676 SVGA3D_DUMP_PARAMETER(depth, f);1865 SVGA3D_DUMP_PARAMETER(depth, R[float]); 1677 1866 } 1678 1867 … … 1707 1896 { 1708 1897 SVGA3D_DUMP_PARAMETER(startView, u); 1709 debug_printf("\t\t.type = %s\n", shader_name(cmd->type));1898 _debug_printf("\t\t.type = %s\n", shader_name(cmd->type)); 1710 1899 } 1711 1900 … … 1846 2035 SVGA3D_DUMP_PARAMETER(frontCounterClockwise, u); 1847 2036 SVGA3D_DUMP_PARAMETER(depthBias, u); 1848 SVGA3D_DUMP_PARAMETER(depthBiasClamp, f);1849 SVGA3D_DUMP_PARAMETER(slopeScaledDepthBias, f);2037 SVGA3D_DUMP_PARAMETER(depthBiasClamp, R[float]); 2038 SVGA3D_DUMP_PARAMETER(slopeScaledDepthBias, R[float]); 1850 2039 SVGA3D_DUMP_PARAMETER(depthClipEnable, u); 1851 2040 SVGA3D_DUMP_PARAMETER(scissorEnable, u); 1852 2041 SVGA3D_DUMP_PARAMETER(multisampleEnable, u); 1853 2042 SVGA3D_DUMP_PARAMETER(antialiasedLineEnable, u); 1854 SVGA3D_DUMP_PARAMETER(lineWidth, f);2043 SVGA3D_DUMP_PARAMETER(lineWidth, R[float]); 1855 2044 SVGA3D_DUMP_PARAMETER(lineStippleEnable, u); 1856 2045 SVGA3D_DUMP_PARAMETER(lineStippleFactor, u); … … 1871 2060 SVGA3D_DUMP_PARAMETER(addressV, u); 1872 2061 SVGA3D_DUMP_PARAMETER(addressW, u); 1873 SVGA3D_DUMP_PARAMETER(mipLODBias, f);2062 SVGA3D_DUMP_PARAMETER(mipLODBias, R[float]); 1874 2063 SVGA3D_DUMP_PARAMETER(maxAnisotropy, u); 1875 2064 SVGA3D_DUMP_PARAMETER(comparisonFunc, u); 1876 SVGA3D_DUMP_PARAMETER(borderColor.r, f);1877 SVGA3D_DUMP_PARAMETER(borderColor.g, f);1878 SVGA3D_DUMP_PARAMETER(borderColor.b, f);1879 SVGA3D_DUMP_PARAMETER(borderColor.a, f);1880 SVGA3D_DUMP_PARAMETER(minLOD, f);1881 SVGA3D_DUMP_PARAMETER(maxLOD, f);2065 SVGA3D_DUMP_PARAMETER(borderColor.r, R[float]); 2066 SVGA3D_DUMP_PARAMETER(borderColor.g, R[float]); 2067 SVGA3D_DUMP_PARAMETER(borderColor.b, R[float]); 2068 SVGA3D_DUMP_PARAMETER(borderColor.a, R[float]); 2069 SVGA3D_DUMP_PARAMETER(minLOD, R[float]); 2070 SVGA3D_DUMP_PARAMETER(maxLOD, R[float]); 1882 2071 } 1883 2072 … … 1890 2079 { 1891 2080 SVGA3D_DUMP_PARAMETER(shaderId, u); 1892 debug_printf("\t\t.type = %s\n", shader_name(cmd->type));2081 _debug_printf("\t\t.type = %s\n", shader_name(cmd->type)); 1893 2082 SVGA3D_DUMP_PARAMETER(sizeInBytes, u); 1894 2083 } … … 1938 2127 SVGA3D_DUMP_PARAMETER(slot, u); 1939 2128 SVGA3D_DUMP_PARAMETER(sid, u); 1940 debug_printf("\t\t.type = %s\n", shader_name(cmd->type));2129 _debug_printf("\t\t.type = %s\n", shader_name(cmd->type)); 1941 2130 SVGA3D_DUMP_PARAMETER(offsetInBytes, u); 1942 2131 SVGA3D_DUMP_PARAMETER(sizeInBytes, u); … … 2040 2229 SVGA3D_DUMP_PARAMETER(destSubResource, u); 2041 2230 dump_SVGA3dBox(&cmd->destBox); 2231 } 2232 2233 static void 2234 dump_SVGA3dCmdIntraSurfaceCopy(const SVGA3dCmdIntraSurfaceCopy *cmd) 2235 { 2236 SVGA3D_DUMP_PARAMETER(surface.sid, u); 2237 SVGA3D_DUMP_PARAMETER(surface.face, u); 2238 SVGA3D_DUMP_PARAMETER(surface.mipmap, u); 2239 dump_SVGA3dCopyBox(&cmd->box); 2042 2240 } 2043 2241 … … 2350 2548 dump_SVGA3dCmdDefineShader(cmd); 2351 2549 body = (const uint8_t *)&cmd[1]; 2352 svga_shader_dump((const uint32_t *)body,2353 (unsigned)(next - body)/sizeof(uint32_t),2354 FALSE );2550 //svga_shader_dump((const uint32_t *)body, 2551 // (unsigned)(next - body)/sizeof(uint32_t), 2552 // FALSE ); 2355 2553 body = next; 2356 2554 } … … 2560 2758 } 2561 2759 break; 2760 case SVGA_3D_CMD_INTRA_SURFACE_COPY: 2761 _debug_printf("\tSVGA_3D_CMD_INTRA_SURFACE_COPY\n"); 2762 { 2763 const SVGA3dCmdIntraSurfaceCopy *cmd = (const SVGA3dCmdIntraSurfaceCopy *)body; 2764 dump_SVGA3dCmdIntraSurfaceCopy(cmd); 2765 body = (const uint8_t *)&cmd[1]; 2766 } 2767 break; 2562 2768 default: 2563 2769 _debug_printf("\t0x%08x\n", cmd_id); … … 2580 2786 const uint8_t *last = next + size; 2581 2787 2582 assert(size % sizeof(uint32_t) == 0);2788 //assert(size % sizeof(uint32_t) == 0); 2583 2789 2584 2790 while(next < last) { … … 2606 2812 } 2607 2813 } 2608 2814 #endif /* LOG_ENABLED */ -
trunk/src/VBox/Devices/Graphics/svgadump/svga_dump.h
r88829 r88830 27 27 #define SVGA_DUMP_H_ 28 28 29 #include "pipe/p_compiler.h"29 #include <iprt/types.h> 30 30 31 31 void
Note:
See TracChangeset
for help on using the changeset viewer.