wined3d: Add FIXME() messages for unhandled shader bytecode UAV flags.

The new definition of WINED3D_SM5_UAV_FLAGS_MASK doesn't overlap with
WINED3D_SM4_RESOURCE_TYPE_MASK.

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-03-08 12:07:19 +01:00 committed by Alexandre Julliard
parent c4d4959e1c
commit f8723d096a
3 changed files with 16 additions and 6 deletions

View File

@ -995,6 +995,8 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
}
reg_maps->uav_resource_info[reg_idx].type = semantic->resource_type;
reg_maps->uav_resource_info[reg_idx].data_type = semantic->resource_data_type;
if (ins.flags)
FIXME("Ignoring typed UAV flags %#x.\n", ins.flags);
break;
default:
@ -1110,6 +1112,8 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
ERR("Invalid UAV resource index %u.\n", reg_idx);
break;
}
if (ins.flags)
FIXME("Ignoring raw UAV flags %#x.\n", ins.flags);
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;
@ -1731,7 +1735,8 @@ static void shader_dump_sysval_semantic(struct wined3d_string_buffer *buffer, en
}
static void shader_dump_decl_usage(struct wined3d_string_buffer *buffer,
const struct wined3d_shader_semantic *semantic, const struct wined3d_shader_version *shader_version)
const struct wined3d_shader_semantic *semantic, unsigned int flags,
const struct wined3d_shader_version *shader_version)
{
shader_addline(buffer, "dcl");
@ -1808,6 +1813,8 @@ static void shader_dump_decl_usage(struct wined3d_string_buffer *buffer,
shader_addline(buffer, "unknown");
break;
}
if (semantic->reg.reg.type == WINED3DSPR_UAV)
shader_dump_uav_flags(buffer, flags);
switch (semantic->resource_data_type)
{
case WINED3D_DATA_FLOAT:
@ -2502,7 +2509,7 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
if (ins.handler_idx == WINED3DSIH_DCL || ins.handler_idx == WINED3DSIH_DCL_UAV_TYPED)
{
shader_dump_decl_usage(&buffer, &ins.declaration.semantic, &shader_version);
shader_dump_decl_usage(&buffer, &ins.declaration.semantic, ins.flags, &shader_version);
shader_dump_ins_modifiers(&buffer, &ins.declaration.semantic.reg);
shader_addline(&buffer, " ");
shader_dump_dst_param(&buffer, &ins.declaration.semantic.reg, &shader_version);

View File

@ -67,8 +67,8 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
#define WINED3D_SM5_FP_ARRAY_SIZE_SHIFT 16
#define WINED3D_SM5_FP_TABLE_COUNT_MASK 0xffffu
#define WINED3D_SM5_UAV_FLAGS_SHIFT 11
#define WINED3D_SM5_UAV_FLAGS_MASK (0x1fffu << WINED3D_SM5_UAV_FLAGS_SHIFT)
#define WINED3D_SM5_UAV_FLAGS_SHIFT 15
#define WINED3D_SM5_UAV_FLAGS_MASK (0x1ffu << WINED3D_SM5_UAV_FLAGS_SHIFT)
#define WINED3D_SM5_SYNC_FLAGS_SHIFT 11
#define WINED3D_SM5_SYNC_FLAGS_MASK (0xffu << WINED3D_SM5_SYNC_FLAGS_SHIFT)
@ -546,6 +546,9 @@ static void shader_sm4_read_dcl_resource(struct wined3d_shader_instruction *ins,
{
ins->declaration.semantic.resource_data_type = data_type_table[data_type];
}
if (reg_data_type == WINED3D_DATA_UAV)
ins->flags = (opcode_token & WINED3D_SM5_UAV_FLAGS_MASK) >> WINED3D_SM5_UAV_FLAGS_SHIFT;
}
static void shader_sm4_read_dcl_constant_buffer(struct wined3d_shader_instruction *ins,

View File

@ -562,8 +562,8 @@ enum wined3d_shader_sync_flags
enum wined3d_shader_uav_flags
{
WINED3DSUF_GLOBALLY_COHERENT = 0x20,
WINED3DSUF_ORDER_PRESERVING_COUNTER = 0x1000,
WINED3DSUF_GLOBALLY_COHERENT = 0x2,
WINED3DSUF_ORDER_PRESERVING_COUNTER = 0x100,
};
enum wined3d_tessellator_domain