[PATCH v2 5/5] wined3d: Get rid of wined3d_device_begin_stateblock() and wined3d_device_end_stateblock().

Zebediah Figura z.figura12 at gmail.com
Tue Nov 26 09:57:39 CST 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/wined3d/device.c     | 51 ---------------------------------------
 dlls/wined3d/wined3d.spec |  2 --
 include/wine/wined3d.h    |  2 --
 3 files changed, 55 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5983281f932..f2d060184ba 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4091,57 +4091,6 @@ HRESULT CDECL wined3d_device_get_display_mode(const struct wined3d_device *devic
     return wined3d_swapchain_get_display_mode(swapchain, mode, rotation);
 }
 
-HRESULT CDECL wined3d_device_begin_stateblock(struct wined3d_device *device,
-        struct wined3d_stateblock **stateblock)
-{
-    struct wined3d_stateblock *object;
-    HRESULT hr;
-
-    TRACE("device %p.\n", device);
-
-    if (device->recording)
-    {
-        *stateblock = NULL;
-        return WINED3DERR_INVALIDCALL;
-    }
-
-    hr = wined3d_stateblock_create(device, WINED3D_SBT_RECORDED, &object);
-    if (FAILED(hr))
-        return hr;
-
-    device->recording = object;
-    device->update_stateblock_state = &object->stateblock_state;
-    wined3d_stateblock_incref(object);
-    *stateblock = object;
-
-    TRACE("Recording stateblock %p.\n", *stateblock);
-
-    return WINED3D_OK;
-}
-
-HRESULT CDECL wined3d_device_end_stateblock(struct wined3d_device *device)
-{
-    struct wined3d_stateblock *stateblock = device->recording;
-
-    TRACE("device %p.\n", device);
-
-    if (!device->recording)
-    {
-        WARN("Not recording.\n");
-        return WINED3DERR_INVALIDCALL;
-    }
-
-    wined3d_stateblock_init_contained_states(stateblock);
-
-    wined3d_stateblock_decref(device->recording);
-    device->recording = NULL;
-    device->update_stateblock_state = &device->stateblock_state;
-
-    TRACE("Ending stateblock %p.\n", stateblock);
-
-    return WINED3D_OK;
-}
-
 HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
 {
     /* At the moment we have no need for any functionality at the beginning
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 29bcd759264..9c05dd8e938 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -38,7 +38,6 @@
 
 @ cdecl wined3d_device_acquire_focus_window(ptr ptr)
 @ cdecl wined3d_device_begin_scene(ptr)
-@ cdecl wined3d_device_begin_stateblock(ptr ptr)
 @ cdecl wined3d_device_clear(ptr long ptr long ptr float long)
 @ cdecl wined3d_device_clear_rendertarget_view(ptr ptr ptr long ptr float long)
 @ cdecl wined3d_device_clear_unordered_access_view_uint(ptr ptr ptr)
@@ -56,7 +55,6 @@
 @ cdecl wined3d_device_draw_primitive_instanced(ptr long long long long)
 @ cdecl wined3d_device_draw_primitive_instanced_indirect(ptr ptr long)
 @ cdecl wined3d_device_end_scene(ptr)
-@ cdecl wined3d_device_end_stateblock(ptr)
 @ cdecl wined3d_device_evict_managed_resources(ptr)
 @ cdecl wined3d_device_get_available_texture_mem(ptr)
 @ cdecl wined3d_device_get_base_vertex_index(ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 37e012b979d..f455cdb979c 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2233,7 +2233,6 @@ ULONG __cdecl wined3d_buffer_incref(struct wined3d_buffer *buffer);
 
 HRESULT __cdecl wined3d_device_acquire_focus_window(struct wined3d_device *device, HWND window);
 HRESULT __cdecl wined3d_device_begin_scene(struct wined3d_device *device);
-HRESULT __cdecl wined3d_device_begin_stateblock(struct wined3d_device *device, struct wined3d_stateblock **stateblock);
 HRESULT __cdecl wined3d_device_clear(struct wined3d_device *device, DWORD rect_count, const RECT *rects, DWORD flags,
         const struct wined3d_color *color, float z, DWORD stencil);
 HRESULT __cdecl wined3d_device_clear_rendertarget_view(struct wined3d_device *device,
@@ -2269,7 +2268,6 @@ void __cdecl wined3d_device_draw_primitive_instanced(struct wined3d_device *devi
 void __cdecl wined3d_device_draw_primitive_instanced_indirect(struct wined3d_device *device,
         struct wined3d_buffer *buffer, unsigned int offset);
 HRESULT __cdecl wined3d_device_end_scene(struct wined3d_device *device);
-HRESULT __cdecl wined3d_device_end_stateblock(struct wined3d_device *device);
 void __cdecl wined3d_device_evict_managed_resources(struct wined3d_device *device);
 UINT __cdecl wined3d_device_get_available_texture_mem(const struct wined3d_device *device);
 INT __cdecl wined3d_device_get_base_vertex_index(const struct wined3d_device *device);
-- 
2.23.0




More information about the wine-devel mailing list