Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 2894 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[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"]Hardware information :[/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"]Windows7 Ultimate 64bit 6.1.7600[/font]

[font="Consolas"]Intel(R) HD Graphics 2000 graphics Driver Version: 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"]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]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!