Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 25 Jul 2008
Offline Last Active Sep 28 2014 06:52 AM

Topics I've Started

MSAA custom sampling pattern

27 July 2014 - 06:46 AM



Is there any method to specifically define a custom sampling pattern when using MSAA ?

Are there any plans to add such functionality to future API ?


Note: I'm aware of the two "standard" and "center" well defined patterns ("quality"),

and that the rest are vendor specific.


Note2: I'm aware of modern alternative post-processing methods for AA



Commands Recording

20 May 2014 - 12:55 AM

Hi all,

I need to serialize DX9 commands to file.


It generally works quite well, but I encountered a case which I don't really understand,

and would really appreciate your help.


In a certain game (not mine, a commercial game), there is a LockRect() called on a surface.

The surface details are:

Format	D3DFMT_A8R8G8B8 (21)	_D3DFORMAT
Usage	1	unsigned long
MultiSampleQuality	0	unsigned long
Width	1280	unsigned int
Height	720	unsigned int

However, when the LockRect() function returns, the returned pitch is 1024.
This kinda destroys all I understood about pitch :/

I thought that the pitch should be at least width * pixel_size, which in this case is (1280 * 4) = .5120, which is much higher than 1024 ...

1. As you can see, this is not a compressed format.
2. The lock flag contain only D3DLOCK_NOSYSLOCK.
Which AFAIK, apart from describing not doing a sys-lock, also means it's both read+write,
since there's no other flag.
3. The "RECT* pRect" argument in LockRect() is NULL.

Can you help me understand what is going on?


Measuring Latency [Solved]

01 January 2013 - 03:00 PM

Hi all,


I'm writing a tool to measure latency in 3d applications (mostly games).

My definition of the latency is time between:
1. First D3D command of frame N (dx is 9,10,11)

2. Actual presentation time on the GPU (imagine fullscreen, time of the actual flip)


I prefer not diving into kernel, and using only user code.


Using queries i can get:
a. CPU time of the first d3d command

b. GPU time of the present event


My question is, how to calculate a delta between those? They are obviously two different processors.


Note: assume that frequency didn't change in the middle of the test.

All i can think of is some initial synchronization phase, but it sounds a bit messy.

Any ideas will be highly appreciated =)

Fractional Viewports

18 July 2012 - 06:07 AM

I've seen that in DX11 it's allowed to provide "Fractional Viewports" :

"Direct3D 11 supports fractional viewports; the parameter types are floating-point numbers."
From the docs:

Does someone here know what is the meaning of it? and what potential usage it has?

D3DXAssembleShader for D3D11 ?

16 January 2012 - 10:06 AM

Is it possible to assemble a shader in D3D11 ? (as opposed to compiling it) ?
It was possible in D3D9, i've used it.

If not, can you offer alternative methods to do it ?
Perhaps there is a way the hlsl assembly to the D3DX11 compile function somehow?

Edit: i DO NOT have access to the shaders hlsl code.