[3/5] WineD3D: Prepare for dynamic vertex buffers

Henri Verbeet hverbeet at gmail.com
Wed Dec 16 04:33:42 CST 2009


2009/12/15 Stefan Dösinger <stefan at codeweavers.com>:
> +            /* buffer_get_sysmem can remove the BO from dynamic buffers */
No, it can't?

> @@ -540,8 +547,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
>          TRACE("Not creating a vbo because GL_ARB_vertex_buffer is not supported\n");
>      } else if(Pool == WINED3DPOOL_SYSTEMMEM) {
>          TRACE("Not creating a vbo because the vertex buffer is in system memory\n");
> -    } else if(Usage & WINED3DUSAGE_DYNAMIC) {
> -        TRACE("Not creating a vbo because the buffer has dynamic usage\n");
> +    } else if(!gl_support_dynamic_buffer(gl_info) && (Usage & WINED3DUSAGE_DYNAMIC)) {
> +        TRACE("Not creating a vbo because the buffer has dynamic usage but GL doesn't support dynamic buffers\n");
>      } else if(!(Usage & WINED3DUSAGE_OPTIMIZE) && conv) {
>          TRACE("Not creating a vbo because the fvf needs conversion, but VB optimization is disabled\n");
>      } else {
It seems to me that this and similar code in CreateIndexBuffer()
should be in buffer_init() instead.



More information about the wine-devel mailing list