Commit 9c907997 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Rename d3d10_buffer to d3d_buffer.

parent 3f5d0fab
......@@ -24,9 +24,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
static inline struct d3d10_buffer *impl_from_ID3D10Buffer(ID3D10Buffer *iface)
static inline struct d3d_buffer *impl_from_ID3D10Buffer(ID3D10Buffer *iface)
{
return CONTAINING_RECORD(iface, struct d3d10_buffer, ID3D10Buffer_iface);
return CONTAINING_RECORD(iface, struct d3d_buffer, ID3D10Buffer_iface);
}
/* IUnknown methods */
......@@ -53,7 +53,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_buffer_QueryInterface(ID3D10Buffer *iface
static ULONG STDMETHODCALLTYPE d3d10_buffer_AddRef(ID3D10Buffer *iface)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
ULONG refcount = InterlockedIncrement(&buffer->refcount);
TRACE("%p increasing refcount to %u.\n", buffer, refcount);
......@@ -71,7 +71,7 @@ static ULONG STDMETHODCALLTYPE d3d10_buffer_AddRef(ID3D10Buffer *iface)
static ULONG STDMETHODCALLTYPE d3d10_buffer_Release(ID3D10Buffer *iface)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
ULONG refcount = InterlockedDecrement(&buffer->refcount);
TRACE("%p decreasing refcount to %u.\n", buffer, refcount);
......@@ -95,7 +95,7 @@ static ULONG STDMETHODCALLTYPE d3d10_buffer_Release(ID3D10Buffer *iface)
static void STDMETHODCALLTYPE d3d10_buffer_GetDevice(ID3D10Buffer *iface, ID3D10Device **device)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
TRACE("iface %p, device %p.\n", iface, device);
......@@ -106,7 +106,7 @@ static void STDMETHODCALLTYPE d3d10_buffer_GetDevice(ID3D10Buffer *iface, ID3D10
static HRESULT STDMETHODCALLTYPE d3d10_buffer_GetPrivateData(ID3D10Buffer *iface,
REFGUID guid, UINT *data_size, void *data)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n",
iface, debugstr_guid(guid), data_size, data);
......@@ -117,7 +117,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_buffer_GetPrivateData(ID3D10Buffer *iface
static HRESULT STDMETHODCALLTYPE d3d10_buffer_SetPrivateData(ID3D10Buffer *iface,
REFGUID guid, UINT data_size, const void *data)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n",
iface, debugstr_guid(guid), data_size, data);
......@@ -128,7 +128,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_buffer_SetPrivateData(ID3D10Buffer *iface
static HRESULT STDMETHODCALLTYPE d3d10_buffer_SetPrivateDataInterface(ID3D10Buffer *iface,
REFGUID guid, const IUnknown *data)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
......@@ -160,7 +160,7 @@ static UINT STDMETHODCALLTYPE d3d10_buffer_GetEvictionPriority(ID3D10Buffer *ifa
static HRESULT STDMETHODCALLTYPE d3d10_buffer_Map(ID3D10Buffer *iface, D3D10_MAP map_type, UINT map_flags, void **data)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
HRESULT hr;
TRACE("iface %p, map_type %u, map_flags %#x, data %p.\n", iface, map_type, map_flags, data);
......@@ -178,7 +178,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_buffer_Map(ID3D10Buffer *iface, D3D10_MAP
static void STDMETHODCALLTYPE d3d10_buffer_Unmap(ID3D10Buffer *iface)
{
struct d3d10_buffer *buffer = impl_from_ID3D10Buffer(iface);
struct d3d_buffer *buffer = impl_from_ID3D10Buffer(iface);
TRACE("iface %p.\n", iface);
......@@ -213,17 +213,17 @@ static const struct ID3D10BufferVtbl d3d10_buffer_vtbl =
d3d10_buffer_GetDesc,
};
struct d3d10_buffer *unsafe_impl_from_ID3D10Buffer(ID3D10Buffer *iface)
struct d3d_buffer *unsafe_impl_from_ID3D10Buffer(ID3D10Buffer *iface)
{
if (!iface)
return NULL;
assert(iface->lpVtbl == &d3d10_buffer_vtbl);
return CONTAINING_RECORD(iface, struct d3d10_buffer, ID3D10Buffer_iface);
return CONTAINING_RECORD(iface, struct d3d_buffer, ID3D10Buffer_iface);
}
static void STDMETHODCALLTYPE d3d10_buffer_wined3d_object_released(void *parent)
{
struct d3d10_buffer *buffer = parent;
struct d3d_buffer *buffer = parent;
wined3d_private_store_cleanup(&buffer->private_store);
HeapFree(GetProcessHeap(), 0, parent);
......@@ -234,7 +234,7 @@ static const struct wined3d_parent_ops d3d10_buffer_wined3d_parent_ops =
d3d10_buffer_wined3d_object_released,
};
HRESULT d3d10_buffer_init(struct d3d10_buffer *buffer, struct d3d_device *device,
HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *device,
const D3D10_BUFFER_DESC *desc, const D3D10_SUBRESOURCE_DATA *data)
{
struct wined3d_buffer_desc wined3d_desc;
......
......@@ -134,7 +134,7 @@ HRESULT d3d_texture3d_create(struct d3d_device *device, const D3D11_TEXTURE3D_DE
const D3D11_SUBRESOURCE_DATA *data, struct d3d_texture3d **texture) DECLSPEC_HIDDEN;
/* ID3D10Buffer */
struct d3d10_buffer
struct d3d_buffer
{
ID3D10Buffer ID3D10Buffer_iface;
LONG refcount;
......@@ -144,9 +144,9 @@ struct d3d10_buffer
ID3D10Device1 *device;
};
HRESULT d3d10_buffer_init(struct d3d10_buffer *buffer, struct d3d_device *device,
HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *device,
const D3D10_BUFFER_DESC *desc, const D3D10_SUBRESOURCE_DATA *data) DECLSPEC_HIDDEN;
struct d3d10_buffer *unsafe_impl_from_ID3D10Buffer(ID3D10Buffer *iface) DECLSPEC_HIDDEN;
struct d3d_buffer *unsafe_impl_from_ID3D10Buffer(ID3D10Buffer *iface) DECLSPEC_HIDDEN;
/* ID3D10DepthStencilView */
struct d3d10_depthstencil_view
......
......@@ -564,7 +564,7 @@ static void STDMETHODCALLTYPE d3d10_device_VSSetConstantBuffers(ID3D10Device1 *i
wined3d_mutex_lock();
for (i = 0; i < buffer_count; ++i)
{
struct d3d10_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
wined3d_device_set_vs_cb(device->wined3d_device, start_slot + i,
buffer ? buffer->wined3d_buffer : NULL);
......@@ -677,7 +677,7 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetConstantBuffers(ID3D10Device1 *i
wined3d_mutex_lock();
for (i = 0; i < buffer_count; ++i)
{
struct d3d10_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
wined3d_device_set_ps_cb(device->wined3d_device, start_slot + i,
buffer ? buffer->wined3d_buffer : NULL);
......@@ -711,7 +711,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device1 *ifa
wined3d_mutex_lock();
for (i = 0; i < buffer_count; ++i)
{
struct d3d10_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
wined3d_device_set_stream_source(This->wined3d_device, start_slot + i,
buffer ? buffer->wined3d_buffer : NULL, offsets[i], strides[i]);
......@@ -723,7 +723,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetIndexBuffer(ID3D10Device1 *iface
ID3D10Buffer *buffer, DXGI_FORMAT format, UINT offset)
{
struct d3d_device *This = impl_from_ID3D10Device(iface);
struct d3d10_buffer *buffer_impl = unsafe_impl_from_ID3D10Buffer(buffer);
struct d3d_buffer *buffer_impl = unsafe_impl_from_ID3D10Buffer(buffer);
TRACE("iface %p, buffer %p, format %s, offset %u.\n",
iface, buffer, debug_dxgi_format(format), offset);
......@@ -782,7 +782,7 @@ static void STDMETHODCALLTYPE d3d10_device_GSSetConstantBuffers(ID3D10Device1 *i
wined3d_mutex_lock();
for (i = 0; i < buffer_count; ++i)
{
struct d3d10_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
wined3d_device_set_gs_cb(device->wined3d_device, start_slot + i,
buffer ? buffer->wined3d_buffer : NULL);
......@@ -1017,7 +1017,7 @@ static void STDMETHODCALLTYPE d3d10_device_SOSetTargets(ID3D10Device1 *iface,
wined3d_mutex_lock();
for (i = 0; i < count; ++i)
{
struct d3d10_buffer *buffer = unsafe_impl_from_ID3D10Buffer(targets[i]);
struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(targets[i]);
wined3d_device_set_stream_output(device->wined3d_device, i,
buffer ? buffer->wined3d_buffer : NULL, offsets[i]);
......@@ -1240,7 +1240,7 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetConstantBuffers(ID3D10Device1 *i
for (i = 0; i < buffer_count; ++i)
{
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
struct d3d_buffer *buffer_impl;
if (!(wined3d_buffer = wined3d_device_get_vs_cb(device->wined3d_device, start_slot + i)))
{
......@@ -1368,7 +1368,7 @@ static void STDMETHODCALLTYPE d3d10_device_PSGetConstantBuffers(ID3D10Device1 *i
for (i = 0; i < buffer_count; ++i)
{
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
struct d3d_buffer *buffer_impl;
if (!(wined3d_buffer = wined3d_device_get_ps_cb(device->wined3d_device, start_slot + i)))
{
......@@ -1418,7 +1418,7 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetVertexBuffers(ID3D10Device1 *ifa
for (i = 0; i < buffer_count; ++i)
{
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
struct d3d_buffer *buffer_impl;
if (FAILED(wined3d_device_get_stream_source(device->wined3d_device, start_slot + i,
&wined3d_buffer, &offsets[i], &strides[i])))
......@@ -1443,7 +1443,7 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetIndexBuffer(ID3D10Device1 *iface
struct d3d_device *device = impl_from_ID3D10Device(iface);
enum wined3d_format_id wined3d_format;
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
struct d3d_buffer *buffer_impl;
TRACE("iface %p, buffer %p, format %p, offset %p.\n", iface, buffer, format, offset);
......@@ -1477,7 +1477,7 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetConstantBuffers(ID3D10Device1 *i
for (i = 0; i < buffer_count; ++i)
{
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
struct d3d_buffer *buffer_impl;
if (!(wined3d_buffer = wined3d_device_get_gs_cb(device->wined3d_device, start_slot + i)))
{
......@@ -1751,7 +1751,7 @@ static void STDMETHODCALLTYPE d3d10_device_SOGetTargets(ID3D10Device1 *iface,
for (i = 0; i < buffer_count; ++i)
{
struct wined3d_buffer *wined3d_buffer;
struct d3d10_buffer *buffer_impl;
struct d3d_buffer *buffer_impl;
if (!(wined3d_buffer = wined3d_device_get_stream_output(device->wined3d_device, i, &offsets[i])))
{
......@@ -1986,7 +1986,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBuffer(ID3D10Device1 *iface,
const D3D10_BUFFER_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Buffer **buffer)
{
struct d3d_device *This = impl_from_ID3D10Device(iface);
struct d3d10_buffer *object;
struct d3d_buffer *object;
HRESULT hr;
TRACE("iface %p, desc %p, data %p, buffer %p.\n", iface, desc, data, buffer);
......@@ -1995,7 +1995,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBuffer(ID3D10Device1 *iface,
if (!object)
return E_OUTOFMEMORY;
hr = d3d10_buffer_init(object, This, desc, data);
hr = d3d_buffer_init(object, This, desc, data);
if (FAILED(hr))
{
WARN("Failed to initialize buffer, hr %#x.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment