Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 03 Jan 2000
Offline Last Active Private

Posts I've Made

In Topic: Techniques for creating underground caverns and tunnels

Today, 06:28 AM

I have never worked on something like that, but if you want it procedural, 3D perlin noise comes to mind.

In Topic: DX12 - Documentation / Tutorials?

23 September 2014 - 02:49 AM

Pretty much yes.

In fullscreen mode you may expect the rules to be bent in your favour, so things won't be swapped out of VRAM.

In Topic: DX12 - Documentation / Tutorials?

17 September 2014 - 02:26 AM

It's pretty much VirtualAlloc & VirtualFree for the GPU.

You still have to manually manage the memory yourself, flagging pages as appropriate and loading/inflating data from disk/RAM to VRAM on need.


Virtual Textures were available in hardware on 3DLabs cards 10 years ago, long before "Mega Textures" ever existed...


Doing manually allows you to predict what you'll need, and keep things compressed in RAM, that's not the case for Managed which needs you to upload everything in final format and let the system page in/out on use [which is, too late to avoid a performance hit].

In Topic: Next Generation OpenGL

12 August 2014 - 01:35 AM

I posted that a while ago somewhere else:


Have ZERO validation during rendering by using a Pipeline object encompassing ALL states. (but not pointers to buffers/textures)
Fetching an invalid (not COMMITed) page returns zero.

/* EVENT */
HEvent CreateEvent();
void WaitForEvent( HEvent );
void WaitForMultipleEvents( HEvent[], count );

/* DATA */
void* MemAlloc( CPU|GPU, size, RESERVE&|COMMIT ); //c.f. VirtualAlloc
void MemFree( address, size, RELEASE|DECOMMIT ); //c.f. VirtualFree

Descriptor* CreateBufferDesc( address, size/*, DXGI_FORMAT[], count*/ ); //{Index/Vertex/Constant/Texture}Buffer ; For DEBUG it might be useful to type buffers too.
// Surfaces need a complex Descriptor because data is transformed from CPU memory to GPU memory... (Morten Order...) ; In the case of std layouts + restrictions it wouldn't need be
Descriptor* CreateSurfaceDesc( address, {1D, 2D, 3D, CUBE}, DXGI_FORMAT, samples, width, height, depth, /*layers,*/ lod ); //reinterpret width/height/depth, add layers if 3D_ARRAY allowed

Program* CreateProgram( {Vertex, [ Hull, Tessellator², Domain, ] Geometry, Rasterizer², Fragment, DepthStencil², Blender²}, char* source );
// All items marked with "²" are states.
// Samplers are also states defined in their respective programs, and include a DXGI_FORMAT.
// Vertex Programs include the index DXGI_FORMAT, vertex buffer descriptions (inc. DXGI_FORMAT) and IB & VB[] "bindings". (For PipelineProgramDescriptors)
// Fragment Programs include all output buffers making the FrameBuffer.

Pipeline* CreatePipeline( Program[], count ); //That's the whole graphics pipeline in one object.

CommandQueue* CreateCommandQueue();
void Process( CommandQueue& queue ); // FIFO order queuing then execution.

void Show( Descriptor left, Descriptor* right, iRefresh ); //right is optional for stereoscopy. iRefresh : at which screen refresh to display it. (0=immediatly, 1=next... ; -1=next unless late already in which case immediatly)
// It does not work on a multi sampled Surface.

//Every function in here is added to the CommandQueue and doesn't execute until the CommandQueue runs after having been enqueued on the Device.

/* EVENT */
void Insert( HEvent );

/* MEMORY */
void MemSet( address, size, value );
void MemCopy( src, dst, size );
void MemCopyEx( src, dst, size, DXGI_FORMAT ); // When src is CPUmem, data is linear. When dst is GPUmem it will be optimised to native [Textures]. => src@GPUmem & dst@CPUmem means data will be turned into linear.

void Pipeline( Pipeline* );
void PipelineProgramDescriptors( Descriptor[]*, uint32_t* counts ); // 1 Descriptor[] per Pipeline's Program
// That's akin to "SetShaderResources" and "SetConstantBuffers"... functions of D3D10+, except you just provide Descriptors array for each Program.
// IB & VB[] are also set using this function. The Program specifies the array layout.
// "Framebuffer" is also specified by Descriptors

/* DRAW */
void DrawArrays( MODE, First, nVertices, nInstances, BaseInstance );
void DrawElements( MODE, First, nIndices, BaseVertex, nInstances, BaseInstance );
void DrawArraysIndirect( MODE, Descriptor ); //Buffer format : First, nVertices, nInstances, BaseInstance
void DrawElementsIndirect( MODE, Descriptor ); //Buffer format : First, nIndices, BaseVertex, nInstances, BaseInstance
// w/ First : the starting point in VB(DrawArrays), IB(DrawElements) ; BaseVertex : a constant added to each index before fetching from VB ; BaseInstance : the base instance for use in fetching instanced vertex attributes.

void Dispatch( nX, nY, nZ );
void DispatchIndirect( Descriptor ); //Buffer format : nX, nY, nZ


Shading Language: similar to CLSL I'd think.
Here are an extended version idea:
void SetPageFaultHandler( PAGEFAULTHANDLERPROC ); //Called either at each individual Page fault, or after each Show(...)

Shader Language:
-Needs access to existing Descriptors and Pipelines. (Optional access to existing CommandQueues ?)
-Needs CreateCommandQueue() & Process( CommandQueue& queue ).
-Needs all CommandQueue functions, except Insert( HEvent ).
I haven't written an application using this API yet (it wouldn't do anything anyway as it's not implemented), but I plan to in order to make sure nothing's missing.
I'd be curious to hear about other programmers ideas, and how well they think it would integrate into their engine(s), and whether it would make their lives easier...
I also suggested that for an upcoming OpenGL/ES revision when I was working for an IHV, but politics were getting in the way...
Many thanks to ATi for kicking everyone's bottom with Mantle, forcing D3D12 and OpenGL Next to get done !

In Topic: Any options for affordable ray tracing?

13 February 2014 - 12:32 PM

You also have those cards :