mirror of
https://github.com/reactos/wine.git
synced 2025-01-19 10:13:01 +00:00
wined3d: Add support for appending vertex declaration elements.
This commit is contained in:
parent
a11c8758b2
commit
849149d5d3
@ -83,8 +83,6 @@ static HRESULT d3d10_input_layout_to_wined3d_declaration(const D3D10_INPUT_ELEME
|
||||
e->usage = 0;
|
||||
e->usage_idx = 0;
|
||||
|
||||
if (f->AlignedByteOffset == D3D10_APPEND_ALIGNED_ELEMENT)
|
||||
FIXME("D3D10_APPEND_ALIGNED_ELEMENT not supported\n");
|
||||
if (f->InputSlotClass != D3D10_INPUT_PER_VERTEX_DATA)
|
||||
FIXME("Ignoring input slot class (%#x)\n", f->InputSlotClass);
|
||||
if (f->InstanceDataStepRate)
|
||||
|
@ -216,6 +216,19 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (e->offset == WINED3D_APPEND_ALIGNED_ELEMENT)
|
||||
{
|
||||
if (!i)
|
||||
{
|
||||
e->offset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
struct wined3d_vertex_declaration_element *prev = &declaration->elements[i - 1];
|
||||
e->offset = (prev->offset + prev->format->byte_count + 3) & ~3;
|
||||
}
|
||||
}
|
||||
|
||||
if (e->offset & 0x3)
|
||||
{
|
||||
WARN("Declaration element %u is not 4 byte aligned(%u), returning E_FAIL.\n", i, e->offset);
|
||||
|
@ -2422,8 +2422,8 @@ struct wined3d_vertex_declaration_element
|
||||
{
|
||||
const struct wined3d_format *format;
|
||||
BOOL ffp_valid;
|
||||
WORD input_slot;
|
||||
WORD offset;
|
||||
unsigned int input_slot;
|
||||
unsigned int offset;
|
||||
UINT output_slot;
|
||||
BYTE method;
|
||||
BYTE usage;
|
||||
|
@ -1494,6 +1494,8 @@ enum wined3d_display_rotation
|
||||
#define WINED3D_SURFACE_DISCARD 0x00000002
|
||||
#define WINED3D_SURFACE_PIN_SYSMEM 0x00000004
|
||||
|
||||
#define WINED3D_APPEND_ALIGNED_ELEMENT 0xffffffff
|
||||
|
||||
struct wined3d_display_mode
|
||||
{
|
||||
UINT width;
|
||||
@ -1670,8 +1672,8 @@ struct wined3d_clip_status
|
||||
struct wined3d_vertex_element
|
||||
{
|
||||
enum wined3d_format_id format;
|
||||
WORD input_slot;
|
||||
WORD offset;
|
||||
unsigned int input_slot;
|
||||
unsigned int offset;
|
||||
UINT output_slot; /* D3D 8 & 10 */
|
||||
BYTE method;
|
||||
BYTE usage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user