wined3d: Expose wined3d_shader_type enum and wined3d_device_*_constant_buffer methods.
Signed-off-by: Pablo Martin <pmart-wine@riseup.net> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ae023be3ee
commit
a7a2d61792
|
@ -2227,11 +2227,13 @@ struct wined3d_shader * CDECL wined3d_device_get_vertex_shader(const struct wine
|
|||
return device->state.shader[WINED3D_SHADER_TYPE_VERTEX];
|
||||
}
|
||||
|
||||
static void wined3d_device_set_constant_buffer(struct wined3d_device *device,
|
||||
void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device,
|
||||
enum wined3d_shader_type type, UINT idx, struct wined3d_buffer *buffer)
|
||||
{
|
||||
struct wined3d_buffer *prev;
|
||||
|
||||
TRACE("device %p, type %#x, idx %u, buffer %p.\n", device, type, idx, buffer);
|
||||
|
||||
if (idx >= MAX_CONSTANT_BUFFERS)
|
||||
{
|
||||
WARN("Invalid constant buffer index %u.\n", idx);
|
||||
|
@ -2258,9 +2260,11 @@ void CDECL wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, str
|
|||
wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_VERTEX, idx, buffer);
|
||||
}
|
||||
|
||||
static struct wined3d_buffer *wined3d_device_get_constant_buffer(const struct wined3d_device *device,
|
||||
struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wined3d_device *device,
|
||||
enum wined3d_shader_type shader_type, unsigned int idx)
|
||||
{
|
||||
TRACE("device %p, shader_type %#x, idx %u.\n", device, shader_type, idx);
|
||||
|
||||
if (idx >= MAX_CONSTANT_BUFFERS)
|
||||
{
|
||||
WARN("Invalid constant buffer index %u.\n", idx);
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
@ cdecl wined3d_device_get_clip_plane(ptr long ptr)
|
||||
@ cdecl wined3d_device_get_clip_status(ptr ptr)
|
||||
@ cdecl wined3d_device_get_compute_shader(ptr)
|
||||
@ cdecl wined3d_device_get_constant_buffer(ptr long long)
|
||||
@ cdecl wined3d_device_get_creation_parameters(ptr ptr)
|
||||
@ cdecl wined3d_device_get_cs_cb(ptr long)
|
||||
@ cdecl wined3d_device_get_cs_resource_view(ptr long)
|
||||
|
@ -137,6 +138,7 @@
|
|||
@ cdecl wined3d_device_set_clip_plane(ptr long ptr)
|
||||
@ cdecl wined3d_device_set_clip_status(ptr ptr)
|
||||
@ cdecl wined3d_device_set_compute_shader(ptr ptr)
|
||||
@ cdecl wined3d_device_set_constant_buffer(ptr long long ptr)
|
||||
@ cdecl wined3d_device_set_cs_cb(ptr long ptr)
|
||||
@ cdecl wined3d_device_set_cs_resource_view(ptr long ptr)
|
||||
@ cdecl wined3d_device_set_cs_sampler(ptr long ptr)
|
||||
|
|
|
@ -926,20 +926,6 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
|
|||
WINED3DSIH_TABLE_SIZE
|
||||
};
|
||||
|
||||
enum wined3d_shader_type
|
||||
{
|
||||
WINED3D_SHADER_TYPE_PIXEL,
|
||||
WINED3D_SHADER_TYPE_VERTEX,
|
||||
WINED3D_SHADER_TYPE_GEOMETRY,
|
||||
WINED3D_SHADER_TYPE_HULL,
|
||||
WINED3D_SHADER_TYPE_DOMAIN,
|
||||
WINED3D_SHADER_TYPE_GRAPHICS_COUNT,
|
||||
|
||||
WINED3D_SHADER_TYPE_COMPUTE = WINED3D_SHADER_TYPE_GRAPHICS_COUNT,
|
||||
WINED3D_SHADER_TYPE_COUNT,
|
||||
WINED3D_SHADER_TYPE_INVALID = WINED3D_SHADER_TYPE_COUNT,
|
||||
};
|
||||
|
||||
struct wined3d_shader_version
|
||||
{
|
||||
enum wined3d_shader_type type;
|
||||
|
|
|
@ -843,6 +843,20 @@ enum wined3d_shader_byte_code_format
|
|||
WINED3D_SHADER_BYTE_CODE_FORMAT_SM4 = 1,
|
||||
};
|
||||
|
||||
enum wined3d_shader_type
|
||||
{
|
||||
WINED3D_SHADER_TYPE_PIXEL,
|
||||
WINED3D_SHADER_TYPE_VERTEX,
|
||||
WINED3D_SHADER_TYPE_GEOMETRY,
|
||||
WINED3D_SHADER_TYPE_HULL,
|
||||
WINED3D_SHADER_TYPE_DOMAIN,
|
||||
WINED3D_SHADER_TYPE_GRAPHICS_COUNT,
|
||||
|
||||
WINED3D_SHADER_TYPE_COMPUTE = WINED3D_SHADER_TYPE_GRAPHICS_COUNT,
|
||||
WINED3D_SHADER_TYPE_COUNT,
|
||||
WINED3D_SHADER_TYPE_INVALID = WINED3D_SHADER_TYPE_COUNT,
|
||||
};
|
||||
|
||||
#define WINED3DCOLORWRITEENABLE_RED (1u << 0)
|
||||
#define WINED3DCOLORWRITEENABLE_GREEN (1u << 1)
|
||||
#define WINED3DCOLORWRITEENABLE_BLUE (1u << 2)
|
||||
|
@ -2247,6 +2261,8 @@ HRESULT __cdecl wined3d_device_get_clip_plane(const struct wined3d_device *devic
|
|||
HRESULT __cdecl wined3d_device_get_clip_status(const struct wined3d_device *device,
|
||||
struct wined3d_clip_status *clip_status);
|
||||
struct wined3d_shader * __cdecl wined3d_device_get_compute_shader(const struct wined3d_device *device);
|
||||
struct wined3d_buffer * __cdecl wined3d_device_get_constant_buffer(const struct wined3d_device *device,
|
||||
enum wined3d_shader_type shader_type, unsigned int idx);
|
||||
void __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device,
|
||||
struct wined3d_device_creation_parameters *creation_parameters);
|
||||
struct wined3d_buffer * __cdecl wined3d_device_get_cs_cb(const struct wined3d_device *device, unsigned int idx);
|
||||
|
@ -2365,6 +2381,8 @@ HRESULT __cdecl wined3d_device_set_clip_plane(struct wined3d_device *device,
|
|||
HRESULT __cdecl wined3d_device_set_clip_status(struct wined3d_device *device,
|
||||
const struct wined3d_clip_status *clip_status);
|
||||
void __cdecl wined3d_device_set_compute_shader(struct wined3d_device *device, struct wined3d_shader *shader);
|
||||
void __cdecl wined3d_device_set_constant_buffer(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx,
|
||||
struct wined3d_buffer *buffer);
|
||||
void __cdecl wined3d_device_set_cs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer);
|
||||
void __cdecl wined3d_device_set_cs_resource_view(struct wined3d_device *device,
|
||||
unsigned int idx, struct wined3d_shader_resource_view *view);
|
||||
|
|
Loading…
Reference in New Issue