[1/5] WineD3D: Revert the GL usage confusion
stefan at codeweavers.com
Wed Dec 23 04:26:27 CST 2009
Am 22.12.2009 um 17:08 schrieb Roderick Colenbrander:
> On Tue, Dec 22, 2009 at 4:51 PM, Stefan Dösinger <stefan at codeweavers.com> wrote:
>> We had a discussion in wine-devel a few days ago about which GL usage is better. The red book also agrees with the GL wiki, but the GL 3.0 spec uses the confusing language the extension used.
>> In my performance testing there is no difference, which suggests that this is a rather academic issue, unless you happen to run a game that is exactly hitting your card's bus transfer limits and/or video memory limits, but not the CPU and GPU ALU performance limits.
> I'm not convinced the code should be changed back. All docs mention to
> use DYNAMIC_DRAW.
What is "all docs"? I understand the red book differently. Same for the opengl wiki. The VBO and PBO specs(which have the same wording) are ambiguous to me.
> On some implementations there might be a difference.
> I don't see a reason to change it. Did you get a response on the
> question you submitted to opengl.org?
> From what I understood the main
> difference between STREAM_DRAW and DYNAMIC_DRAW is that in case of
> dynamic, system memory which can be accessed using DMA is used and
> else this guarantee isn't given.
Where do you read that?
> In general I think even when you need conversion that just calling
> glBufferSubData or glMapBuffer + memcpy + glUnmapBuffer in combination
> with a VBO might still help a lot.
This is off-topic for this patch, but my benchmarking when I wrote the VBO code said otherwise, and I re-tested this and it still holds true, at least without APPLE_flush_buffer_range or ARB_map_sub_buffer_range. In the end it may depend on the app's behavior. If it specifies the lock ranges badly, we convert more vertices than we draw. If it specifies the lock ranges properly and uses indexed drawing, drawStridedSlow might convert vertices twice in this case.
That said, I'd rather invest time in the vertex pipeline replacement than fine-tune dynamic buffer conversion.
More information about the wine-devel