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

wined3d: Handle declarations for raw buffer shader resources.

parent 9dbbb224
......@@ -9235,7 +9235,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT */ NULL,
/* WINED3DSIH_DCL_OUTPUT_SIV */ shader_glsl_nop,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ shader_glsl_nop,
/* WINED3DSIH_DCL_RESOURCE_RAW */ NULL,
/* WINED3DSIH_DCL_RESOURCE_RAW */ shader_glsl_nop,
/* WINED3DSIH_DCL_RESOURCE_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_SAMPLER */ shader_glsl_nop,
/* WINED3DSIH_DCL_STREAM */ NULL,
......
......@@ -1024,6 +1024,18 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
FIXME("Invalid instruction %#x for shader type %#x.\n",
ins.handler_idx, shader_version.type);
}
else if (ins.handler_idx == WINED3DSIH_DCL_RESOURCE_RAW)
{
unsigned int reg_idx = ins.declaration.dst.reg.idx[0].offset;
if (reg_idx >= ARRAY_SIZE(reg_maps->resource_info))
{
ERR("Invalid resource index %u.\n", reg_idx);
break;
}
reg_maps->resource_info[reg_idx].type = WINED3D_SHADER_RESOURCE_BUFFER;
reg_maps->resource_info[reg_idx].data_type = WINED3D_DATA_UINT;
reg_maps->resource_info[reg_idx].flags = WINED3D_VIEW_BUFFER_RAW;
}
else if (ins.handler_idx == WINED3DSIH_DCL_SAMPLER)
{
if (ins.flags & WINED3DSI_SAMPLER_COMPARISON_MODE)
......
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