Changeset 30102 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Jun 9, 2010 10:17:57 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r30097 r30102 2469 2469 static HRESULT APIENTRY vboxWddmDDevCreateVertexShaderFunc(HANDLE hDevice, D3DDDIARG_CREATEVERTEXSHADERFUNC* pData, CONST UINT* pCode) 2470 2470 { 2471 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2472 AssertBreakpoint(); 2473 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2474 return E_FAIL; 2471 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2472 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 2473 Assert(pDevice); 2474 Assert(pDevice->pDevice9If); 2475 IDirect3DVertexShader9 *pShader; 2476 Assert(*((UINT*)((uint8_t*)pCode + pData->Size-4)) == 0x0000FFFF /* end token */); 2477 HRESULT hr = pDevice->pDevice9If->CreateVertexShader((const DWORD *)pCode, &pShader); 2478 Assert(hr == S_OK); 2479 if (hr == S_OK) 2480 { 2481 Assert(pShader); 2482 pData->ShaderHandle = pShader; 2483 } 2484 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr)); 2485 return hr; 2475 2486 } 2476 2487 static HRESULT APIENTRY vboxWddmDDevSetVertexShaderFunc(HANDLE hDevice, HANDLE hShaderHandle) … … 2483 2494 static HRESULT APIENTRY vboxWddmDDevDeleteVertexShaderFunc(HANDLE hDevice, HANDLE hShaderHandle) 2484 2495 { 2485 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2486 AssertBreakpoint(); 2487 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2488 return E_FAIL; 2496 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2497 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 2498 Assert(pDevice); 2499 Assert(pDevice->pDevice9If); 2500 IDirect3DVertexShader9 *pShader = (IDirect3DVertexShader9*)hShaderHandle; 2501 HRESULT hr = pShader->Release(); 2502 Assert(hr == S_OK); 2503 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr)); 2504 return hr; 2489 2505 } 2490 2506 static HRESULT APIENTRY vboxWddmDDevSetVertexShaderConstI(HANDLE hDevice, CONST D3DDDIARG_SETVERTEXSHADERCONSTI* pData, CONST INT* pRegisters) … … 2635 2651 static HRESULT APIENTRY vboxWddmDDevCreatePixelShader(HANDLE hDevice, D3DDDIARG_CREATEPIXELSHADER* pData, CONST UINT* pCode) 2636 2652 { 2637 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2638 AssertBreakpoint(); 2639 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2640 return E_FAIL; 2653 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2654 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 2655 Assert(pDevice); 2656 Assert(pDevice->pDevice9If); 2657 IDirect3DPixelShader9 *pShader; 2658 Assert(*((UINT*)((uint8_t*)pCode + pData->CodeSize-4)) == 0x0000FFFF /* end token */); 2659 HRESULT hr = pDevice->pDevice9If->CreatePixelShader((const DWORD *)pCode, &pShader); 2660 Assert(hr == S_OK); 2661 if (hr == S_OK) 2662 { 2663 Assert(pShader); 2664 pData->ShaderHandle = pShader; 2665 } 2666 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr)); 2667 return hr; 2641 2668 } 2642 2669 static HRESULT APIENTRY vboxWddmDDevDeletePixelShader(HANDLE hDevice, HANDLE hShaderHandle) 2643 2670 { 2644 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2645 AssertBreakpoint(); 2646 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2647 return E_FAIL; 2671 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 2672 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 2673 Assert(pDevice); 2674 Assert(pDevice->pDevice9If); 2675 IDirect3DPixelShader9 *pShader = (IDirect3DPixelShader9*)hShaderHandle; 2676 HRESULT hr = pShader->Release(); 2677 Assert(hr == S_OK); 2678 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr)); 2679 return hr; 2648 2680 } 2649 2681 static HRESULT APIENTRY vboxWddmDDevCreateDecodeDevice(HANDLE hDevice, D3DDDIARG_CREATEDECODEDEVICE* pData)
Note:
See TracChangeset
for help on using the changeset viewer.