[2/4] wined3d: Track when the FBO is dirty.
Adam Martinson
amartinson at codeweavers.com
Thu Apr 7 10:40:08 CDT 2011
On 03/27/2011 06:45 AM, Henri Verbeet wrote:
> On 21 March 2011 21:57, Adam Martinson<amartinson at codeweavers.com> wrote:
>> @@ -2102,6 +2121,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
>> if (rt_count< context->gl_info->limits.buffers)
>> memset(context->blit_targets + rt_count, 0, (context->gl_info->limits.buffers - rt_count) * sizeof(*rts));
>> context_apply_fbo_state(context, GL_FRAMEBUFFER, rt_count, context->blit_targets, depth_stencil, SFLAG_INTEXTURE);
>> + context->device_fbo = context->current_fbo;
> You can't do that.
>
>> @@ -4801,6 +4801,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD rect
>> }
>>
>> device_get_draw_rect(device,&draw_rect);
>> + IWineD3DDeviceImpl_MarkFBODirty(device);
> What is this for?
>
>> +static inline void IWineD3DDeviceImpl_MarkFBODirty(IWineD3DDeviceImpl *This)
> This doesn't need to be in wined3d_private.h, it's only used from device.c.
>
>> + int i;
>> + for (i = 0; i< This->numContexts; ++i)
> numContexts is unsigned.
>
> What would happen when the current draw fbo entry would get evicted
> from the cache? Also, while the patch avoids redundant lookups for
> draws, it doesn't do a lot for clears. Is that intentional because
> it's not worth it, or is there a different reason for that?
I think I've addressed all of these... attached try #2.
More information about the wine-devel
mailing list