- Timestamp:
- Dec 15, 2023 5:22:23 PM (17 months ago)
- svn:sync-xref-src-repo-rev:
- 160771
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp
r102520 r102616 1486 1486 static int vmsvga3dBmpWrite(const char *pszFilename, VMSVGA3D_MAPPED_SURFACE const *pMap) 1487 1487 { 1488 if ( pMap->cbBlock != 4 && pMap->cbBlock != 11488 if ( pMap->cbBlock != 4 && pMap->cbBlock != 2 && pMap->cbBlock != 1 1489 1489 && pMap->format != SVGA3D_R16G16B16A16_FLOAT 1490 1490 && pMap->format != SVGA3D_R32G32B32A32_FLOAT) … … 1601 1601 { 1602 1602 fwrite(s, 1, pMap->cbRow, f); 1603 1604 s += pMap->cbRowPitch; 1605 } 1606 } 1607 else if (pMap->cbBlock == 2) 1608 { 1609 const uint8_t *s = (uint8_t *)pMap->pvData; 1610 for (uint32_t iRow = 0; iRow < pMap->cRows; ++iRow) 1611 { 1612 for (int32_t x = 0; x < w; ++x) 1613 { 1614 uint16_t const *pPixel = (uint16_t *)(s + x * sizeof(uint16_t)); 1615 uint32_t u32Pixel = *pPixel; 1616 fwrite(&u32Pixel, 1, 4, f); 1617 } 1603 1618 1604 1619 s += pMap->cbRowPitch; -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp
r102532 r102616 5885 5885 for (unsigned i = 0; i < sizeInBytes / sizeof(float) / 4; ++i) 5886 5886 { 5887 Log (("ConstantF[%d]:" FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR ",\n",5888 i, FLOAT_FMT_ARGS(pValuesF[i*4 + 0]), FLOAT_FMT_ARGS(pValuesF[i*4 + 1]), FLOAT_FMT_ARGS(pValuesF[i*4 + 2]), FLOAT_FMT_ARGS(pValuesF[i*4 + 3])));5887 Log8(("ConstF /*%d*/ " FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR ", " FLOAT_FMT_STR ",\n", 5888 i, FLOAT_FMT_ARGS(pValuesF[i*4 + 0]), FLOAT_FMT_ARGS(pValuesF[i*4 + 1]), FLOAT_FMT_ARGS(pValuesF[i*4 + 2]), FLOAT_FMT_ARGS(pValuesF[i*4 + 3]))); 5889 5889 } 5890 5890 } … … 6419 6419 { 6420 6420 uint16_t const *pValues = (uint16_t const *)pvElementData; 6421 Log8(("{ f16" FLOAT_FMT_STR ", " FLOAT_FMT_STR " },",6421 Log8(("{ /*f16*/ " FLOAT_FMT_STR ", " FLOAT_FMT_STR " },", 6422 6422 FLOAT_FMT_ARGS(float16ToFloat(pValues[0])), FLOAT_FMT_ARGS(float16ToFloat(pValues[1])))); 6423 6423 break; … … 6454 6454 { 6455 6455 int16_t const *pValues = (int16_t const *)pvElementData; 6456 Log8(("{ s%d, %d },",6456 Log8(("{ /*s16*/ %d, %d },", 6457 6457 pValues[0], pValues[1])); 6458 6458 break; … … 6461 6461 { 6462 6462 uint16_t const *pValues = (uint16_t const *)pvElementData; 6463 Log8(("{ u%u, %u },",6463 Log8(("{ /*u16*/ %u, %u },", 6464 6464 pValues[0], pValues[1])); 6465 6465 break; 6466 6466 } 6467 case DXGI_FORMAT_R16G16_SNORM: 6468 { 6469 int16_t const *pValues = (int16_t const *)pvElementData; 6470 Log8(("{ /*sn16*/ 0x%x, 0x%x },", 6471 pValues[0], pValues[1])); 6472 break; 6473 } 6474 case DXGI_FORMAT_R16G16_UNORM: 6475 { 6476 uint16_t const *pValues = (uint16_t const *)pvElementData; 6477 Log8(("{ /*un16*/ 0x%x, 0x%x },", 6478 pValues[0], pValues[1])); 6479 break; 6480 } 6481 case DXGI_FORMAT_R16_UINT: 6482 { 6483 uint16_t const *pValues = (uint16_t const *)pvElementData; 6484 Log8(("{ /*u16*/ %u },", 6485 pValues[0])); 6486 break; 6487 } 6467 6488 case DXGI_FORMAT_R8G8B8A8_UNORM: 6468 6489 { 6469 6490 uint8_t const *pValues = (uint8_t const *)pvElementData; 6470 Log8(("{ 8unorm%u, %u, %u, %u },",6491 Log8(("{ /*8unorm*/ %u, %u, %u, %u },", 6471 6492 pValues[0], pValues[1], pValues[2], pValues[3])); 6472 6493 break; … … 6475 6496 { 6476 6497 uint8_t const *pValues = (uint8_t const *)pvElementData; 6477 Log8(("{ 8unorm%u, %u },",6498 Log8(("{ /*8unorm*/ %u, %u },", 6478 6499 pValues[0], pValues[1])); 6500 break; 6501 } 6502 case DXGI_FORMAT_R8_UINT: 6503 { 6504 uint8_t const *pValues = (uint8_t const *)pvElementData; 6505 Log8(("{ /*8unorm*/ %u },", 6506 pValues[0])); 6479 6507 break; 6480 6508 } … … 6526 6554 for (uint32_t v = 0; v < vertexCount; ++v) 6527 6555 { 6528 Log8(("slot[%u] v%u{ ", iSlot, startVertexLocation + v));6556 Log8(("slot[%u] /* v%u */ { ", iSlot, startVertexLocation + v)); 6529 6557 6530 6558 for (uint32_t iElement = 0; iElement < pDXElementLayout->cElementDesc; ++iElement) … … 6614 6642 Index = ((uint32_t *)pu8IndexData)[i]; 6615 6643 6616 Log8(("slot[%u] v%u{ ", iSlot, Index));6644 Log8(("slot[%u] /* v%u */ { ", iSlot, Index)); 6617 6645 6618 6646 for (uint32_t iElement = 0; iElement < pDXElementLayout->cElementDesc; ++iElement) … … 6686 6714 sidVB, iInstance, startInstanceLocation, pVB->offset, pVB->stride)); 6687 6715 6688 Log8(("slot[%u] i%u{ ", iSlot, iInstance));6716 Log8(("slot[%u] /* i%u */ { ", iSlot, iInstance)); 6689 6717 for (uint32_t iElement = 0; iElement < pDXElementLayout->cElementDesc; ++iElement) 6690 6718 { … … 6804 6832 } 6805 6833 6806 LogFunc(("srv[%d][%d] sid = %u, srvid = %u, format = %s(%d)\n", idxShaderState, idxSR, sid, shaderResourceViewId, vmsvgaLookupEnum((int)pSRViewEntry->format, &g_SVGA3dSurfaceFormat2String), pSRViewEntry->format)); 6834 LogFunc(("srv[%d][%d] sid = %u, srvid = %u, format = %s(%d), %dx%d\n", 6835 idxShaderState, idxSR, sid, shaderResourceViewId, vmsvgaLookupEnum((int)pSRViewEntry->format, &g_SVGA3dSurfaceFormat2String), pSRViewEntry->format, 6836 pSurface->paMipmapLevels[0].cBlocksX * pSurface->cxBlock, pSurface->paMipmapLevels[0].cBlocksY * pSurface->cyBlock)); 6807 6837 6808 6838 #ifdef DUMP_BITMAPS … … 7136 7166 7137 7167 pDevice->pImmediateContext->IASetInputLayout(pInputLayout); 7168 7169 LogFunc(("Topology %u\n", pDXContext->svgaDXContext.inputAssembly.topology)); 7170 LogFunc(("Blend id %u\n", pDXContext->svgaDXContext.renderState.blendStateId)); 7138 7171 } 7139 7172 … … 7710 7743 static D3D11_PRIMITIVE_TOPOLOGY dxTopology(SVGA3dPrimitiveType primitiveType) 7711 7744 { 7745 ASSERT_GUEST_RETURN(primitiveType < SVGA3D_PRIMITIVE_MAX, D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED); 7746 7712 7747 static D3D11_PRIMITIVE_TOPOLOGY const aD3D11PrimitiveTopology[SVGA3D_PRIMITIVE_MAX] = 7713 7748 {
Note:
See TracChangeset
for help on using the changeset viewer.