wined3d: Introduce wined3d_device_context_get_sampler().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
455bd2ffac
commit
0a2ea1cadc
|
@ -2514,6 +2514,20 @@ void CDECL wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx
|
|||
wined3d_device_context_set_sampler(&device->cs->c, WINED3D_SHADER_TYPE_VERTEX, idx, sampler);
|
||||
}
|
||||
|
||||
struct wined3d_sampler * CDECL wined3d_device_context_get_sampler(const struct wined3d_device_context *context,
|
||||
enum wined3d_shader_type shader_type, unsigned int idx)
|
||||
{
|
||||
TRACE("context %p, shader_type %#x, idx %u.\n", context, shader_type, idx);
|
||||
|
||||
if (idx >= MAX_SAMPLER_OBJECTS)
|
||||
{
|
||||
WARN("Invalid sampler index %u.\n", idx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return context->state->sampler[shader_type][idx];
|
||||
}
|
||||
|
||||
static struct wined3d_sampler *wined3d_device_get_sampler(const struct wined3d_device *device,
|
||||
enum wined3d_shader_type shader_type, unsigned int idx)
|
||||
{
|
||||
|
|
|
@ -169,6 +169,7 @@
|
|||
@ cdecl wined3d_device_context_get_constant_buffer(ptr long long)
|
||||
@ cdecl wined3d_device_context_get_depth_stencil_state(ptr ptr)
|
||||
@ cdecl wined3d_device_context_get_rasterizer_state(ptr)
|
||||
@ cdecl wined3d_device_context_get_sampler(ptr long long)
|
||||
@ cdecl wined3d_device_context_get_scissor_rects(ptr ptr ptr)
|
||||
@ cdecl wined3d_device_context_get_shader(ptr long)
|
||||
@ cdecl wined3d_device_context_get_shader_resource_view(ptr long long)
|
||||
|
|
|
@ -2564,6 +2564,8 @@ struct wined3d_depth_stencil_state * __cdecl wined3d_device_context_get_depth_st
|
|||
const struct wined3d_device_context *context, unsigned int *stencil_ref);
|
||||
struct wined3d_rasterizer_state * __cdecl wined3d_device_context_get_rasterizer_state(
|
||||
struct wined3d_device_context *context);
|
||||
struct wined3d_sampler * __cdecl wined3d_device_context_get_sampler(const struct wined3d_device_context *context,
|
||||
enum wined3d_shader_type shader_type, unsigned int idx);
|
||||
void __cdecl wined3d_device_context_get_scissor_rects(const struct wined3d_device_context *context,
|
||||
unsigned int *rect_count, RECT *rects);
|
||||
struct wined3d_shader * __cdecl wined3d_device_context_get_shader(const struct wined3d_device_context *context,
|
||||
|
|
Loading…
Reference in New Issue