RE: [Algorithms] Advanced Vertex Buffer Caching
Brought to you by:
vexxed72
From: Rowan W. <ro...@ir...> - 2002-11-08 06:06:24
|
> 1) I suspect that I'm not fully exploting CPU-GPU parallelism. For > instance, if I wanted to support software vertex shaders I should > probably upload after every object and have the shader process just > prior to the upload. thats lookin at things from the CPU-GPU-CPU-GPU-CPU-GPU-FLIP-(repeat) kinda parallelism. What you really want is to be doing CPU-CPU-CPU-GPU-GPU-GPU-FLIP-(repeat). In this respect yer system is fine. Ultimately you'd want to transform all software stuff at the start of each frame... that way when the next frame comes round, its possible for the GPU to still be rendering stuff while you've started transforming verts for the next frame on the CPU. > 2) My scheme assumes that I'll have one giant hardware buffer for > double-buffered data and another for static data, and I flush in > between materials. Should I instead be batching by material into > separate smaller buffers? nope that doesnt matter to the hardware (thinkin PC,XBOX here). you can flush a section of a buffer with one material, then continue writing into a later section of the buffer with another material.... its all the same to the hardware. In fact one big buffer is more efficient, coz you dont have to tell the hardware to change buffers (expensive), each time you change materials. cya, rowan |