Skip to main content
GameDev.net gamedev.net
🔒 Locked

Can NOT get valid data from GetRenderTargetData on Intel Sandy Bridge Platform

Started by yvgang2 Jan 14, 2011 at 3:06 AM 0 replies 1.9k views
Original Post
yvgang2
yvgang2
[font="Consolas"]I found a problem that D3D9 API IDirect3DDevice9::GetRenderTargetData returns D3D_OK but pDestSurface does not contain valid data actually.[/font]

[font="Consolas"] [/font]

[font="Consolas"]API declaration: [/font][font="Consolas"]http://msdn.microsoft.com/en-us/library/bb174405(v=vs.85).aspx[/font]

[font="Consolas"]HRESULT GetRenderTargetData([/font]

[font="Consolas"] [in] IDirect3DSurface9 *pRenderTarget,[/font]

[font="Consolas"] [in] IDirect3DSurface9 *pDestSurface[/font]

[font="Consolas"]);[/font]

[font="Consolas"] [/font]

[font="Consolas"] [/font]

[font="Consolas"]Hardware information :[/font]

[font="Consolas"]-------------------------------------------------------[/font]

[font="Consolas"]PC: Intel Sandy Bridge[/font]

[font="Consolas"]Platform: Digital Home[/font]

[font="Consolas"]Platform Codename: Sugar Bay Gaming/Media Beta[/font]

[font="Consolas"]CPU/Chipset Codename: SandyBridge C0/ Cougar Point B0[/font]

[font="Consolas"]Board Codename: Los Lunas SCPT CRB Fab A[/font]

[font="Consolas"]System Serial#: IZLODP0312025[/font]

[font="Consolas"]Product Name: DHSB1SGMB[/font]

[font="Consolas"] [/font]

[font="Consolas"]Monitor: [/font]

[font="Consolas"]At least 3 monitors have been tested including Acer GD245HQ(HDMI), Dell E248WFP(VGA) and Philips244E(VGA).[/font]

[font="Consolas"]One monitor is connected with Intel Sandy Bridge at one time.[/font]

[font="Consolas"] [/font]

[font="Consolas"]Software information :[/font]

[font="Consolas"]-------------------------------------------------------[/font]

[font="Consolas"]Windows7 Ultimate 64bit 6.1.7600[/font]

[font="Consolas"]Intel(R) HD Graphics 2000 graphics Driver Version: 8.15.10.2266 64 bit[/font]

[font="Consolas"] [/font]

[font="Consolas"] [/font]

[font="Consolas"]Simplified steps to reproduce the problem:[/font]

[font="Consolas"]Right click Windows desktop -> Screen Resolution -> Change a resolution(e.g. 1920 * 1200 -> 1650 * 1050) -> click Apply button.[/font]

[font="Consolas"] [/font]

[font="Consolas"]After these operations, API GetRenderTargetData returns D3D_OK but pDestSurface does NOT contain valid data actually. [/font]

[font="Consolas"] [/font]

[font="Consolas"]Note:[/font]

[font="Consolas"]pRenderTarget is a surface which is obtained from a IDirect3DTexture9 created by CreateTexture with parameter D3DUSAGE_RENDERTARGET / D3DPOOL_DEFAULT.[/font]

[font="Consolas"]pDestSurface is a surface which is created by CreateOffscreenPlainSurface with parameter D3DPOOL_SYSTEMMEM.[/font]

[font="Consolas"]Size(1920*1080) and format(D3DFMT_A8R8G8B8) of pRenderTarget are the same as what of pDestSurface.[/font]

[font="Consolas"] [/font]

[font="Consolas"]We may make use of D3DXSaveTextureToFile to dump the data in pRenderTarget but can NOT use D3DXSaveSurfaceToFile to dump the data in pDestSurface after invoking GetRenderTargetData(GetRenderTargetData returns D3D_OK). We also tried to use pDestSurface->LockRect to observe the pixels, as a result, each pixel is 0x00000000.[/font]

[font="Consolas"] [/font]

[font="Consolas"]Any body may give me some advice or help?

Thanks a lot![/font]

yvgang2
yvgang2
BTW: The problem is only reproduced on Intel SandyBridge.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.