Commit 94c11d23 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Introduce wined3d_device_set_hull_shader().

parent d007ca28
......@@ -2654,6 +2654,23 @@ HRESULT CDECL wined3d_device_get_ps_consts_f(const struct wined3d_device *device
return WINED3D_OK;
}
void CDECL wined3d_device_set_hull_shader(struct wined3d_device *device, struct wined3d_shader *shader)
{
struct wined3d_shader *prev;
TRACE("device %p, shader %p.\n", device, shader);
prev = device->update_state->shader[WINED3D_SHADER_TYPE_HULL];
if (shader == prev)
return;
if (shader)
wined3d_shader_incref(shader);
device->update_state->shader[WINED3D_SHADER_TYPE_HULL] = shader;
wined3d_cs_emit_set_shader(device->cs, WINED3D_SHADER_TYPE_HULL, shader);
if (prev)
wined3d_shader_decref(prev);
}
void CDECL wined3d_device_set_geometry_shader(struct wined3d_device *device, struct wined3d_shader *shader)
{
struct wined3d_shader *prev = device->update_state->shader[WINED3D_SHADER_TYPE_GEOMETRY];
......
......@@ -5207,6 +5207,7 @@ const struct StateEntryTemplate misc_state_template[] =
{ STATE_BASEVERTEXINDEX, { STATE_STREAMSRC, NULL, }, WINED3D_GL_EXT_NONE },
{ STATE_FRAMEBUFFER, { STATE_FRAMEBUFFER, context_state_fb }, WINED3D_GL_EXT_NONE },
{ STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL), { STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL), context_state_drawbuf},WINED3D_GL_EXT_NONE },
{ STATE_SHADER(WINED3D_SHADER_TYPE_HULL), { STATE_SHADER(WINED3D_SHADER_TYPE_HULL), state_shader }, WINED3D_GL_EXT_NONE },
{ STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY), { STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY), state_shader }, WINED3D_GL_EXT_NONE },
{ STATE_SHADER(WINED3D_SHADER_TYPE_COMPUTE), { STATE_SHADER(WINED3D_SHADER_TYPE_COMPUTE), state_compute_shader}, WINED3D_GL_EXT_NONE },
{0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE },
......@@ -5988,6 +5989,7 @@ static void validate_state_table(struct StateEntry *state_table)
STATE_STREAMSRC,
STATE_INDEXBUFFER,
STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX),
STATE_SHADER(WINED3D_SHADER_TYPE_HULL),
STATE_SHADER(WINED3D_SHADER_TYPE_GEOMETRY),
STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL),
STATE_SHADER(WINED3D_SHADER_TYPE_COMPUTE),
......
......@@ -128,6 +128,7 @@
@ cdecl wined3d_device_set_gs_cb(ptr long ptr)
@ cdecl wined3d_device_set_gs_resource_view(ptr long ptr)
@ cdecl wined3d_device_set_gs_sampler(ptr long ptr)
@ cdecl wined3d_device_set_hull_shader(ptr ptr)
@ cdecl wined3d_device_set_index_buffer(ptr ptr long long)
@ cdecl wined3d_device_set_light(ptr long ptr)
@ cdecl wined3d_device_set_light_enable(ptr long long)
......
......@@ -2303,6 +2303,7 @@ void __cdecl wined3d_device_set_gs_cb(struct wined3d_device *device, UINT idx, s
void __cdecl wined3d_device_set_gs_resource_view(struct wined3d_device *device,
UINT idx, struct wined3d_shader_resource_view *view);
void __cdecl wined3d_device_set_gs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler);
void __cdecl wined3d_device_set_hull_shader(struct wined3d_device *device, struct wined3d_shader *shader);
void __cdecl wined3d_device_set_index_buffer(struct wined3d_device *device,
struct wined3d_buffer *index_buffer, enum wined3d_format_id format_id, unsigned int offset);
HRESULT __cdecl wined3d_device_set_light(struct wined3d_device *device,
......
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