Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.6 KiB

  1. #ifndef __DDI_INL__
  2. #define __DDI_INL__
  3. /*==========================================================================;
  4. *
  5. * Copyright (C) 1999-2000 Microsoft Corporation. All Rights Reserved.
  6. *
  7. * File: ddi.inl
  8. * Content: Contains inlines from CD3DDDI to avoid them being included
  9. * by the fw directory (which doesn't like try-catch)
  10. *
  11. ***************************************************************************/
  12. //-----------------------------------------------------------------------------
  13. // Initializes command header in the DP2 command buffer,
  14. // reserves space for the command data and returns pointer to the command
  15. // data
  16. //
  17. #undef DPF_MODNAME
  18. #define DPF_MODNAME "CD3DDDIDX6::GetHalBufferPointer"
  19. inline LPVOID
  20. CD3DDDIDX6::GetHalBufferPointer(D3DHAL_DP2OPERATION op, DWORD dwDataSize)
  21. {
  22. DWORD dwCommandSize = sizeof(D3DHAL_DP2COMMAND) + dwDataSize;
  23. // Check to see if there is space to add a new command for space
  24. if (dwCommandSize + dwDP2CommandLength > dwDP2CommandBufSize)
  25. {
  26. FlushStatesCmdBufReq(dwCommandSize);
  27. }
  28. lpDP2CurrCommand = (LPD3DHAL_DP2COMMAND)((LPBYTE)lpvDP2Commands +
  29. dwDP2CommandLength + dp2data.dwCommandOffset);
  30. lpDP2CurrCommand->bCommand = op;
  31. bDP2CurrCmdOP = op;
  32. lpDP2CurrCommand->bReserved = 0;
  33. lpDP2CurrCommand->wStateCount = 1;
  34. wDP2CurrCmdCnt = 1;
  35. #ifndef _IA64_
  36. D3D_INFO(6, "Write Ins:%08lx", *(LPDWORD)lpDP2CurrCommand);
  37. #endif
  38. dwDP2CommandLength += dwCommandSize;
  39. return (LPVOID)(lpDP2CurrCommand + 1);
  40. }
  41. #endif //__RESOURCE_INL__