已阅读5页,还剩35页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Direct 3D Part 1: Utilizing The Maximum Power Of The GPU In Your Graphic-Intensive Windows Vista (Longhorn) Application,Rudolph BalazPRS311 Program ManagerMicrosoft Corporation,Session Focus,PRS 311 (This talk)Overview of Windows Vista Graphics StackFocus on Direct3D technologiesDiscover Graphics Stack changesLearn how to unleash the GPUUnderstand what it means to your applicationPRS 416Building applications using HLSLCool things you can do with Direct3DNext generation uses of the GPU,Topics Covered,Windows Vista Direct3D GoalsMore Scalable / More ReliableNew uses of the GPUBetter visuals and effectsWindows Vista Direct 3D TechnologiesNew Display Driver ModelDirect 3D 9.0Direct 3D 10,Direct 3D,Direct access to 3D hardwareReal time frame ratesGraphics Intensive ApplicationsGames, Productivity, Workstation ApplicationsNative & Managed APIs,Windows Vista Graphics Stack,Windows Vista Display Driver Model,Direct3D9 Runtime,DesktopWindowsManager,WindowsPresentationFoundation,Applications,ManagedDirect3D9,D3DX9,Effects,Direct3D10 Runtime,D3DX10,ManagedDirect3D10,Subtle Windows Vista Changes,GDI software onlyDesktop CompositionYour timing may varyActions may disable Desktop CompositionGetDC(NULL), Locking GDI primary surfaceShader Model 2.0 baseline,Things To Do,Dont lock the front bufferThrottle rendering in Windowed modeTest FullyWindows XP driver modelWindows Vista driver modelWith/Without Desktop Window ManagerWindowed/Fullscreen,Scalability / Reliability,GPU Is A Shared Resource,PresentationDesktop ManagerApplicationsGamesMultimediaWorkstation GraphicsMulti-monitorMobileRemote (terminal server),Scalability / Reliability,Windows Vista Display Driver Model,Virtualized graphics memoryGPU Command Scheduling & MultitaskingCommand translation moved to user modeManaged PrimariesFault tolerancePlug and PlayRebootless driver upgradeShared SurfacesSecure Surfaces,Display Driver Model Highlights,Driver Model Details,Basic ModelAvailable in Windows VistaVirtualization is resource granularityCommand Scheduling is in SoftwareAdvanced ModelAvailable Shortly after Windows VistaPage-level faulting Hardware context switching,Subtle Windows Vista Changes,Cant interleave GDI and D3D contentDont draw lines, Bit Blts, etc. on Window DCUse Direct3D GetDC on BackbufferGDI is softwareNot as performant as beforeManaged PrimariesGDI popup flicker is gone for D3D9ExGDI Desktop Buffer in swap chain,Things to do,Recreate Swap chainIf Window size Backbuffer SizeDesktop is rotatedDont mix GDI & D3D content,Scalability / Reliability,Direct3D 9.0 on Vista,Direct3D9 for Vista,All Direct3D applications benefit from new Driver ModelImproved StabilityMultiple ApplicationsDirect3D 9.0c applications just workExpose new driver model benefits to ApplicationsDirect3D9Ex Vista Desktop built on top of D3D9,Creating a Direct3D Device,pD3D = Direct3DCreate9( D3D_SDK_VERSION );pD3D-CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_DIREC3D9EX | D3DCREATE_SOFTWARE_VERTEXPROCESSING, Above is changing for Windows Vista Beta 2Direct3D10 not in Windows Vista Beta 1 but coming Beta 2,Shared Surfaces,CreateTexture CreateVolumeTexture CreateCubeTexture CreateRenderTarget,CreateVertexBuffer CreateIndexBuffer CreateDepthStencilSurface CreateOffscreenPlainSurface,Parameter HANDLE* pSharedHandle,Resource can be re-opened using this shared handle.Restrictions: Resource attributes must matchOnly creating Process can Lock surfaceNo automatic synchronization provided.Must be D3DPOOL_DEFAULT,Initialize Textures at Creation,Parameter HANDLE* pSharedHandle Pointer to textureRestrictions: Must be D3DPOOL_SYSTEMMEMFormat must match texture being created,GPU Resource Management,GPU Thread PriorityHRESULT GetGPUThreadPriority(UINT *pPriority); HRESULT SetGPUThreadPriority(UINT Priority); Resource PrioritySoft-pinningPer resource priorityResidency CheckHRESULT IDirect3DDevice9Ex:CheckResourceResidency( in, size_is ( NumResources ) IDirect3DResource9 * pResourceArray, in UINT32 NumResources);,Presentation Control,Present same frame multiple timesVBlankHRESULT WaitForVBlank(void); Frame StatisticsHRESULT GetLastPresentIndex(UINT* pLastPresentCount);HRESULT GetFrameStatistics(D3DPRESENTSTATS* pPresentationStatistics); typedef struct _D3DPRESENTSTATS UINT PresentCount; UINT PresentRefreshCount; UINT SyncRefreshCount; LARGE_INTEGER SyncQPCTime; LARGE_INTEGER SyncGPUTime; D3DPRESENTSTATS;,Subtle Windows Vista Changes,D3DPOOL_DEFAULT Resources never lostnot limited by Video memoryD3DERR_DEVICELOST - very rareExample GPU hung and has been resetD3DERR_DEVICEREMOVEDNew error codeDriver uninstalledHardware removed,Unsubtle Changes,TestCooperativeLevel deprecatedAlways returns S_OKReplaced by HRESULT CheckDeviceState(HWND hWindow); New Device StatesD3DERR_DEVICELOST D3DERR_DEVICEHUNG D3DERR_DEVICEREMOVED S_PRESENT_OCCLUDED S_PRESENT_MODE_CHANGED,When to use Direct3D9Ex,Eliminate Video Memory LimitCAD / Design applicationsResource SharingApplication uses multiple: Windows, Monitors, etc.Resource SchedulingBest Windows Vista ExperienceWilling to have multiple code pathsOr only targeting newer hardware,Things to do,Use D3D9Ex on Windows VistaUse Shared surfaces to limit memory usageAlways use D3DPOOL_DEFAULTRecreate everything on D3DDEVICE_REMOVEDDont use explicit resource managementPriority APIsUse limit GPU usage when Windowed,Better Visuals and Effects,D3D10,Direct3D10A Tremendous Step Forward,Fundamental architecture changeA new foundation for future releases Rebuilt from the ground-up Based on your feedbackIn collaboration with the IHVsNew hardware pipeline and software stack,Common operations refactored into a single DLL, isolated from rapid innovation on the 3D engineEnables resource sharing between Direct3D10 and future APIs,DXGIDirectX Graphics Infrastructure,Guaranteed Feature SetStrictly-defined, consistent behavior across hardwareNew Pipeline Stages and Primitive typesInput AssemblerGeometry ShaderCommon Shader CoresStream OutputNew resource types and formatsUbiquity of resource access,Overview: The New Hardware Pipeline,Resource Types And “Views”Ubiquity of Resource Usage,Create multiple “views” of a base resource for usage at different points in the pipelinePipeline OutputRender TargetandShader Resource InputTextureand,Geometry ShaderPer-Primitive Operations,Operates on entire primitives with adjacencyMaterial selection/setup to reduce # of draw() callsSet up barycentrics to exceed # of interpolatorsCompute edge lengthsCompute plane equationsCompute silhouette edges,GS Inputs:,Single-Pass Render-to-Cubemap,Geometry Shader,ID3D10ShaderResourceView:GenMips(),Single Pass Render-To-Cubemap,Stream Output,Writes GS Output to one or more buffersDrawAuto() to draw streamed-out data of variable size without CPU interventionUses:Intra-frame re-use Skin/morph once, render manyInter-frame re-use Iterative/procedural geometry processingAll-GPU parti
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年大学护理(妇产科护理知识)试题及答案
- 2025年本科康复工程(康复辅助器具设计)试题及答案
- 2025年高职第二学年(城市轨道交通行车调度)调度指挥阶段测试题及答案
- 2025年中职(幼儿健康管理专业)幼儿传染病预防试题及答案
- 2025年中职酒店管理与数字化运营(酒店数字化管理)试题及答案
- 2025广东佛山市顺德区北滘镇莘村初级中学招聘临聘教师备考题库及一套参考答案详解
- 2025内蒙古政司科学技术研究院招聘备考题库及参考答案详解
- 2022-2023学年深圳光明区公明中英文学校九年级上学期期中道法试题含答案
- 2025云南昭通市文联招聘城镇公益性岗位工作人员1人备考题库(含答案详解)
- 2026昆明高新技术产业开发区管理委员会公开招聘合同聘用制工作人员备考题库(18人)及答案详解(新)
- 培养小学生的实验操作能力
- 河南省洛阳市2023-2024学年九年级第一学期期末质量检测数学试卷(人教版 含答案)
- Unit-3-Reading-and-thinking课文详解课件-高中英语人教版必修第二册
- 气动回路图与气动元件课件
- 《念奴娇 赤壁怀古》《永遇乐 京口北固亭怀古》《声声慢》默写练习 统编版高中语文必修上册
- 妇产科病史采集临床思维
- 众辰变频器z2400t-15gy-1说明书
- DB63T 393-2002草地鼠虫害、毒草调查技术规程
- 船体振动的衡准及减振方法
- 复议诉讼证据清单通用版
- 水泥混凝土路面滑模摊铺机施工工法
评论
0/150
提交评论