Commit 25c44924 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Implement d3d10_device_GSGetShader().

parent 9081f8af
......@@ -546,7 +546,21 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetConstantBuffers(ID3D10Device *if
static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device *iface, ID3D10GeometryShader **shader)
{
FIXME("iface %p, shader %p stub!\n", iface, shader);
struct d3d10_device *device = impl_from_ID3D10Device(iface);
struct d3d10_geometry_shader *shader_impl;
struct wined3d_shader *wined3d_shader;
TRACE("iface %p, shader %p.\n", iface, shader);
if (!(wined3d_shader = wined3d_device_get_geometry_shader(device->wined3d_device)))
{
*shader = NULL;
return;
}
shader_impl = wined3d_shader_get_parent(wined3d_shader);
*shader = &shader_impl->ID3D10GeometryShader_iface;
ID3D10GeometryShader_AddRef(*shader);
}
static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device *iface,
......
......@@ -3012,6 +3012,13 @@ void CDECL wined3d_device_set_geometry_shader(struct wined3d_device *device, str
device_invalidate_state(device, STATE_GEOMETRY_SHADER);
}
struct wined3d_shader * CDECL wined3d_device_get_geometry_shader(const struct wined3d_device *device)
{
TRACE("device %p.\n", device);
return device->stateBlock->state.geometry_shader;
}
/* Context activation is done by the caller. */
/* Do not call while under the GL lock. */
#define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
......
......@@ -64,6 +64,7 @@
@ cdecl wined3d_device_get_display_mode(ptr long ptr ptr)
@ cdecl wined3d_device_get_front_buffer_data(ptr long ptr)
@ cdecl wined3d_device_get_gamma_ramp(ptr long ptr)
@ cdecl wined3d_device_get_geometry_shader(ptr)
@ cdecl wined3d_device_get_index_buffer(ptr)
@ cdecl wined3d_device_get_light(ptr long ptr)
@ cdecl wined3d_device_get_light_enable(ptr long ptr)
......
......@@ -2124,6 +2124,7 @@ HRESULT __cdecl wined3d_device_get_front_buffer_data(const struct wined3d_device
UINT swapchain_idx, struct wined3d_surface *dst_surface);
void __cdecl wined3d_device_get_gamma_ramp(const struct wined3d_device *device,
UINT swapchain_idx, struct wined3d_gamma_ramp *ramp);
struct wined3d_shader * __cdecl wined3d_device_get_geometry_shader(const struct wined3d_device *device);
struct wined3d_buffer * __cdecl wined3d_device_get_index_buffer(const struct wined3d_device *device);
HRESULT __cdecl wined3d_device_get_light(const struct wined3d_device *device,
UINT light_idx, struct wined3d_light *light);
......
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