Jump to content

  • Log In with Google      Sign In   
  • Create Account


Anfaenger

Member Since 19 May 2011
Offline Last Active Nov 17 2013 07:14 AM

Posts I've Made

In Topic: Shader Library design and implementation

25 May 2013 - 01:34 PM

Are there open-source implementations of stateless, 'packetized' renderers that i can learn from?

Could you give me an example of a stateless low-level graphics API? What functions should it contain?


In Topic: Shader Library design and implementation

24 May 2013 - 01:28 PM

What's the most efficient way to do redundancy checking (to avoid extraneous Direct3D API function calls for binding pipeline resources) ?

 

my goal is to minimize the low-level graphics wrapper overhead as much as possible.

(i use small integer handles everywhere instead of pointers. i decided to use 8-bit handles for all immutable render states (DepthStencil, Rasterizer, Sampler and Blend - they are created at the start) and all constant buffers (i have a fixed pool of CBs). i can only have 8 CBs/samplers bound simultaneously so i can concatenate the whole pipeline state into a few 64-bit integers and use bitwise instructions to calculate 'delta' and issue the corresponding Set* calls if needed.)


In Topic: Ray Tracing Blog & Forum

23 May 2013 - 12:43 PM

Can I somehow access the contents of the old website (ompf) ?

 

i used to admire things on that forum when i was at high school, but that was too advanced for me.

tbp's avatar was, i believe, an image of some chinese dictator, and he knew insane tricks

to squeeze the last few cycles/save memory and could easily point out other peoples' errors/inefficiencies in MMX/SSE code,

but i digress here.


In Topic: Best way to pass material parameters to shaders

14 May 2013 - 03:40 AM

1) Do you create separate immutable constant buffers (ID3D11Buffer*) for each material instance (StateGroup in your terminology from other thread) during loading?

(if i understand you correctly, material parameters defined by artists don't change at runtime so the CBs can be simply bound to slots without costly updating.)

 

2) How is your StateGroup structure defined in code?

 How do you resolve pointers to graphics resources when loading StateGroups?

 Does your low-level platform-independent graphics layer have functions like UpdateConstantBuffer(), SetConstantBuffers(), SetSamplers(), SetTextures() ?

 

mine goes like this:

 

// shader dependencies
struct rsShaderPass
{

TBuffer< HUniformBuffer > CBsItems; // handles to constant buffers
UINT16 CBsStart;

TBuffer< HSamplerState > SSsItems; // handles to sampler states
UINT16 SSsStart;

TBuffer< HShaderResource > SRsItems; // handles to shader resources
UINT16 SRsStart;  

// metadata for resolving shader dependencies (@todo: get rid of this crap)
rsShaderPassInfo	meta;

};

 

 


In Topic: Background resource loading - waiting for some item to finish

20 November 2012 - 08:50 AM

1) I need to block only in the editor mode, because the resulting code is simpler in my (small) experience:
I get a pointer and start manipulating the created mesh instance (e.g. move, rotate) or get an error screen.

2) Where can I find out more about efficient implementation of such a system (load request queue with fast access by request ids and minimum allocations) ?
Right now my queues are dynamic arrays and I perform a linear search to find requests by their ids.

3) So, your advice would be to delegate the task of managing temporary memory to the client?
(Then I'll have to think about fighting fragmentation on the client side.)

(In the background thread I'll be doing reading, decompression, pointer patching, setting external references (dependencies) to proxy objects and issuing requests to load them later.)

PARTNERS