wined3d: Handle declarations for raw UAVs.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-02-14 13:15:09 +01:00 committed by Alexandre Julliard
parent c9630d7433
commit 10f0e70585
3 changed files with 14 additions and 1 deletions

View File

@ -9219,7 +9219,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_TGSM_RAW */ NULL,
/* WINED3DSIH_DCL_TGSM_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_THREAD_GROUP */ shader_glsl_nop,
/* WINED3DSIH_DCL_UAV_RAW */ NULL,
/* WINED3DSIH_DCL_UAV_RAW */ shader_glsl_nop,
/* WINED3DSIH_DCL_UAV_STRUCTURED */ NULL,
/* WINED3DSIH_DCL_UAV_TYPED */ shader_glsl_nop,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,

View File

@ -1045,6 +1045,18 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
ins.handler_idx, shader_version.type);
}
}
else if (ins.handler_idx == WINED3DSIH_DCL_UAV_RAW)
{
unsigned int reg_idx = ins.declaration.dst.reg.idx[0].offset;
if (reg_idx >= ARRAY_SIZE(reg_maps->uav_resource_info))
{
ERR("Invalid UAV resource index %u.\n", reg_idx);
break;
}
reg_maps->uav_resource_info[reg_idx].type = WINED3D_SHADER_RESOURCE_BUFFER;
reg_maps->uav_resource_info[reg_idx].data_type = WINED3D_DATA_UINT;
reg_maps->uav_resource_info[reg_idx].flags = WINED3D_VIEW_BUFFER_RAW;
}
else if (ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT)
{
if (shader_version.type == WINED3D_SHADER_TYPE_GEOMETRY)

View File

@ -824,6 +824,7 @@ struct wined3d_shader_resource_info
{
enum wined3d_shader_resource_type type;
enum wined3d_data_type data_type;
unsigned int flags;
};
#define WINED3D_SAMPLER_DEFAULT ~0x0u