Re: [PATCH 1/8] wined3d: Introduce wined3d_rendertarget_view_clear().
On 14 March 2016 at 00:03, Józef Kucia <jkucia(a)codeweavers.com> wrote:
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- dlls/wined3d/device.c | 18 +----------------- dlls/wined3d/surface.c | 22 ++-------------------- dlls/wined3d/view.c | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 3 +++ 4 files changed, 46 insertions(+), 37 deletions(-)
I'm not sure how I feel about this change. There doesn't seem to be a particularly compelling reason to change this, although I suppose there's no strong reason not to either. I guess it depends on where you're going with this.
On Mon, Mar 14, 2016 at 1:41 PM, Henri Verbeet <hverbeet(a)gmail.com> wrote:
On 14 March 2016 at 00:03, Józef Kucia <jkucia(a)codeweavers.com> wrote:
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- dlls/wined3d/device.c | 18 +----------------- dlls/wined3d/surface.c | 22 ++-------------------- dlls/wined3d/view.c | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 3 +++ 4 files changed, 46 insertions(+), 37 deletions(-)
I'm not sure how I feel about this change. There doesn't seem to be a particularly compelling reason to change this, although I suppose there's no strong reason not to either. I guess it depends on where you're going with this.
This change allows to make surface_color_fill() static and internal to surface.c. If we want we may also get rid of surface_depth_fill() and surface_color_fill() as they are merely simple wrappers around wined3d_rendertarget_view_clear(). However, the main idea behind this change is to put the implementation of render target view clears in wined3d_rendertarget_view_clear() and call it from a wined3d_cs_op_handler for WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW. wined3d_device_clear_rendertarget_view() would just emit WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW.
On 14 March 2016 at 14:21, Józef Kucia <joseph.kucia(a)gmail.com> wrote:
This change allows to make surface_color_fill() static and internal to surface.c. If we want we may also get rid of surface_depth_fill() and surface_color_fill() as they are merely simple wrappers around wined3d_rendertarget_view_clear().
They'll likely go away one way or another in the end. E.g. the main reason surface_color_fill() still has for existing is to implement WINED3D_BLT_COLOR_FILL, but that should probably just be handled by calling wined3d_device_clear_rendertarget_view() from ddraw.
However, the main idea behind this change is to put the implementation of render target view clears in wined3d_rendertarget_view_clear() and call it from a wined3d_cs_op_handler for WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW. wined3d_device_clear_rendertarget_view() would just emit WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW. It doesn't look so complicated that it couldn't just be in the op handler. It's not clear that there's necessarily going to be a WINED3D_CS_OP_CLEAR_RENDERTARGET_VIEW though, it may just as well end up getting handled as part of WINED3D_CS_OP_CLEAR.
participants (2)
-
Henri Verbeet -
Józef Kucia