This goes on top of MR 320 and 345.
From: Conor McCarthy cmccarthy@codeweavers.com
The allocator is used for DXIL input/output parameter arrays. --- libs/vkd3d-shader/vkd3d_shader_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 0c3422f6..1e1b8558 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -1749,7 +1749,7 @@ static struct vkd3d_shader_param_node *shader_param_allocator_node_create( static void shader_param_allocator_init(struct vkd3d_shader_param_allocator *allocator, unsigned int count, unsigned int stride) { - allocator->count = max(count, 4); + allocator->count = max(count, MAX_REG_OUTPUT); allocator->stride = stride; allocator->head = NULL; allocator->current = NULL;
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/d3d_asm.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d-shader/d3d_asm.c index f0c386f1..b0afa0cd 100644 --- a/libs/vkd3d-shader/d3d_asm.c +++ b/libs/vkd3d-shader/d3d_asm.c @@ -1066,6 +1066,10 @@ static void shader_dump_register(struct vkd3d_d3d_asm_compiler *compiler, const shader_addline(buffer, "oStencilRef"); break;
+ case VKD3DSPR_UNDEF: + shader_addline(buffer, "undef"); + break; + default: shader_addline(buffer, "<unhandled_rtype(%#x)>", reg->type); break;
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/d3d_asm.c | 6 ++- libs/vkd3d-shader/spirv.c | 50 +++++++++++++++++++++++- libs/vkd3d-shader/vkd3d_shader_private.h | 4 ++ 3 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d-shader/d3d_asm.c index b0afa0cd..a2115a84 100644 --- a/libs/vkd3d-shader/d3d_asm.c +++ b/libs/vkd3d-shader/d3d_asm.c @@ -1070,6 +1070,10 @@ static void shader_dump_register(struct vkd3d_d3d_asm_compiler *compiler, const shader_addline(buffer, "undef"); break;
+ case VKD3DSPR_SSA: + shader_addline(buffer, "sr"); + break; + default: shader_addline(buffer, "<unhandled_rtype(%#x)>", reg->type); break; @@ -1185,7 +1189,7 @@ static void shader_dump_register(struct vkd3d_d3d_asm_compiler *compiler, const { shader_print_subscript_range(compiler, reg->idx[1].offset, reg->idx[2].offset); } - else + else if (reg->type != VKD3DSPR_SSA) { /* For descriptors in sm < 5.1 we move the reg->idx values up one slot * to normalise with 5.1. diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 95f6914a..68cf6db0 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2323,6 +2323,9 @@ struct spirv_compiler bool write_tess_geom_point_size;
struct vkd3d_string_buffer_cache string_buffers; + + uint32_t *ssa_register_ids; + unsigned int ssa_register_count; };
static bool is_in_default_phase(const struct spirv_compiler *compiler) @@ -2370,6 +2373,8 @@ static void spirv_compiler_destroy(struct spirv_compiler *compiler) shader_signature_cleanup(&compiler->output_signature); shader_signature_cleanup(&compiler->patch_constant_signature);
+ vkd3d_free(compiler->ssa_register_ids); + vkd3d_free(compiler); }
@@ -3682,6 +3687,23 @@ static uint32_t spirv_compiler_emit_load_scalar(struct spirv_compiler *compiler, return val_id; }
+static inline uint32_t spirv_compiler_get_ssa_register_id(const struct spirv_compiler *compiler, + const struct vkd3d_shader_register *reg) +{ + assert(reg->idx[0].offset < compiler->ssa_register_count); + assert(reg->idx_count == 1); + return compiler->ssa_register_ids[reg->idx[0].offset]; +} + +static uint32_t spirv_compiler_emit_load_ssa_reg(struct spirv_compiler *compiler, + const struct vkd3d_shader_register *reg, enum vkd3d_shader_component_type component_type, + unsigned int swizzle, unsigned int write_mask) +{ + uint32_t val_id = spirv_compiler_get_ssa_register_id(compiler, reg); + assert(val_id); + return val_id; +} + static uint32_t spirv_compiler_emit_load_reg(struct spirv_compiler *compiler, const struct vkd3d_shader_register *reg, DWORD swizzle, DWORD write_mask) { @@ -3701,6 +3723,10 @@ static uint32_t spirv_compiler_emit_load_reg(struct spirv_compiler *compiler,
component_count = vkd3d_write_mask_component_count(write_mask); component_type = vkd3d_component_type_from_data_type(reg->data_type); + + if (reg->type == VKD3DSPR_SSA) + return spirv_compiler_emit_load_ssa_reg(compiler, reg, component_type, swizzle, write_mask); + if (!spirv_compiler_get_register_info(compiler, reg, ®_info)) { type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count); @@ -3912,6 +3938,13 @@ static void spirv_compiler_emit_store_reg(struct spirv_compiler *compiler,
assert(!register_is_constant_or_undef(reg));
+ if (reg->type == VKD3DSPR_SSA) + { + assert(reg->idx[0].offset < compiler->ssa_register_count); + compiler->ssa_register_ids[reg->idx[0].offset] = val_id; + return; + } + if (!spirv_compiler_get_register_info(compiler, reg, ®_info)) return; spirv_compiler_emit_dereference_register(compiler, reg, ®_info); @@ -5375,6 +5408,18 @@ static void spirv_compiler_emit_temps(struct spirv_compiler *compiler, uint32_t vkd3d_spirv_end_function_stream_insertion(builder); }
+static void spirv_compiler_emit_ssas(struct spirv_compiler *compiler, unsigned int count) +{ + assert(!compiler->ssa_register_ids); + if (!(compiler->ssa_register_ids = vkd3d_calloc(count, sizeof(*compiler->ssa_register_ids)))) + { + ERR("Failed to allocate SSA register value id array, count %u.\n", count); + spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_OUT_OF_MEMORY, + "Failed to allocate SSA register value id array of count %u.", count); + } + compiler->ssa_register_count = count; +} + static void spirv_compiler_emit_dcl_indexable_temp(struct spirv_compiler *compiler, const struct vkd3d_shader_instruction *instruction) { @@ -6694,7 +6739,8 @@ static void spirv_compiler_emit_mov(struct spirv_compiler *compiler, uint32_t components[VKD3D_VEC4_SIZE]; unsigned int i, component_count;
- if (register_is_constant_or_undef(&src->reg) || dst->modifiers || src->modifiers) + if (register_is_constant_or_undef(&src->reg) || src->reg.type == VKD3DSPR_SSA || dst->reg.type == VKD3DSPR_SSA + || dst->modifiers || src->modifiers) goto general_implementation;
spirv_compiler_get_register_info(compiler, &dst->reg, &dst_reg_info); @@ -9543,6 +9589,8 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler,
if (parser->shader_desc.temp_count) spirv_compiler_emit_temps(compiler, parser->shader_desc.temp_count); + if (parser->shader_desc.ssa_count) + spirv_compiler_emit_ssas(compiler, parser->shader_desc.ssa_count);
spirv_compiler_emit_descriptor_declarations(compiler);
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index eab1c730..22645e2e 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -92,6 +92,7 @@ enum vkd3d_shader_error VKD3D_SHADER_ERROR_SPV_INVALID_DESCRIPTOR_BINDING = 2002, VKD3D_SHADER_ERROR_SPV_DESCRIPTOR_IDX_UNSUPPORTED = 2003, VKD3D_SHADER_ERROR_SPV_STENCIL_EXPORT_UNSUPPORTED = 2004, + VKD3D_SHADER_ERROR_SPV_OUT_OF_MEMORY = 2005,
VKD3D_SHADER_WARNING_SPV_INVALID_SWIZZLE = 2300,
@@ -523,6 +524,7 @@ enum vkd3d_shader_register_type VKD3DSPR_RASTERIZER, VKD3DSPR_OUTSTENCILREF, VKD3DSPR_UNDEF, + VKD3DSPR_SSA,
VKD3DSPR_COUNT,
@@ -738,6 +740,7 @@ struct vkd3d_shader_register uint64_t immconst_uint64[VKD3D_DVEC2_SIZE]; double immconst_double[VKD3D_DVEC2_SIZE]; unsigned fp_body_idx; + enum vkd3d_data_type dcl_data_type; } u; };
@@ -872,6 +875,7 @@ struct vkd3d_shader_desc struct shader_signature patch_constant_signature;
uint32_t temp_count; + unsigned int ssa_count;
struct {
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/spirv.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 68cf6db0..b104f507 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -1215,10 +1215,14 @@ static uint32_t vkd3d_spirv_build_op_function_call(struct vkd3d_spirv_builder *b SpvOpFunctionCall, result_type, function_id, arguments, argument_count); }
-static uint32_t vkd3d_spirv_build_op_undef(struct vkd3d_spirv_builder *builder, - struct vkd3d_spirv_stream *stream, uint32_t type_id) +static uint32_t vkd3d_spirv_build_op_undef(struct vkd3d_spirv_builder *builder, uint32_t type_id) { - return vkd3d_spirv_build_op_tr(builder, stream, SpvOpUndef, type_id); + return vkd3d_spirv_build_op_tr(builder, &builder->global_stream, SpvOpUndef, type_id); +} + +static uint32_t vkd3d_spirv_get_op_undef(struct vkd3d_spirv_builder *builder, uint32_t type_id) +{ + return vkd3d_spirv_build_once1(builder, SpvOpUndef, type_id, vkd3d_spirv_build_op_undef); }
static uint32_t vkd3d_spirv_build_op_access_chain(struct vkd3d_spirv_builder *builder, @@ -2855,7 +2859,7 @@ static uint32_t spirv_compiler_get_constant(struct spirv_compiler *compiler, break; default: FIXME("Unhandled component_type %#x.\n", component_type); - return vkd3d_spirv_build_op_undef(builder, &builder->global_stream, type_id); + return vkd3d_spirv_get_op_undef(builder, type_id); }
if (component_count == 1) @@ -2884,7 +2888,7 @@ static uint32_t spirv_compiler_get_constant64(struct spirv_compiler *compiler, if (component_type != VKD3D_SHADER_COMPONENT_DOUBLE) { FIXME("Unhandled component_type %#x.\n", component_type); - return vkd3d_spirv_build_op_undef(builder, &builder->global_stream, type_id); + return vkd3d_spirv_get_op_undef(builder, type_id); }
if (component_count == 1) @@ -3636,7 +3640,7 @@ static uint32_t spirv_compiler_emit_load_undef(struct spirv_compiler *compiler, assert(reg->type == VKD3DSPR_UNDEF);
type_id = vkd3d_spirv_get_type_id_for_data_type(builder, reg->data_type, component_count); - return vkd3d_spirv_build_op_undef(builder, &builder->global_stream, type_id); + return vkd3d_spirv_get_op_undef(builder, type_id); }
static uint32_t spirv_compiler_emit_load_scalar(struct spirv_compiler *compiler, @@ -3730,7 +3734,7 @@ static uint32_t spirv_compiler_emit_load_reg(struct spirv_compiler *compiler, if (!spirv_compiler_get_register_info(compiler, reg, ®_info)) { type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count); - return vkd3d_spirv_build_op_undef(builder, &builder->global_stream, type_id); + return vkd3d_spirv_get_op_undef(builder, type_id); } assert(reg_info.component_type != VKD3D_SHADER_COMPONENT_DOUBLE); spirv_compiler_emit_dereference_register(compiler, reg, ®_info);
From: Conor McCarthy cmccarthy@codeweavers.com
When DXBC contains DXIL code it uses ISG1 signatures. --- libs/vkd3d-shader/dxbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index cedc3da4..52234872 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -429,7 +429,7 @@ static int isgn_handler(const struct vkd3d_shader_dxbc_section_desc *section, { struct shader_signature *is = ctx;
- if (section->tag != TAG_ISGN) + if (section->tag != TAG_ISGN && section->tag != TAG_ISG1) return VKD3D_OK;
if (is->elements)
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/dxil.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 666d8b08..6c8d6ec5 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -296,6 +296,7 @@ struct sm6_parser size_t global_symbol_count;
struct vkd3d_shader_dst_param *output_params; + struct vkd3d_shader_dst_param *input_params;
struct sm6_function *functions; size_t function_count; @@ -2112,6 +2113,8 @@ static void sm6_parser_emit_signature(struct sm6_parser *sm6, const struct shade param = &ins->declaration.dst; }
+ /* TODO: set the interpolation mode when signatures are loaded from DXIL metadata. */ + ins->flags = (handler_idx == VKD3DSIH_DCL_INPUT_PS) ? VKD3DSIM_LINEAR_NOPERSPECTIVE : 0; *param = params[i]; } } @@ -2123,11 +2126,24 @@ static void sm6_parser_init_output_signature(struct sm6_parser *sm6, const struc sm6->output_params); }
+static void sm6_parser_init_input_signature(struct sm6_parser *sm6, const struct shader_signature *input_signature) +{ + sm6_parser_init_signature(sm6, input_signature, VKD3DSPR_INPUT, sm6->input_params); +} + static void sm6_parser_emit_output_signature(struct sm6_parser *sm6, const struct shader_signature *output_signature) { sm6_parser_emit_signature(sm6, output_signature, VKD3DSIH_DCL_OUTPUT, VKD3DSIH_DCL_OUTPUT_SIV, sm6->output_params); }
+static void sm6_parser_emit_input_signature(struct sm6_parser *sm6, const struct shader_signature *input_signature) +{ + sm6_parser_emit_signature(sm6, input_signature, + (sm6->p.shader_version.type == VKD3D_SHADER_TYPE_PIXEL) ? VKD3DSIH_DCL_INPUT_PS : VKD3DSIH_DCL_INPUT, + (sm6->p.shader_version.type == VKD3D_SHADER_TYPE_PIXEL) ? VKD3DSIH_DCL_INPUT_PS_SIV : VKD3DSIH_DCL_INPUT_SIV, + sm6->input_params); +} + static const struct sm6_value *sm6_parser_next_function_definition(struct sm6_parser *sm6) { size_t i, count = sm6->function_count; @@ -2683,6 +2699,7 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t const char *source_name, struct vkd3d_shader_message_context *message_context) { const struct shader_signature *output_signature = &sm6->p.shader_desc.output_signature; + const struct shader_signature *input_signature = &sm6->p.shader_desc.input_signature; const struct vkd3d_shader_location location = {.source_name = source_name}; uint32_t version_token, dxil_version, token_count, magic; unsigned int chunk_offset, chunk_size; @@ -2838,7 +2855,8 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t return ret; }
- if (!(sm6->output_params = shader_parser_get_dst_params(&sm6->p, output_signature->element_count))) + if (!(sm6->output_params = shader_parser_get_dst_params(&sm6->p, output_signature->element_count)) + || !(sm6->input_params = shader_parser_get_dst_params(&sm6->p, input_signature->element_count))) { ERR("Failed to allocate output parameters.\n"); vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXIL_OUT_OF_MEMORY, @@ -2877,6 +2895,7 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t }
sm6_parser_init_output_signature(sm6, output_signature); + sm6_parser_init_input_signature(sm6, input_signature);
if ((ret = sm6_parser_module_init(sm6, &sm6->root_block, 0)) < 0) { @@ -2889,13 +2908,14 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t return ret; }
- if (!sm6_parser_require_space(sm6, output_signature->element_count)) + if (!sm6_parser_require_space(sm6, output_signature->element_count + input_signature->element_count)) { vkd3d_shader_error(message_context, &location, VKD3D_SHADER_ERROR_DXIL_OUT_OF_MEMORY, "Out of memory emitting shader signature declarations."); return VKD3D_ERROR_OUT_OF_MEMORY; } sm6_parser_emit_output_signature(sm6, output_signature); + sm6_parser_emit_input_signature(sm6, input_signature);
for (i = 0; i < sm6->function_count; ++i) {
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/dxil.c | 103 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+)
diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 6c8d6ec5..a304bd97 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -141,6 +141,7 @@ enum bitcode_value_symtab_code
enum dx_intrinsic_opcode { + DX_LOAD_INPUT = 4, DX_STORE_OUTPUT = 5, };
@@ -305,6 +306,7 @@ struct sm6_parser size_t value_count; size_t value_capacity; size_t cur_max_value; + unsigned int ssa_next_id;
struct vkd3d_shader_parser p; }; @@ -1548,6 +1550,11 @@ static inline unsigned int sm6_value_get_constant_uint(const struct sm6_value *v return register_get_uint_value(&value->u.reg); }
+static inline unsigned int sm6_parser_alloc_ssa_id(struct sm6_parser *sm6) +{ + return sm6->ssa_next_id++; +} + static struct vkd3d_shader_src_param *instruction_src_params_alloc(struct vkd3d_shader_instruction *ins, unsigned int count, struct sm6_parser *sm6) { @@ -1580,6 +1587,24 @@ static struct vkd3d_shader_dst_param *instruction_dst_params_alloc(struct vkd3d_ return params; }
+static void register_init_with_id(struct vkd3d_shader_register *reg, + enum vkd3d_shader_register_type reg_type, enum vkd3d_data_type data_type, unsigned int index) +{ + shader_register_init(reg, reg_type, data_type, 1); + reg->idx[0].offset = index; +} + +static void register_init_ssa_vector(struct vkd3d_shader_register *reg, enum vkd3d_data_type data_type, + unsigned int component_count, struct sm6_parser *sm6) +{ + unsigned int id; + + id = sm6_parser_alloc_ssa_id(sm6); + register_init_with_id(reg, VKD3DSPR_SSA, data_type, id); + reg->u.dcl_data_type = data_type; + reg->immconst_type = component_count > 1 ? VKD3D_IMMCONST_VEC4 : VKD3D_IMMCONST_SCALAR; +} + static enum vkd3d_data_type vkd3d_data_type_from_sm6_type(const struct sm6_type *type) { if (type->class == TYPE_CLASS_INTEGER) @@ -1613,6 +1638,19 @@ static enum vkd3d_data_type vkd3d_data_type_from_sm6_type(const struct sm6_type return VKD3D_DATA_UINT; }
+static inline void register_init_ssa_scalar(struct vkd3d_shader_register *reg, const struct sm6_type *type, + struct sm6_parser *sm6) +{ + register_init_ssa_vector(reg, vkd3d_data_type_from_sm6_type(sm6_type_get_scalar_type(type, 0)), 1, sm6); +} + +static inline void dst_param_init(struct vkd3d_shader_dst_param *param) +{ + param->write_mask = VKD3DSP_WRITEMASK_0; + param->modifiers = 0; + param->shift = 0; +} + static inline void dst_param_init_scalar(struct vkd3d_shader_dst_param *param, unsigned int component_idx) { param->write_mask = 1u << component_idx; @@ -1620,12 +1658,25 @@ static inline void dst_param_init_scalar(struct vkd3d_shader_dst_param *param, u param->shift = 0; }
+static inline void dst_param_init_ssa_scalar(struct vkd3d_shader_dst_param *param, const struct sm6_type *type, + struct sm6_parser *sm6) +{ + dst_param_init(param); + register_init_ssa_scalar(¶m->reg, type, sm6); +} + static inline void src_param_init(struct vkd3d_shader_src_param *param) { param->swizzle = VKD3D_SHADER_SWIZZLE(X, X, X, X); param->modifiers = VKD3DSPSM_NONE; }
+static inline void src_param_init_scalar(struct vkd3d_shader_src_param *param, unsigned int component_idx) +{ + param->swizzle = vkd3d_shader_create_swizzle(component_idx, component_idx, component_idx, component_idx); + param->modifiers = VKD3DSPSM_NONE; +} + static void src_param_init_from_value(struct vkd3d_shader_src_param *param, const struct sm6_value *src) { src_param_init(param); @@ -1654,6 +1705,22 @@ static void register_address_init(struct vkd3d_shader_register *reg, const struc } }
+static void instruction_dst_param_init_ssa_scalar_component(struct vkd3d_shader_instruction *ins, + unsigned int component_idx, struct sm6_parser *sm6) +{ + struct vkd3d_shader_dst_param *param = instruction_dst_params_alloc(ins, 1, sm6); + struct sm6_value *dst = sm6_parser_get_current_value(sm6); + + dst_param_init_ssa_scalar(param, dst->type, sm6); + param->write_mask = VKD3DSP_WRITEMASK_0 << component_idx; + dst->u.reg = param->reg; +} + +static inline void instruction_dst_param_init_ssa_scalar(struct vkd3d_shader_instruction *ins, struct sm6_parser *sm6) +{ + return instruction_dst_param_init_ssa_scalar_component(ins, 0, sm6); +} + /* Recurse through the block tree while maintaining a current value count. The current * count is the sum of the global count plus all declarations within the current function. * Store into value_capacity the highest count seen. */ @@ -2166,6 +2233,38 @@ static struct sm6_block *sm6_block_create() return block; }
+static void sm6_parser_emit_dx_load_input(struct sm6_parser *sm6, struct sm6_block *code_block, + enum dx_intrinsic_opcode op, const struct sm6_value **operands, struct vkd3d_shader_instruction *ins) +{ + struct vkd3d_shader_src_param *src_param; + const struct shader_signature *signature; + unsigned int row_index, column_index; + const struct signature_element *e; + + row_index = sm6_value_get_constant_uint(operands[0]); + column_index = sm6_value_get_constant_uint(operands[2]); + + shader_instruction_init(ins, VKD3DSIH_MOV); + + signature = &sm6->p.shader_desc.input_signature; + if (row_index >= signature->element_count) + { + WARN("Invalid row index %u.\n", row_index); + vkd3d_shader_parser_error(&sm6->p, VKD3D_SHADER_ERROR_DXIL_INVALID_OPERAND, + "Invalid input row index %u.", row_index); + return; + } + e = &signature->elements[row_index]; + + src_param = instruction_src_params_alloc(ins, 1, sm6); + src_param->reg = sm6->input_params[row_index].reg; + src_param_init_scalar(src_param, column_index); + if (e->register_count > 1) + register_address_init(&src_param->reg, operands[1], 0, sm6); + + instruction_dst_param_init_ssa_scalar(ins, sm6); +} + static void sm6_parser_emit_dx_store_output(struct sm6_parser *sm6, struct sm6_block *code_block, enum dx_intrinsic_opcode op, const struct sm6_value **operands, struct vkd3d_shader_instruction *ins) { @@ -2235,6 +2334,7 @@ struct sm6_dx_opcode_info */ static const struct sm6_dx_opcode_info sm6_dx_op_table[] = { + [DX_LOAD_INPUT ] = {'o', "ii8i", sm6_parser_emit_dx_load_input}, [DX_STORE_OUTPUT ] = {'v', "ii8o", sm6_parser_emit_dx_store_output}, };
@@ -2887,6 +2987,7 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t "Out of memory allocating DXIL value array."); return VKD3D_ERROR_OUT_OF_MEMORY; } + sm6->ssa_next_id = 1;
if ((ret = sm6_parser_globals_init(sm6)) < 0) { @@ -2917,6 +3018,8 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t sm6_parser_emit_output_signature(sm6, output_signature); sm6_parser_emit_input_signature(sm6, input_signature);
+ sm6->p.shader_desc.ssa_count = sm6->ssa_next_id; + for (i = 0; i < sm6->function_count; ++i) { if (!sm6_block_emit_instructions(sm6->functions[i].blocks[0], sm6))
From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/dxil.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index a304bd97..e498d4cb 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -2534,11 +2534,11 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const struct sm6_function *function) { struct vkd3d_shader_instruction *ins; + size_t i, block_idx, block_count; const struct dxil_record *record; bool ret_found, is_terminator; struct sm6_block *code_block; struct sm6_value *dst; - size_t i, block_idx;
if (sm6->function_count) { @@ -2564,12 +2564,12 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const return VKD3D_ERROR_INVALID_SHADER; }
- if (!(function->block_count = block->records[0]->operands[0])) + if (!(block_count = block->records[0]->operands[0])) { WARN("Function contains no blocks.\n"); return VKD3D_ERROR_INVALID_SHADER; } - if (function->block_count > 1) + if (block_count > 1) { FIXME("Branched shaders are not supported yet.\n"); return VKD3D_ERROR_INVALID_SHADER; @@ -2580,6 +2580,7 @@ static enum vkd3d_result sm6_parser_function_init(struct sm6_parser *sm6, const ERR("Failed to allocate code block.\n"); return VKD3D_ERROR_OUT_OF_MEMORY; } + function->block_count = block_count; code_block = function->blocks[0];
sm6->cur_max_value = function->value_count;
From: Conor McCarthy cmccarthy@codeweavers.com
Prevents a RADV crash on pipeline creation. --- libs/vkd3d-shader/dxil.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index e498d4cb..0681beca 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -2723,6 +2723,19 @@ static enum vkd3d_result sm6_parser_module_init(struct sm6_parser *sm6, const st return VKD3D_OK; }
+static void sm6_parser_emit_thread_group(struct sm6_parser *sm6) +{ + struct vkd3d_shader_thread_group_size thread_group_size = {1, 1, 1}; + struct vkd3d_shader_instruction *ins; + + ins = sm6_parser_add_instruction(sm6, VKD3DSIH_DCL_THREAD_GROUP); + ins->declaration.thread_group_size = thread_group_size; + + FIXME("Dimensions are defaulting to 1.\n"); + + ins->declaration.thread_group_size = thread_group_size; +} + static void sm6_type_table_cleanup(struct sm6_type *types, size_t count) { size_t i; @@ -2999,6 +3012,9 @@ static enum vkd3d_result sm6_parser_init(struct sm6_parser *sm6, const uint32_t sm6_parser_init_output_signature(sm6, output_signature); sm6_parser_init_input_signature(sm6, input_signature);
+ if (version.type == VKD3D_SHADER_TYPE_COMPUTE) + sm6_parser_emit_thread_group(sm6); + if ((ret = sm6_parser_module_init(sm6, &sm6->root_block, 0)) < 0) { if (ret == VKD3D_ERROR_OUT_OF_MEMORY)
From: Conor McCarthy cmccarthy@codeweavers.com
Matching all possible combinations of keywords becomes too complex if more keywords are added. --- tests/shader_runner.c | 129 +++++++++++++++++++++--------------------- 1 file changed, 65 insertions(+), 64 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 05edf5da..65011f86 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -109,6 +109,24 @@ static bool match_string(const char *line, const char *token, const char **const return true; }
+static bool match_directive_substring(const char *line, const char *token, const char **const rest) +{ + size_t len = strlen(token); + + while (isspace(*line) || *line == ']') + ++line; + + if (strncmp(line, token, len) || !(isspace(line[len]) || line[len] == ']')) + return false; + if (rest) + { + *rest = line + len; + while (isspace(**rest)) + ++*rest; + } + return true; +} + static void parse_require_directive(struct shader_runner *runner, const char *line) { unsigned int i; @@ -809,6 +827,40 @@ static void compile_shader(struct shader_runner *runner, const char *source, siz } }
+static enum parse_state read_shader_directive(struct shader_runner *runner, enum parse_state state, const char *line, + const char *src, HRESULT *expect_hr) +{ + while (*src && *src != ']') + { + if (match_directive_substring(src, "todo", &src)) + { + if (state == STATE_SHADER_COMPUTE) + state = STATE_SHADER_COMPUTE_TODO; + else if (state == STATE_SHADER_PIXEL) + state = STATE_SHADER_PIXEL_TODO; + else + state = STATE_SHADER_VERTEX_TODO; + } + else if (match_directive_substring(src, "fail", &src)) + { + *expect_hr = E_FAIL; + } + else if (match_directive_substring(src, "notimpl", &src)) + { + *expect_hr = E_NOTIMPL; + } + else + { + fatal_error("Malformed line '%s'.\n", line); + } + } + + if (strcmp(src, "]\n")) + fatal_error("Malformed line '%s'.\n", line); + + return state; +} + void run_shader_tests(struct shader_runner *runner, const struct shader_runner_ops *ops) { size_t shader_source_size = 0, shader_source_len = 0; @@ -818,7 +870,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o unsigned int i, line_number = 0; char *shader_source = NULL; HRESULT expect_hr = S_OK; - char line[256]; + char line_buffer[256]; FILE *f;
if (!test_options.filename) @@ -833,11 +885,12 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
for (;;) { - char *ret = fgets(line, sizeof(line), f); + char *ret = fgets(line_buffer, sizeof(line_buffer), f); + const char *line = line_buffer;
++line_number;
- if (!ret || line[0] == '[') + if (!ret || *line == '[') { switch (state) { @@ -953,63 +1006,25 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o break; }
- if (line[0] == '[') + if (*line == '[') { unsigned int index;
- if (!strcmp(line, "[compute shader]\n")) + if (match_directive_substring(line, "[compute shader", &line)) { state = STATE_SHADER_COMPUTE; expect_hr = S_OK; - } - else if (!strcmp(line, "[compute shader todo]\n")) - { - state = STATE_SHADER_COMPUTE_TODO; - expect_hr = S_OK; - } - else if (!strcmp(line, "[compute shader fail]\n")) - { - state = STATE_SHADER_COMPUTE; - expect_hr = E_FAIL; - } - else if (!strcmp(line, "[compute shader fail todo]\n")) - { - state = STATE_SHADER_COMPUTE_TODO; - expect_hr = E_FAIL; + state = read_shader_directive(runner, state, line_buffer, line, &expect_hr); } else if (!strcmp(line, "[require]\n")) { state = STATE_REQUIRE; } - else if (!strcmp(line, "[pixel shader]\n")) + else if (match_directive_substring(line, "[pixel shader", &line)) { state = STATE_SHADER_PIXEL; expect_hr = S_OK; - } - else if (!strcmp(line, "[pixel shader todo]\n")) - { - state = STATE_SHADER_PIXEL_TODO; - expect_hr = S_OK; - } - else if (!strcmp(line, "[pixel shader fail]\n")) - { - state = STATE_SHADER_PIXEL; - expect_hr = E_FAIL; - } - else if (!strcmp(line, "[pixel shader fail todo]\n")) - { - state = STATE_SHADER_PIXEL_TODO; - expect_hr = E_FAIL; - } - else if (!strcmp(line, "[pixel shader notimpl]\n")) - { - state = STATE_SHADER_PIXEL; - expect_hr = E_NOTIMPL; - } - else if (!strcmp(line, "[pixel shader notimpl todo]\n")) - { - state = STATE_SHADER_PIXEL_TODO; - expect_hr = E_NOTIMPL; + state = read_shader_directive(runner, state, line_buffer, line, &expect_hr); } else if (sscanf(line, "[sampler %u]\n", &index)) { @@ -1103,25 +1118,11 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o { state = STATE_PREPROC_INVALID; } - else if (!strcmp(line, "[vertex shader]\n")) + else if (match_directive_substring(line, "[vertex shader", &line)) { state = STATE_SHADER_VERTEX; expect_hr = S_OK; - } - else if (!strcmp(line, "[vertex shader todo]\n")) - { - state = STATE_SHADER_VERTEX_TODO; - expect_hr = S_OK; - } - else if (!strcmp(line, "[vertex shader fail]\n")) - { - state = STATE_SHADER_VERTEX; - expect_hr = E_FAIL; - } - else if (!strcmp(line, "[vertex shader fail todo]\n")) - { - state = STATE_SHADER_VERTEX_TODO; - expect_hr = E_FAIL; + state = read_shader_directive(runner, state, line_buffer, line, &expect_hr); } else if (!strcmp(line, "[input layout]\n")) { @@ -1132,9 +1133,9 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o runner->input_element_count = 0; }
- vkd3d_test_push_context("Section %.*s, line %u", strlen(line) - 1, line, line_number); + vkd3d_test_push_context("Section %.*s, line %u", strlen(line_buffer) - 1, line_buffer, line_number); } - else if (line[0] != '%' && line[0] != '\n') + else if (*line != '%' && *line != '\n') { switch (state) {
From: Conor McCarthy cmccarthy@codeweavers.com
The location of dxcompiler should be set with LD_LIBRARY_PATH, PATH or WINEPATH as applicable.
A separate 'fail_tpf' decoration is needed for compilation because dxcompiler succeeds on many shaders which fail with fxc. A few tests cause dxcompiler to crash or hang, so these are avoided with a 'skip_dxil' directive. Also, 'todo_6' is used for separate checking of results. --- Makefile.am | 2 + include/dxcompiler.idl | 164 ++++++++++++++ include/vkd3d_windows.h | 6 + tests/hlsl/abs.shader_test | 4 +- tests/hlsl/all.shader_test | 14 +- tests/hlsl/any.shader_test | 36 +-- .../hlsl/arithmetic-float-uniform.shader_test | 10 +- tests/hlsl/arithmetic-int-uniform.shader_test | 14 +- tests/hlsl/arithmetic-int.shader_test | 6 +- tests/hlsl/arithmetic-uint.shader_test | 4 +- tests/hlsl/array-dimension.shader_test | 2 +- tests/hlsl/array-index-expr.shader_test | 32 +-- tests/hlsl/array-parameters.shader_test | 14 +- tests/hlsl/asfloat.shader_test | 8 +- tests/hlsl/asuint.shader_test | 8 +- tests/hlsl/attributes.shader_test | 16 +- tests/hlsl/bool-cast.shader_test | 4 +- tests/hlsl/bool-semantics.shader_test | 2 +- tests/hlsl/cast-broadcast.shader_test | 8 +- .../cast-componentwise-compatible.shader_test | 18 +- .../hlsl/cast-componentwise-equal.shader_test | 34 +-- tests/hlsl/cast-to-float.shader_test | 2 +- tests/hlsl/cast-to-half.shader_test | 2 +- tests/hlsl/cast-to-int.shader_test | 2 +- tests/hlsl/cast-to-uint.shader_test | 2 +- tests/hlsl/cbuffer.shader_test | 76 +++---- tests/hlsl/clamp.shader_test | 4 +- tests/hlsl/clip.shader_test | 8 +- tests/hlsl/combined-samplers.shader_test | 16 +- tests/hlsl/compute.shader_test | 2 +- tests/hlsl/conditional.shader_test | 12 +- tests/hlsl/const.shader_test | 4 +- tests/hlsl/cross.shader_test | 4 +- tests/hlsl/d3dcolor-to-ubyte4.shader_test | 4 +- tests/hlsl/ddxddy.shader_test | 8 +- tests/hlsl/discard.shader_test | 4 +- tests/hlsl/distance.shader_test | 2 +- tests/hlsl/dot.shader_test | 18 +- tests/hlsl/duplicate-modifiers.shader_test | 2 +- tests/hlsl/entry-point-semantics.shader_test | 40 ++-- tests/hlsl/exp.shader_test | 4 +- tests/hlsl/expr-indexing.shader_test | 14 +- tests/hlsl/floor.shader_test | 6 +- tests/hlsl/fmod.shader_test | 8 +- tests/hlsl/for.shader_test | 4 +- tests/hlsl/frac.shader_test | 2 +- tests/hlsl/function-cast.shader_test | 8 +- tests/hlsl/function-overload.shader_test | 2 +- tests/hlsl/function-return.shader_test | 34 +-- tests/hlsl/function.shader_test | 18 +- tests/hlsl/gather-offset.shader_test | 12 +- tests/hlsl/gather.shader_test | 14 +- tests/hlsl/getdimensions.shader_test | 4 +- .../initializer-implicit-array.shader_test | 30 +-- .../initializer-invalid-arg-count.shader_test | 8 +- tests/hlsl/initializer-multi.shader_test | 2 +- tests/hlsl/initializer-objects.shader_test | 8 +- tests/hlsl/intrinsic-override.shader_test | 4 +- tests/hlsl/invalid.shader_test | 68 +++--- tests/hlsl/is-front-face.shader_test | 4 +- tests/hlsl/ldexp.shader_test | 6 +- tests/hlsl/length.shader_test | 14 +- tests/hlsl/lerp.shader_test | 6 +- tests/hlsl/lit.shader_test | 20 +- tests/hlsl/load-level.shader_test | 8 +- tests/hlsl/log.shader_test | 6 +- tests/hlsl/loop.shader_test | 4 +- tests/hlsl/majority-pragma.shader_test | 32 +-- tests/hlsl/majority-syntax.shader_test | 22 +- tests/hlsl/majority-typedef.shader_test | 2 +- tests/hlsl/math.shader_test | 2 +- tests/hlsl/matrix-indexing.shader_test | 12 +- tests/hlsl/matrix-semantics.shader_test | 10 +- tests/hlsl/max.shader_test | 6 +- tests/hlsl/nested-arrays.shader_test | 4 +- tests/hlsl/nointerpolation.shader_test | 2 +- tests/hlsl/normalize.shader_test | 14 +- tests/hlsl/numeric-types.shader_test | 10 +- tests/hlsl/numthreads.shader_test | 44 ++-- tests/hlsl/object-field-offsets.shader_test | 6 +- tests/hlsl/object-parameters.shader_test | 10 +- tests/hlsl/object-references.shader_test | 22 +- tests/hlsl/pow.shader_test | 4 +- tests/hlsl/reflect.shader_test | 12 +- tests/hlsl/register-reservations.shader_test | 18 +- .../return-implicit-conversion.shader_test | 10 +- tests/hlsl/return.shader_test | 44 ++-- tests/hlsl/round.shader_test | 6 +- tests/hlsl/sample-bias.shader_test | 6 +- tests/hlsl/sample-grad.shader_test | 6 +- tests/hlsl/sample-level.shader_test | 6 +- tests/hlsl/sampler-offset.shader_test | 6 +- tests/hlsl/sampler.shader_test | 8 +- tests/hlsl/saturate.shader_test | 4 +- .../shader-interstage-interface.shader_test | 2 +- tests/hlsl/side-effects.shader_test | 2 +- tests/hlsl/sign.shader_test | 20 +- tests/hlsl/smoothstep.shader_test | 4 +- tests/hlsl/sqrt.shader_test | 4 +- tests/hlsl/state-block-syntax.shader_test | 30 +-- tests/hlsl/static-initializer.shader_test | 10 +- tests/hlsl/step.shader_test | 4 +- tests/hlsl/storage-qualifiers.shader_test | 2 +- tests/hlsl/struct-array.shader_test | 2 +- tests/hlsl/swizzle-constant-prop.shader_test | 6 +- tests/hlsl/swizzle-matrix.shader_test | 30 +-- tests/hlsl/swizzles.shader_test | 6 +- tests/hlsl/ternary.shader_test | 10 +- tests/hlsl/texture-load-offset.shader_test | 6 +- tests/hlsl/texture-load-typed.shader_test | 6 +- tests/hlsl/texture-load.shader_test | 6 +- tests/hlsl/texture-ordering.shader_test | 10 +- tests/hlsl/transpose.shader_test | 2 +- tests/hlsl/trigonometry.shader_test | 6 +- tests/hlsl/trunc.shader_test | 8 +- tests/hlsl/type-names.shader_test | 18 +- tests/hlsl/uav-load.shader_test | 2 +- tests/hlsl/uav-out-param.shader_test | 4 +- tests/hlsl/uav-rwbuffer.shader_test | 12 +- tests/hlsl/uav-rwstructuredbuffer.shader_test | 4 +- tests/hlsl/uav-rwtexture.shader_test | 46 ++-- tests/hlsl/uniform-semantics.shader_test | 4 +- .../hlsl/vector-indexing-uniform.shader_test | 2 +- tests/hlsl/vector-indexing.shader_test | 4 +- tests/hlsl/writemask-assignop-0.shader_test | 2 +- tests/hlsl/writemask-assignop-1.shader_test | 2 +- tests/shader_runner.c | 209 ++++++++++++++++-- tests/shader_runner.h | 20 +- tests/shader_runner_d3d11.c | 2 +- tests/shader_runner_d3d12.c | 39 +++- tests/shader_runner_d3d9.c | 2 +- tests/shader_runner_vulkan.c | 2 +- 132 files changed, 1096 insertions(+), 718 deletions(-) create mode 100644 include/dxcompiler.idl
diff --git a/Makefile.am b/Makefile.am index e869df1f..6ed4fde8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,7 @@ AM_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/private -I$(builddir)/incl AM_LDFLAGS = -no-undefined
widl_headers = \ + include/dxcompiler.h \ include/vkd3d_d3d12.h \ include/vkd3d_d3d12sdklayers.h \ include/vkd3d_d3dcommon.h \ @@ -306,6 +307,7 @@ EXTRA_DIST = \ libs/vkd3d-shader/preproc.y
libvkd3d_la_SOURCES = \ + include/dxcompiler.idl \ include/private/vkd3d_blob.h \ include/private/vkd3d_common.h \ include/private/vkd3d_debug.h \ diff --git a/include/dxcompiler.idl b/include/dxcompiler.idl new file mode 100644 index 00000000..cd09b046 --- /dev/null +++ b/include/dxcompiler.idl @@ -0,0 +1,164 @@ +import "vkd3d_windows.h"; +#include "vkd3d_unknown.idl" + +cpp_quote("#ifdef _WIN32") +cpp_quote("#ifndef DXC_API_IMPORT") +cpp_quote("#define DXC_API_IMPORT __declspec(dllimport)") +cpp_quote("#endif") +cpp_quote("#else") +cpp_quote("#ifndef DXC_API_IMPORT") +cpp_quote("#define DXC_API_IMPORT __attribute__ ((visibility ("default")))") +cpp_quote("#endif") +cpp_quote("#endif") +/* Strip __attribute__((ms_abi)) defined in vkd3d_windows.h as dxcompiler does not use it. */ +cpp_quote("#ifdef __x86_64__") +cpp_quote("# undef __stdcall") +cpp_quote("# define __stdcall") +cpp_quote("#endif") + +struct IDxcIncludeHandler; + +cpp_quote("DEFINE_GUID(CLSID_DxcCompiler, 0x73e22d93, 0xe6ce, 0x47f3, 0xb5, 0xbf, 0xf0, 0x66, 0x4f, 0x39, 0xc1, 0xb0);") + +[ + uuid(8ba5fb08-5195-40e2-ac58-0d989c3a0102), + object, + local, + pointer_default(unique) +] +interface IDxcBlob : IUnknown +{ + LPVOID GetBufferPointer(); + SIZE_T GetBufferSize(); +} + +[ + uuid(7241d424-2646-4191-97c0-98e96e42fc68), + object, + local, + pointer_default(unique) +] +interface IDxcBlobEncoding : IDxcBlob +{ + HRESULT GetEncoding(BOOL *pKnown, UINT32 *pCodePage); +} + +[ + uuid(3da636c9-ba71-4024-a301-30cbf125305b), + object, + local, + pointer_default(unique) +] +interface IDxcBlobUtf8 : IDxcBlobEncoding +{ + LPCSTR GetStringPointer(); + SIZE_T GetStringLength(); +} + +[ + uuid(a3f84eab-0faa-497e-a39c-ee6ed60b2d84), + object, + local, + pointer_default(unique) +] +interface IDxcBlobUtf16 : IDxcBlobEncoding +{ + LPCWSTR GetStringPointer(); + SIZE_T GetStringLength(); +} + +[ + uuid(7f61fc7d-950d-467f-b3e3-3c02fb49187c), + object, + local, + pointer_default(unique) +] +interface IDxcIncludeHandler : IUnknown +{ + HRESULT LoadSource(LPCWSTR pFilename, IDxcBlob **ppIncludeSource); +} + +typedef struct DxcBuffer { + LPCVOID Ptr; + SIZE_T Size; + UINT Encoding; +} DxcBuffer; + +typedef struct DxcDefine +{ + LPCWSTR Name; + LPCWSTR Value; +} DxcDefine; + +[ + uuid(cedb484a-d4e9-445a-b991-ca21ca157dc2), + object, + local, + pointer_default(unique) +] +interface IDxcOperationResult : IUnknown +{ + HRESULT GetStatus(HRESULT *pStatus); + + HRESULT GetResult(IDxcBlob **ppResult); + + HRESULT GetErrorBuffer(IDxcBlobEncoding **ppErrors); +} + +typedef enum DXC_OUT_KIND +{ + DXC_OUT_NONE = 0, + DXC_OUT_OBJECT = 1, + DXC_OUT_ERRORS = 2, + DXC_OUT_PDB = 3, + DXC_OUT_SHADER_HASH = 4, + DXC_OUT_DISASSEMBLY = 5, + DXC_OUT_HLSL = 6, + DXC_OUT_TEXT = 7, + DXC_OUT_REFLECTION = 8, + DXC_OUT_ROOT_SIGNATURE = 9, + DXC_OUT_EXTRA_OUTPUTS = 10, + + DXC_OUT_FORCE_DWORD = 0xFFFFFFFF +} DXC_OUT_KIND; + +[ + uuid(58346cda-dde7-4497-9461-6f87af5e0659), + object, + local, + pointer_default(unique) +] +interface IDxcResult : IDxcOperationResult +{ + BOOL HasOutput(DXC_OUT_KIND dxcOutKind); + HRESULT GetOutput(DXC_OUT_KIND dxcOutKind, + REFIID iid, void **ppvObject, IDxcBlobUtf16 **ppOutputName); + + UINT32 GetNumOutputs(); + DXC_OUT_KIND GetOutputByIndex(UINT32 Index); + DXC_OUT_KIND PrimaryOutput(); +} + +[ + uuid(228b4687-5a6a-4730-900c-9702b2203f54), + object, + local, + pointer_default(unique) +] +interface IDxcCompiler3 : IUnknown +{ + HRESULT Compile(const DxcBuffer *pSource, LPCWSTR *pArguments, UINT32 argCount, + IDxcIncludeHandler *pIncludeHandler, REFIID riid, LPVOID *ppResult); + + HRESULT Disassemble(const DxcBuffer *pObject, REFIID riid, LPVOID *ppResult); +} + + +cpp_quote("#ifndef _WIN32") +typedef const IID *REFCLSID; +cpp_quote("#endif") + +typedef HRESULT (__stdcall *DxcCreateInstanceProc)(REFCLSID rclsid, REFIID riid, LPVOID* ppv); + +cpp_quote("DXC_API_IMPORT") +HRESULT __stdcall DxcCreateInstance(REFCLSID rclsid, REFIID riid, LPVOID* ppv); diff --git a/include/vkd3d_windows.h b/include/vkd3d_windows.h index 2daa74e9..7b6b1aea 100644 --- a/include/vkd3d_windows.h +++ b/include/vkd3d_windows.h @@ -105,6 +105,12 @@ typedef wchar_t WCHAR; # endif /* VKD3D_WIN32_WCHAR */ typedef void *HANDLE;
+typedef void *LPVOID; +typedef const void *LPCVOID; + +typedef const char *LPCSTR; +typedef const WCHAR *LPCWSTR; + /* GUID */ # ifdef __WIDL__ typedef struct diff --git a/tests/hlsl/abs.shader_test b/tests/hlsl/abs.shader_test index 6fa6d1ca..121f3c37 100644 --- a/tests/hlsl/abs.shader_test +++ b/tests/hlsl/abs.shader_test @@ -6,8 +6,8 @@ float4 main(uniform float2 u) : sv_target
[test] uniform 0 float4 0.1 0.7 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.7, 0.4, 0.4) uniform 0 float4 -0.7 0.1 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.7, 0.1, 1.2, 0.4) diff --git a/tests/hlsl/all.shader_test b/tests/hlsl/all.shader_test index 7bdb0dc8..aea79f92 100644 --- a/tests/hlsl/all.shader_test +++ b/tests/hlsl/all.shader_test @@ -11,17 +11,17 @@ float4 main() : sv_target
[test] uniform 0 float4 -1.1 1.6 1.3 0.5 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[test] uniform 0 float4 0.0 1.6 1.3 0.5 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[test] uniform 0 float4 1.0 0.0 1.3 0.5 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] @@ -34,12 +34,12 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] @@ -53,11 +53,11 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 0.0 0.0 uniform 4 float4 3.0 4.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[test] uniform 0 float4 1.0 2.0 0.0 0.0 uniform 4 float4 0.0 4.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) diff --git a/tests/hlsl/any.shader_test b/tests/hlsl/any.shader_test index f2298d3a..732cb448 100644 --- a/tests/hlsl/any.shader_test +++ b/tests/hlsl/any.shader_test @@ -8,25 +8,25 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 1.0 1.0 1.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 1.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 1.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 1.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) uniform 0 float4 -1.0 -1.0 -1.0 -1.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] @@ -39,13 +39,13 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) uniform 0 float4 -1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[require] @@ -61,22 +61,22 @@ float4 main() : sv_target
[test] uniform 0 uint4 1 1 1 1 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 uint4 1 0 0 0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 uint4 0 1 0 0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 uint4 0 0 1 0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 uint4 0 0 0 1 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 uint4 0 0 0 0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] @@ -89,8 +89,8 @@ float4 main() : sv_target
[test] uniform 0 uint4 1 0 0 0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 uint4 0 0 0 0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) diff --git a/tests/hlsl/arithmetic-float-uniform.shader_test b/tests/hlsl/arithmetic-float-uniform.shader_test index 708dc270..a1148fe9 100644 --- a/tests/hlsl/arithmetic-float-uniform.shader_test +++ b/tests/hlsl/arithmetic-float-uniform.shader_test @@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 15.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (20.0, -10.0, 75.0, 0.33333333) 1
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 15.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (5.0, 5.0, -5.0, 3.0) 1
[pixel shader] @@ -40,7 +40,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (2.0, -2.0, 2.0, -2.0) 16
[pixel shader] @@ -55,7 +55,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[require] @@ -74,5 +74,5 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1e99, 1e99, 1e99, 1e99) diff --git a/tests/hlsl/arithmetic-int-uniform.shader_test b/tests/hlsl/arithmetic-int-uniform.shader_test index bd35f566..5fb8ae41 100644 --- a/tests/hlsl/arithmetic-int-uniform.shader_test +++ b/tests/hlsl/arithmetic-int-uniform.shader_test @@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 16.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (21.0, -11.0, 80.0, 0.0)
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 16.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (5.0, 5.0, -5.0, 3.0)
[pixel shader] @@ -40,7 +40,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (8.0, -8.0, -8.0, 8.0)
[pixel shader] @@ -55,7 +55,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 42.0 5.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (2.0, -2.0, 2.0, -2.0)
[pixel shader] @@ -70,7 +70,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (9.0, -9.0, -9.0, 9.0)
[pixel shader] @@ -85,7 +85,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 45.0 5.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] @@ -98,5 +98,5 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 5.0 -7.0 0.0 -10.0 -draw quad +todo_6 draw quad probe all rgba (5.0, 7.0, 0.0, 10.0) diff --git a/tests/hlsl/arithmetic-int.shader_test b/tests/hlsl/arithmetic-int.shader_test index f4c98904..3d7afa21 100644 --- a/tests/hlsl/arithmetic-int.shader_test +++ b/tests/hlsl/arithmetic-int.shader_test @@ -76,7 +76,7 @@ float4 main() : SV_TARGET draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { int x = 1; @@ -85,7 +85,7 @@ float4 main() : SV_TARGET return x / y; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { int x = 1; @@ -108,4 +108,4 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (-2147483648.0, -2147483648.0, -2147483648.0, -2147483648.0) +todo_6 probe all rgba (-2147483648.0, -2147483648.0, -2147483648.0, -2147483648.0) diff --git a/tests/hlsl/arithmetic-uint.shader_test b/tests/hlsl/arithmetic-uint.shader_test index f1801b9c..7ee2ada1 100644 --- a/tests/hlsl/arithmetic-uint.shader_test +++ b/tests/hlsl/arithmetic-uint.shader_test @@ -27,7 +27,7 @@ float4 main() : SV_TARGET draw quad probe all rgba (5.0, 5.0, 4294967296.0, 3.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { uint x = 1; @@ -36,7 +36,7 @@ float4 main() : SV_TARGET return x / y; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { uint x = 1; diff --git a/tests/hlsl/array-dimension.shader_test b/tests/hlsl/array-dimension.shader_test index 4e8bc12f..ebf93cda 100644 --- a/tests/hlsl/array-dimension.shader_test +++ b/tests/hlsl/array-dimension.shader_test @@ -14,4 +14,4 @@ float4 main() : sv_target
[test] todo draw quad -probe all rgba (0.1, 0.1, 0.2, 0.4) +todo_6 probe all rgba (0.1, 0.1, 0.2, 0.4) diff --git a/tests/hlsl/array-index-expr.shader_test b/tests/hlsl/array-index-expr.shader_test index 0a83080c..5b214f19 100644 --- a/tests/hlsl/array-index-expr.shader_test +++ b/tests/hlsl/array-index-expr.shader_test @@ -12,16 +12,16 @@ uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 0 0 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (1.0, 2.0, 3.0, 4.0) uniform 12 float4 1 0 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 12 float4 0 1 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 12 float4 1 1 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (9.0, 10.0, 11.0, 12.0)
@@ -36,16 +36,16 @@ float4 main() : SV_TARGET
[test] uniform 0 float 0 -draw quad +todo_6 draw quad probe all rgba (11.0, 11.0, 11.0, 11.0) uniform 0 float 1 -draw quad +todo_6 draw quad probe all rgba (12.0, 12.0, 12.0, 12.0) uniform 0 float 2 -draw quad +todo_6 draw quad probe all rgba (13.0, 13.0, 13.0, 13.0) uniform 0 float 3 -draw quad +todo_6 draw quad probe all rgba (14.0, 14.0, 14.0, 14.0)
@@ -61,16 +61,16 @@ float4 main() : SV_TARGET
[test] uniform 0 float 0 -draw quad +todo_6 draw quad probe all rgba (21.0, 1.0, 24.0, 0.0) uniform 0 float 1 -draw quad +todo_6 draw quad probe all rgba (22.0, 0.0, 23.0, 1.0) uniform 0 float 2 -draw quad +todo_6 draw quad probe all rgba (23.0, 1.0, 22.0, 0.0) uniform 0 float 3 -draw quad +todo_6 draw quad probe all rgba (24.0, 0.0, 21.0, 1.0)
@@ -86,14 +86,14 @@ float4 main() : sv_target
[test] uniform 0 float4 0 0 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (1.0, 2.0, 3.0, 4.0) uniform 0 float4 1 0 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 0 float4 0 1 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (5.0, 6.0, 7.0, 8.0) uniform 0 float4 1 1 0 0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (9.0, 10.0, 11.0, 12.0) diff --git a/tests/hlsl/array-parameters.shader_test b/tests/hlsl/array-parameters.shader_test index 6e866ceb..40a94ef5 100644 --- a/tests/hlsl/array-parameters.shader_test +++ b/tests/hlsl/array-parameters.shader_test @@ -16,7 +16,7 @@ draw quad probe all rgba (25.0, 25.0, 25.0, 25.0)
-[pixel shader fail] +[pixel shader fail_tpf] float fun(float a[2]) { return 0; @@ -30,7 +30,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] float fun(float a[1]) { return 0; @@ -44,7 +44,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] float fun(int a[2]) { return 0; @@ -82,7 +82,7 @@ draw quad probe all rgba (15.0, 26.0, 37.0, 48.0)
-[pixel shader fail] +[pixel shader fail_tpf] float fun(float a[2]) { return a[2]; // out of bounds. @@ -96,7 +96,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] float fun(float a[2]) { return 0; @@ -111,7 +111,7 @@ float4 main() : sv_target
% Implicit size arrays are not allowed. -[pixel shader fail] +[pixel shader fail_tpf] float fun(float a[]) { return 0; @@ -124,7 +124,7 @@ float4 main() : sv_target return fun(f); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 fun(float a[4]) { return 0; diff --git a/tests/hlsl/asfloat.shader_test b/tests/hlsl/asfloat.shader_test index 9c0d9373..73271e37 100644 --- a/tests/hlsl/asfloat.shader_test +++ b/tests/hlsl/asfloat.shader_test @@ -15,7 +15,7 @@ float4 main(uniform float f, uniform int i, uniform uint u, uniform half h) : sv
[test] uniform 0 float4 123.0 -2.0 456 0.01 -draw quad +todo_6 draw quad probe (320,240) rgba (123.0, -2.0, 456.0, 0.01)
[pixel shader] @@ -28,10 +28,10 @@ float4 main(uniform float2x2 m, uniform float4 v) : sv_target uniform 0 float4 11 12 0 0 uniform 4 float4 13 14 0 0 uniform 8 float4 20 21 22 23 -draw quad +todo_6 draw quad probe (320,240) rgba (13.0, 21.0, 0.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { bool b = true; @@ -39,7 +39,7 @@ float4 main() : sv_target return asfloat(b); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { double d = 1.0; diff --git a/tests/hlsl/asuint.shader_test b/tests/hlsl/asuint.shader_test index 633a543a..cc2acae9 100644 --- a/tests/hlsl/asuint.shader_test +++ b/tests/hlsl/asuint.shader_test @@ -16,7 +16,7 @@ float4 main(uniform float f, uniform int i, uniform uint u, uniform half h) : sv
[test] uniform 0 uint4 123 0xc0000000 456 0x7fd69345 -draw quad +todo_6 draw quad probe (320,240) rgba (123.0, 3221225472.0, 456.0, 2144768896.0)
@@ -31,11 +31,11 @@ float4 main(uniform float2x2 m, uniform float4 v) : sv_target uniform 0 uint4 11 12 0 0 uniform 4 uint4 13 14 0 0 uniform 8 uint4 20 21 22 23 -draw quad +todo_6 draw quad probe (320,240) rgba (13.0, 21.0, 0.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf]
float4 main() : sv_target { @@ -45,7 +45,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf]
float4 main() : sv_target { diff --git a/tests/hlsl/attributes.shader_test b/tests/hlsl/attributes.shader_test index cb6c2b5e..c35f4079 100644 --- a/tests/hlsl/attributes.shader_test +++ b/tests/hlsl/attributes.shader_test @@ -34,22 +34,22 @@ uniform float4 f; [numthreads(1, "one", 3 + 9, -9.8e4, -float2(1, 2), f)] float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
[numthreads()] float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
[numthreads(1,)] float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
[numthreads(f)] float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
/* Test an invalid constructor. */ [numthreads(float2(1))] @@ -67,7 +67,7 @@ uniform float4 f; [f] float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] % This is valid IDL syntax, but not HLSL. [one, two] float4 main() : sv_target { return 0; } @@ -77,12 +77,12 @@ float4 main() : sv_target { return 0; } [one][two] float4 main() : sv_target { return 0; }
-[pixel shader fail todo] +[pixel shader fail_tpf todo]
[one][one] float4 main() : sv_target { return 0; }
-[pixel shader fail todo] +[pixel shader fail_tpf todo]
[one][one(1)] float4 main() : sv_target { return 0; } @@ -112,7 +112,7 @@ static int i = 1; [three(i = 4)] float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
[one] float4 f; diff --git a/tests/hlsl/bool-cast.shader_test b/tests/hlsl/bool-cast.shader_test index 09ca12e2..a73f5ce1 100644 --- a/tests/hlsl/bool-cast.shader_test +++ b/tests/hlsl/bool-cast.shader_test @@ -30,7 +30,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 0.0 0.0 2.0 4.0 uniform 4 int4 0 1 0 10 -draw quad +todo_6 draw quad probe all rgba (0.0, 10.0, 1.0, 11.0)
@@ -44,5 +44,5 @@ float4 main() : sv_target
[test] uniform 0 uint4 0x00000001 0x00000002 0x80000000 0x00000000 -draw quad +todo_6 draw quad probe all rgba (2.0, 2.0, 2.0, 0.0) diff --git a/tests/hlsl/bool-semantics.shader_test b/tests/hlsl/bool-semantics.shader_test index bcbd9f9b..42c01515 100644 --- a/tests/hlsl/bool-semantics.shader_test +++ b/tests/hlsl/bool-semantics.shader_test @@ -49,5 +49,5 @@ float4 main(struct input i) : sv_target }
[test] -draw triangle strip 4 +todo_6 draw triangle strip 4 probe all rgba (0.0, 2.0, 2.0, 2.0) diff --git a/tests/hlsl/cast-broadcast.shader_test b/tests/hlsl/cast-broadcast.shader_test index 3ec9cd40..e66b591d 100644 --- a/tests/hlsl/cast-broadcast.shader_test +++ b/tests/hlsl/cast-broadcast.shader_test @@ -23,7 +23,7 @@ draw quad probe all rgba (84.0, 84.0, 84.0, 84.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float3 aa; @@ -37,7 +37,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float3 aa; @@ -55,7 +55,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] float4 fun(float f[7]) { return f[1]; @@ -67,7 +67,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float4 foo; diff --git a/tests/hlsl/cast-componentwise-compatible.shader_test b/tests/hlsl/cast-componentwise-compatible.shader_test index da55628b..ec0f970d 100644 --- a/tests/hlsl/cast-componentwise-compatible.shader_test +++ b/tests/hlsl/cast-componentwise-compatible.shader_test @@ -123,7 +123,7 @@ draw quad probe all rgba (3.0, 3.0, 3.0, 3.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { int2 aa; @@ -262,7 +262,7 @@ draw quad probe all rgba (41.0, 42.0, 43.0, 44.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float2 aa; @@ -301,7 +301,7 @@ draw quad probe all rgba (55.0, 56.0, 57.0, 58.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float2 aa; @@ -333,7 +333,7 @@ draw quad probe all rgba (61.0, 62.0, 63.0, 64.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float arr[5] = {1, 2, 3, 4, 5}; @@ -359,7 +359,7 @@ draw quad probe all rgba (71.0, 72.0, 73.0, 74.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 mat = {1, 2, 3, 4}; @@ -370,7 +370,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 mat = {1, 2, 3, 4}; @@ -381,7 +381,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float arr[5] = {1, 2, 3, 4, 5}; @@ -440,7 +440,7 @@ draw quad probe all rgba (11.0, 12.0, 13.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float3 aa; @@ -541,7 +541,7 @@ draw quad probe all rgba (51.0, 52.0, 53.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float4 vec = {1, 2, 3, 4}; diff --git a/tests/hlsl/cast-componentwise-equal.shader_test b/tests/hlsl/cast-componentwise-equal.shader_test index 4a25f6dd..8f94cf56 100644 --- a/tests/hlsl/cast-componentwise-equal.shader_test +++ b/tests/hlsl/cast-componentwise-equal.shader_test @@ -1,4 +1,4 @@ -[pixel shader fail] +[pixel shader fail_tpf] struct apple { float3 aa; @@ -15,7 +15,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float aa; @@ -51,10 +51,10 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (1.0, 2.0, 3.0, 1.0) +todo_6 probe all rgba (1.0, 2.0, 3.0, 1.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float3 aa; @@ -90,7 +90,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 6.0, 7.0, 8.0) +todo_6 probe all rgba (5.0, 6.0, 7.0, 8.0)
[pixel shader] @@ -121,7 +121,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (4.0, 4.0, 4.0, 4.0) +todo_6 probe all rgba (4.0, 4.0, 4.0, 4.0)
[pixel shader] @@ -155,7 +155,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 5.0, 5.0, 5.0) +todo_6 probe all rgba (5.0, 5.0, 5.0, 5.0)
[pixel shader] @@ -200,10 +200,10 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (71.0, 73.0, 73.0, 74.0) +todo_6 probe all rgba (71.0, 73.0, 73.0, 74.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float3 aa; @@ -226,7 +226,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] float main() : SV_TARGET { float arr[3] = {1, 2, 3}; @@ -237,7 +237,7 @@ float main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] float main() : SV_TARGET { float2 arr[3] = {1, 2, 3, 4, 5, 6}; @@ -248,7 +248,7 @@ float main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { int arr1[4] = {1, 2, 3, 4}; @@ -259,7 +259,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { float2x2 mat = {1, 2, 3, 4}; @@ -270,7 +270,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { float4 f = {1, 2, 3, 4}; @@ -281,7 +281,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { float arr[4] = {1, 2, 3, 4}; @@ -292,7 +292,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { float3x2 mat1 = {1, 2, 3, 4, 5, 6}; @@ -303,7 +303,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float aa; }; diff --git a/tests/hlsl/cast-to-float.shader_test b/tests/hlsl/cast-to-float.shader_test index f0910020..163955eb 100644 --- a/tests/hlsl/cast-to-float.shader_test +++ b/tests/hlsl/cast-to-float.shader_test @@ -12,7 +12,7 @@ uniform 0 int -1 uniform 1 uint 3 uniform 2 int -2 uniform 3 float 0.5 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] diff --git a/tests/hlsl/cast-to-half.shader_test b/tests/hlsl/cast-to-half.shader_test index 81d6bc5d..7ce1a387 100644 --- a/tests/hlsl/cast-to-half.shader_test +++ b/tests/hlsl/cast-to-half.shader_test @@ -13,7 +13,7 @@ uniform 0 int -1 uniform 1 uint 3 uniform 2 int -2 uniform 3 float 0.5 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] diff --git a/tests/hlsl/cast-to-int.shader_test b/tests/hlsl/cast-to-int.shader_test index fe8c79a3..e6801f25 100644 --- a/tests/hlsl/cast-to-int.shader_test +++ b/tests/hlsl/cast-to-int.shader_test @@ -19,7 +19,7 @@ uniform 0 float 2.6 uniform 1 int -2 uniform 2 int -2 uniform 3 float -3.6 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] diff --git a/tests/hlsl/cast-to-uint.shader_test b/tests/hlsl/cast-to-uint.shader_test index 4ffc041a..13cccfa8 100644 --- a/tests/hlsl/cast-to-uint.shader_test +++ b/tests/hlsl/cast-to-uint.shader_test @@ -19,7 +19,7 @@ uniform 0 float 2.6 uniform 1 int 2 uniform 2 int -2 uniform 3 float -3.6 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader] diff --git a/tests/hlsl/cbuffer.shader_test b/tests/hlsl/cbuffer.shader_test index 83397c18..1a8b3e2a 100644 --- a/tests/hlsl/cbuffer.shader_test +++ b/tests/hlsl/cbuffer.shader_test @@ -13,7 +13,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader] @@ -31,7 +31,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 3.0, 4.0)
% SM1 buffer offset allocation follows different rules than SM4. @@ -40,7 +40,7 @@ probe all rgba (1.0, 2.0, 3.0, 4.0) shader model >= 4.0
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float4 a : packoffset(c1invalid_extra_chars); @@ -72,7 +72,7 @@ uniform 0 float4 0.0 1.0 2.0 3.0 uniform 4 float4 4.0 5.0 6.0 7.0 uniform 8 float4 8.0 9.0 10.0 11.0 uniform 12 float4 12.0 13.0 14.0 15.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 2.0, 4.0, 8.0)
@@ -93,7 +93,7 @@ float4 main() : sv_target uniform 0 float4 0.0 1.0 2.0 3.0 uniform 4 float4 4.0 5.0 6.0 7.0 uniform 8 float4 8.0 9.0 10.0 11.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 4.0, 8.0, 9.0)
@@ -119,11 +119,11 @@ uniform 0 float4 0.0 1.0 2.0 3.0 uniform 4 float4 4.0 5.0 6.0 7.0 uniform 8 float4 8.0 9.0 10.0 11.0 uniform 12 float4 12.0 13.0 14.0 15.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 4.0, 5.0, 6.0)
-[pixel shader fail] +[pixel shader fail_tpf] // Elements cannot overlap if buffer is used. cbuffer buffer { @@ -168,7 +168,7 @@ float4 main() : sv_target uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 -draw quad +todo_6 draw quad probe all rgba (509, 610, 711, 812)
@@ -196,7 +196,7 @@ uniform 0 float4 0.0 1.0 2.0 3.0 uniform 4 float4 4.0 5.0 6.0 7.0 uniform 8 float4 8.0 9.0 10.0 11.0 uniform 12 float4 12.0 13.0 14.0 15.0 -draw quad +todo_6 draw quad probe all rgba (12468.0, 13509.0, 14010.0, 15011.0)
@@ -213,11 +213,11 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (2.0, 3.0, 2.0, 3.0)
-[pixel shader fail] +[pixel shader fail_tpf] // Elements must respect register boundaries. cbuffer buffer { @@ -230,7 +230,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Matrices must be aligned. cbuffer buffer { @@ -243,7 +243,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Arrays must be aligned. cbuffer buffer { @@ -256,7 +256,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Structs must be aligned. struct apple { @@ -274,7 +274,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Invalid offset on unused buffer. cbuffer buffer { @@ -287,7 +287,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Invalid offset on unused variable. cbuffer buffer { @@ -318,11 +318,11 @@ float4 main() : sv_target uniform 0 float 1.0 uniform 1 float 2.0 uniform 4 float4 5.0 6.0 7.0 8.0 -draw quad +todo_6 draw quad probe all rgba (512.0, 612.0, 712.0, 812.0)
-[pixel shader fail] +[pixel shader fail_tpf] // packoffset cannot be used unless all elements use it. cbuffer buffer { @@ -349,11 +349,11 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (3.0, 4.0, 3.0, 4.0)
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float2 c : packoffset(c0.xy); @@ -365,7 +365,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float4x4 mat : packoffset(c0._m00); @@ -377,7 +377,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float4 a : packoffset(c0._m00); @@ -389,7 +389,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float2 c : packoffset(c0.xz); @@ -402,7 +402,7 @@ float4 main() : sv_target
% packoffset cannot be used outside a constant buffer. -[pixel shader fail] +[pixel shader fail_tpf] float4 a : packoffset(c0);
float4 main() : sv_target @@ -410,7 +410,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 foo(float4 a : packoffset(c0)) { return a; @@ -421,7 +421,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 foo(float4 a) : packoffset(c0) { return a; @@ -432,7 +432,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float4 a : packoffset(c0); @@ -448,7 +448,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { struct @@ -491,12 +491,12 @@ float4 main() : sv_target uniform 0 float4 1.0 0.0 0.0 0.0 uniform 4 float4 0.0 2.0 0.0 0.0 uniform 8 float4 0.0 0.0 3.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 0.0, 4.0)
% packoffset() cannot be used to specify other types of registers -[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { sampler sam : packoffset(s0); @@ -507,7 +507,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { Texture2D tex : packoffset(t0); @@ -541,14 +541,14 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
% Samplers cannot have packoffset(), unless register() is also specified, or they are not used. % Note: In SM1 the rules are different: packoffset() is allowed for samplers, but they cannot be % used together with other numeric fields, which seems like a bug. -[pixel shader fail todo] +[pixel shader fail_tpf todo] Texture2D tex;
cbuffer buffer @@ -599,7 +599,7 @@ float4 main() : sv_target
% When packoffset is used in one field, resources are also expected to have a reservation. -[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float4 foo : packoffset(c0); @@ -611,7 +611,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float4 foo : packoffset(c0); @@ -649,7 +649,7 @@ float4 main() : sv_target }
% Using register() alone is considered manual packing for resources, so the other fields expect packoffset(). -[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float4 foo; @@ -661,7 +661,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] cbuffer buffer { float4 foo; @@ -718,5 +718,5 @@ uniform 0 float4 0.0 1.0 2.0 3.0 uniform 4 float4 4.0 5.0 6.0 7.0 uniform 8 float4 8.0 9.0 10.0 11.0 uniform 12 float4 12.0 13.0 14.0 15.0 -draw quad +todo_6 draw quad probe all rgba (124.0, 135.0, 146.0, 150.5) diff --git a/tests/hlsl/clamp.shader_test b/tests/hlsl/clamp.shader_test index 1320c3dd..93a4fce8 100644 --- a/tests/hlsl/clamp.shader_test +++ b/tests/hlsl/clamp.shader_test @@ -6,7 +6,7 @@ float4 main(uniform float3 u) : sv_target
[test] uniform 0 float4 -0.3 -0.1 0.7 0.0 -draw quad +todo_6 draw quad probe all rgba (-0.1, 0.7, -0.3, 0.3)
@@ -26,7 +26,7 @@ draw quad probe all rgba (5.5, 5.0, 4.2, 5.2)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 a = {3.1, 3.1, 3.1, 3.1}; diff --git a/tests/hlsl/clip.shader_test b/tests/hlsl/clip.shader_test index f9859e1b..63caa94d 100644 --- a/tests/hlsl/clip.shader_test +++ b/tests/hlsl/clip.shader_test @@ -9,14 +9,14 @@ float4 main() : sv_target
[test] uniform 0 float4 1 2 3 4 -draw quad +todo_6 draw quad probe all rgba (1, 2, 3, 4) uniform 0 float4 9 8 7 6 -draw quad +todo_6 draw quad probe all rgba (9, 8, 7, 6) uniform 0 float4 -1 8 7 6 -draw quad +todo_6 draw quad probe all rgba (9, 8, 7, 6) uniform 0 float4 9 0 7 6 -draw quad +todo_6 draw quad probe all rgba (9, 0, 7, 6) diff --git a/tests/hlsl/combined-samplers.shader_test b/tests/hlsl/combined-samplers.shader_test index 465c11cb..d22c9d2e 100644 --- a/tests/hlsl/combined-samplers.shader_test +++ b/tests/hlsl/combined-samplers.shader_test @@ -46,7 +46,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0, 0, 0, 1)
@@ -61,7 +61,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (10, 10, 10, 11)
@@ -75,7 +75,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (21, 21, 21, 11)
@@ -91,7 +91,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (12, 12, 12, 111)
@@ -106,13 +106,13 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (104, 104, 104, 111)
% Sampler arrays with components that have different usage dimensions are only forbidden in SM4 upwards. % However, tex2D and tex1D are considered the same dimension for these purposes. -[pixel shader fail] +[pixel shader fail_tpf] sampler sam[2];
float4 main() : sv_target @@ -130,7 +130,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (1, 1, 1, 11)
@@ -151,5 +151,5 @@ float4 main() : sv_target }
[test] -todo draw quad +todo todo_6 draw quad todo probe all rgba (10, 10, 10, 11) diff --git a/tests/hlsl/compute.shader_test b/tests/hlsl/compute.shader_test index 6d2f698c..3e46a6fb 100644 --- a/tests/hlsl/compute.shader_test +++ b/tests/hlsl/compute.shader_test @@ -18,4 +18,4 @@ void main()
[test] dispatch 1 1 1 -probe uav 0 (0, 0) r (-123.0) +todo_6 probe uav 0 (0, 0) r (-123.0) diff --git a/tests/hlsl/conditional.shader_test b/tests/hlsl/conditional.shader_test index b3b18dc1..11c60f9b 100644 --- a/tests/hlsl/conditional.shader_test +++ b/tests/hlsl/conditional.shader_test @@ -9,10 +9,10 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.9, 0.8, 0.7, 0.6) uniform 0 float4 0.1 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader] @@ -37,10 +37,10 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.9, 0.8, 0.7, 0.6)
-[pixel shader fail] +[pixel shader fail_tpf] float4 u;
float main() : sv_target @@ -52,7 +52,7 @@ float main() : sv_target return float4(0.9, 0.8, 0.7, 0.6); }
-[pixel shader fail todo] +[pixel shader fail_tpf todo] float4 u;
float main() : sv_target @@ -80,5 +80,5 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.9, 0.8, 0.7, 0.6) diff --git a/tests/hlsl/const.shader_test b/tests/hlsl/const.shader_test index ed5899f6..3001e2eb 100644 --- a/tests/hlsl/const.shader_test +++ b/tests/hlsl/const.shader_test @@ -10,10 +10,10 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 0.1 0.2 0.3 0.4 -draw quad +todo_6 draw quad probe all rgba (1.1, 2.2, 3.3, 4.4)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { const float f; diff --git a/tests/hlsl/cross.shader_test b/tests/hlsl/cross.shader_test index 101db607..c92493d0 100644 --- a/tests/hlsl/cross.shader_test +++ b/tests/hlsl/cross.shader_test @@ -9,7 +9,7 @@ float4 main(uniform float4 u, uniform float4 v) : sv_target [test] uniform 0 float4 1 -2 3 4 uniform 4 float4 10 100 1000 10000 -draw quad +todo_6 draw quad probe all rgba (-2300, -970, 120, 0)
@@ -24,5 +24,5 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 1 -2 3 4 -draw quad +todo_6 draw quad probe all rgba (-20, 8, 12, 3.5) diff --git a/tests/hlsl/d3dcolor-to-ubyte4.shader_test b/tests/hlsl/d3dcolor-to-ubyte4.shader_test index e31ef61c..a538896b 100644 --- a/tests/hlsl/d3dcolor-to-ubyte4.shader_test +++ b/tests/hlsl/d3dcolor-to-ubyte4.shader_test @@ -9,7 +9,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo_6 draw quad probe all rgba (1912.0, 1657.0, -127.0, 867.0) 1
[pixel shader] @@ -20,5 +20,5 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo_6 draw quad probe all rgba (-127.0, -127.0, -127.0, -127.0) 1 diff --git a/tests/hlsl/ddxddy.shader_test b/tests/hlsl/ddxddy.shader_test index 4986c233..37e47054 100644 --- a/tests/hlsl/ddxddy.shader_test +++ b/tests/hlsl/ddxddy.shader_test @@ -9,7 +9,7 @@ float4 main(float4 pos : sv_position) : sv_target
[test] draw quad -probe all rgba (1.0, 1.0, 0.0, 0.0) +todo_6 probe all rgba (1.0, 1.0, 0.0, 0.0)
[pixel shader] @@ -29,7 +29,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -draw quad +todo_6 draw quad probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0) probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0) probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) @@ -55,7 +55,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -draw quad +todo_6 draw quad probe (10, 10) rgba (-16.0, -5.0, 3.0, 0.0) probe (11, 10) rgba (-21.0, -5.0, 3.0, 0.0) probe (10, 11) rgba (-13.0, -5.0, 3.0, 0.0) @@ -74,7 +74,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -draw quad +todo_6 draw quad probe (10, 10) rgba (-0.524999976, -0.164999843, 0.104999900, 0.0) 16 probe (11, 10) rgba (-0.689999819, -0.164999843, 0.114999890, 0.0) 32 probe (10, 11) rgba (-0.420000076, -0.154999852, 0.104999900, 0.0) 32 diff --git a/tests/hlsl/discard.shader_test b/tests/hlsl/discard.shader_test index f543f877..ea7ae151 100644 --- a/tests/hlsl/discard.shader_test +++ b/tests/hlsl/discard.shader_test @@ -9,8 +9,8 @@ float4 main() : sv_target
[test] uniform 0 float4 1 2 3 4 -draw quad +todo_6 draw quad probe all rgba (1, 2, 3, 4) uniform 0 float4 9 8 7 6 -draw quad +todo_6 draw quad probe all rgba (1, 2, 3, 4) diff --git a/tests/hlsl/distance.shader_test b/tests/hlsl/distance.shader_test index 3f544645..1da16034 100644 --- a/tests/hlsl/distance.shader_test +++ b/tests/hlsl/distance.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target [test] uniform 0 float4 -2.0 3.0 4.0 0.1 uniform 4 float4 2.0 -1.0 4.0 5.0 -draw quad +todo_6 draw quad probe all rgba (7.483983, 7.483983, 7.483983, 7.483983) 1
[pixel shader] diff --git a/tests/hlsl/dot.shader_test b/tests/hlsl/dot.shader_test index 15f120f7..f19401d9 100644 --- a/tests/hlsl/dot.shader_test +++ b/tests/hlsl/dot.shader_test @@ -10,7 +10,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 5.0 uniform 4 float4 10.0 11.0 12.0 13.0 -draw quad +todo_6 draw quad probe all rgba (166.0, 166.0, 166.0, 166.0)
[pixel shader] @@ -25,7 +25,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 0.0 0.0 uniform 4 float4 10.0 11.0 12.0 13.0 -draw quad +todo_6 draw quad probe all rgba (53.0, 53.0, 53.0, 53.0)
[pixel shader] @@ -40,7 +40,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 0.0 0.0 0.0 uniform 4 float4 10.0 11.0 12.0 13.0 -draw quad +todo_6 draw quad probe all rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] @@ -55,7 +55,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 10.0 11.0 12.0 13.0 uniform 4 float4 2.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (92.0, 92.0, 92.0, 92.0)
[pixel shader] @@ -71,7 +71,7 @@ float4 main() : SV_TARGET % Account for both the SM1 and SM4 uniform layout uniform 0 float4 2.0 3.0 0.0 0.0 uniform 4 float4 3.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (6.0, 6.0, 6.0, 6.0)
[pixel shader] @@ -87,7 +87,7 @@ float4 main() : sv_target draw quad probe all rgba (110.0, 110.0, 110.0, 110.0)
-[pixel shader fail] +[pixel shader fail_tpf] uniform float1x1 x; uniform float4 y;
@@ -96,7 +96,7 @@ float4 main() : SV_TARGET return dot(x, y); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float1x4 x; uniform float4 y;
@@ -105,7 +105,7 @@ float4 main() : SV_TARGET return dot(x, y); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4x1 x; uniform float4 y;
@@ -114,7 +114,7 @@ float4 main() : SV_TARGET return dot(x, y); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4x4 x; uniform float4 y;
diff --git a/tests/hlsl/duplicate-modifiers.shader_test b/tests/hlsl/duplicate-modifiers.shader_test index 6491701a..f2285c5f 100644 --- a/tests/hlsl/duplicate-modifiers.shader_test +++ b/tests/hlsl/duplicate-modifiers.shader_test @@ -8,4 +8,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.1, 0.2, 0.3, 0.4) +todo_6 probe all rgba (0.1, 0.2, 0.3, 0.4) diff --git a/tests/hlsl/entry-point-semantics.shader_test b/tests/hlsl/entry-point-semantics.shader_test index 32cd43c2..1859ea0e 100644 --- a/tests/hlsl/entry-point-semantics.shader_test +++ b/tests/hlsl/entry-point-semantics.shader_test @@ -7,7 +7,7 @@ void main(out float tex : texcoord, inout float4 pos : sv_position) tex = 0.2; }
-[pixel shader fail] +[pixel shader fail_tpf]
float4 main(float tex : texcoord) : sv_target;
@@ -16,7 +16,7 @@ float4 main(float tex) return tex; }
-[pixel shader fail] +[pixel shader fail_tpf]
float4 main(float tex) { @@ -63,7 +63,7 @@ void main(out float4 tex[4] : texcoord, inout float4 pos : sv_position)
% Array parameters of non-struct elements must have a semantic. -[pixel shader fail] +[pixel shader fail_tpf] float4 main(in float2 arr[2]) : sv_target { return 0.0; @@ -84,7 +84,7 @@ float4 main(in apple a) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0) +todo_6 probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0)
% Arrays of matrices get successive indexes. @@ -101,7 +101,7 @@ float4 main(in apple a) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0) +todo_6 probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0)
% Arrays (even multi-dimensional) of struct elements are allowed. The fields in the different struct @@ -120,7 +120,7 @@ float4 main(in apple aps[2][2]) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0) +todo_6 probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0)
[pixel shader] @@ -142,10 +142,10 @@ float4 main(in banana bans[2]) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0) +todo_6 probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float2 miss; // missing semantic. @@ -163,7 +163,7 @@ float4 main(in banana bans[2]) : sv_target }
-[vertex shader fail] +[vertex shader fail_tpf] struct apple { float2 miss; // missing semantic. @@ -201,11 +201,11 @@ float4 main(in float4 tex0 : TEXCOORD0, in float4 tex1 : TEXCOORD1) : sv_target
[test] draw quad -probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0) +todo_6 probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0)
% Output semantics cannot be mapped to more than one value. -[vertex shader fail] +[vertex shader fail_tpf] struct apple { float2 tex : TEXCOORD0; @@ -218,7 +218,7 @@ void main(out apple apls[2], inout float4 pos : sv_position) }
-[vertex shader fail] +[vertex shader fail_tpf] struct apple { float2 f : SEMANTIC; @@ -232,7 +232,7 @@ void main(out apple a, out apple b, inout float4 pos : sv_position)
% Semantic names are case-insensitive. -[vertex shader fail] +[vertex shader fail_tpf] void main(out float2 a : sem0, out float2 b : SEM, inout float4 pos : sv_position) { a = float2(1, 2); @@ -259,7 +259,7 @@ float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target }
[test] -draw quad +todo_6 draw quad probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0)
@@ -272,7 +272,7 @@ float4 main(in float4 a : TEXCOORD0, in float3 b : TEXCOORD1) : sv_target
[test] draw quad -probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0) +todo_6 probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
% In SM4, duplicated input semantics can only have different types if they have the same layout and @@ -295,14 +295,14 @@ float4 main(in uint2 a : TEXCOORD0, in int2 b : TEXCOORD0, in int2x1 c : TEXCOOR shader model >= 4.0
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(in float2 a : TEXCOORD0, in float3 b : TEXCOORD0) : sv_target { return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(in float2 a : TEXCOORD0, in int2 b : TEXCOORD0) : sv_target { return 0.0; @@ -311,19 +311,19 @@ float4 main(in float2 a : TEXCOORD0, in int2 b : TEXCOORD0) : sv_target
% For some reason, vectors from row_major matrices are not considered as having the same layout as % regular vectors. -[pixel shader fail todo] +[pixel shader fail_tpf todo] float4 main(in float2 a : TEXCOORD0, row_major float1x2 b : TEXCOORD0) : sv_target { return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(in float2 a : TEXCOORD0, row_major float2x1 b : TEXCOORD0) : sv_target { return 0.0; }
-[pixel shader fail todo] +[pixel shader fail_tpf todo] float4 main(in float4 a : TEXCOORD0, row_major float1x4 b : TEXCOORD0) : sv_target { return 0.0; diff --git a/tests/hlsl/exp.shader_test b/tests/hlsl/exp.shader_test index de3be685..eb4d7265 100644 --- a/tests/hlsl/exp.shader_test +++ b/tests/hlsl/exp.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -1.0 0.0 1.0 2.0 -draw quad +todo_6 draw quad probe all rgba (0.5, 1.0, 2.0, 4.0) 1
[pixel shader] @@ -21,5 +21,5 @@ float4 main() : sv_target
[test] uniform 0 float4 -1.0 0.0 1.0 2.0 -draw quad +todo_6 draw quad probe all rgba (0.36787948, 1.0, 2.7182815, 7.38905573) 2 diff --git a/tests/hlsl/expr-indexing.shader_test b/tests/hlsl/expr-indexing.shader_test index 3dcc5727..539f0d5b 100644 --- a/tests/hlsl/expr-indexing.shader_test +++ b/tests/hlsl/expr-indexing.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 -draw quad +todo_6 draw quad probe all rgba (8.0, 8.0, 8.0, 8.0)
@@ -26,7 +26,7 @@ float4 main() : sv_target uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float 2 -draw quad +todo_6 draw quad probe all rgba (10.0, 10.0, 10.0, 10.0)
@@ -40,7 +40,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (3.0, 3.0, 3.0, 3.0)
@@ -56,10 +56,10 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float 0 -draw quad +todo_6 draw quad probe all rgba (4.0, 4.0, 4.0, 4.0) uniform 4 float 2 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
@@ -78,7 +78,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (4.0, 4.0, 4.0, 4.0)
@@ -99,5 +99,5 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float 1 -draw quad +todo_6 draw quad probe all rgba (2.0, 2.0, 2.0, 2.0) diff --git a/tests/hlsl/floor.shader_test b/tests/hlsl/floor.shader_test index c111f98b..5bff834d 100644 --- a/tests/hlsl/floor.shader_test +++ b/tests/hlsl/floor.shader_test @@ -6,7 +6,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo_6 draw quad probe all rgba (-1.0, 6.0, 7.0, 3.0) 4
[pixel shader] @@ -20,7 +20,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo_6 draw quad probe all rgba (6.0, 7.0, -1.0, 3.0) 4
[require] @@ -37,5 +37,5 @@ float4 main(uniform int4 u) : sv_target
[test] uniform 0 int4 -1 6 7 3 -draw quad +todo_6 draw quad probe all rgba (6.0, 7.0, -1.0, 3.0) 4 diff --git a/tests/hlsl/fmod.shader_test b/tests/hlsl/fmod.shader_test index 9eb69c3b..8d1b48a8 100644 --- a/tests/hlsl/fmod.shader_test +++ b/tests/hlsl/fmod.shader_test @@ -6,10 +6,10 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (-0.5, 0.0, 0.0, 0.0) 4 uniform 0 float4 1.1 0.3 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.0, 0.0, 0.0) 4
[pixel shader] @@ -20,8 +20,8 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 2.0 0.0 -draw quad +todo_6 draw quad probe all rgba (-0.5, 0.5, 0.0, 0.0) 4 uniform 0 float4 1.1 0.3 3.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.1, 0.3, 0.0, 0.0) 4 diff --git a/tests/hlsl/for.shader_test b/tests/hlsl/for.shader_test index b6896981..d5721ce9 100644 --- a/tests/hlsl/for.shader_test +++ b/tests/hlsl/for.shader_test @@ -22,7 +22,7 @@ float4 main(float tex : texcoord) : sv_target }
[test] -todo draw quad +todo todo_6 draw quad probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0) probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0) probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0) @@ -43,7 +43,7 @@ float4 main(float tex : texcoord) : sv_target draw quad probe all rgba (10.0, 45.0, 0.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(float tex : texcoord) : sv_target { int i; diff --git a/tests/hlsl/frac.shader_test b/tests/hlsl/frac.shader_test index f54f3fe8..64358725 100644 --- a/tests/hlsl/frac.shader_test +++ b/tests/hlsl/frac.shader_test @@ -8,5 +8,5 @@ float4 main() : sv_target
[test] uniform 0 float4 -1.1 1.6 1.3 0.5 -draw quad +todo_6 draw quad probe all rgba (0.9, 0.6, 0.3, 0.5) 2 diff --git a/tests/hlsl/function-cast.shader_test b/tests/hlsl/function-cast.shader_test index e6a5a96b..a4ac6e3a 100644 --- a/tests/hlsl/function-cast.shader_test +++ b/tests/hlsl/function-cast.shader_test @@ -18,7 +18,7 @@ float4 main() : sv_target
[test] uniform 0 float4 -1.9 -1.0 2.9 4.0 -todo draw quad +todo todo_6 draw quad probe all rgba (-1.0, -1.0, 2.0, 4.0)
% As above, but cast "x" to float4 first. @@ -42,7 +42,7 @@ float4 main() : sv_target [test] uniform 0 float4 -1.9 -1.0 2.9 4.0 todo draw quad -probe all rgba (-1.0, -1.0, 2.0, 4.0) +todo_6 probe all rgba (-1.0, -1.0, 2.0, 4.0)
% As above, but declare "x" as float4 and cast it to int4.
@@ -65,7 +65,7 @@ float4 main() : sv_target [test] uniform 0 float4 -1.9 -1.0 2.9 4.0 todo draw quad -probe all rgba (-1.0, -1.0, 2.0, 4.0) +todo_6 probe all rgba (-1.0, -1.0, 2.0, 4.0)
[require] shader model >= 4.0 @@ -86,5 +86,5 @@ float4 main(uniform int4 i) : sv_target
[test] uniform 0 int4 -2 0 1 -3000000 -todo draw quad +todo todo_6 draw quad probe all rgba (-1.0, 0.0, 1.0, -3000000.0) diff --git a/tests/hlsl/function-overload.shader_test b/tests/hlsl/function-overload.shader_test index 099f63f3..e07a4f9d 100644 --- a/tests/hlsl/function-overload.shader_test +++ b/tests/hlsl/function-overload.shader_test @@ -1,4 +1,4 @@ -[pixel shader fail] +[pixel shader fail_tpf] /* The same function signature cannot be defined twice. */
float func(int arg) diff --git a/tests/hlsl/function-return.shader_test b/tests/hlsl/function-return.shader_test index cbd29749..5441c059 100644 --- a/tests/hlsl/function-return.shader_test +++ b/tests/hlsl/function-return.shader_test @@ -80,16 +80,16 @@ float4 main() : sv_target
[test] uniform 0 float 0.1 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.2, 0.6, 0.3) 1 uniform 0 float 0.4 -draw quad +todo_6 draw quad probe all rgba (0.6, 0.5, 0.6, 0.3) 1 uniform 0 float 0.6 -draw quad +todo_6 draw quad probe all rgba (0.6, 0.5, 0.4, 0.5) 1 uniform 0 float 0.8 -draw quad +todo_6 draw quad probe all rgba (0.8, 0.7, 0.4, 0.5) 1
[pixel shader] @@ -136,13 +136,13 @@ float4 main() : sv_target
[test] uniform 0 float 0.1 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.1, 0.2, 0.1) 1 uniform 0 float 0.5 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.4, 1.0, 0.9) 1 uniform 0 float 0.9 -draw quad +todo_6 draw quad probe all rgba (1.0, 0.9, 1.0, 0.6) 1
[pixel shader] @@ -239,23 +239,23 @@ float4 main() : sv_target
[test] uniform 0 float 0.0 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.2, 0.3, 0.3) 1
uniform 0 float 0.1 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.3, 0.3, 0.3) 1
uniform 0 float 0.3 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.5, 0.3, 0.3) 1
uniform 0 float 0.7 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.9, 0.7, 0.6) 1
uniform 0 float 0.9 -draw quad +todo_6 draw quad probe all rgba (0.4, 0.1, 0.7, 0.6) 1
[pixel shader todo] @@ -295,21 +295,21 @@ float4 main() : sv_target uniform 0 float4 0.3 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.1 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.3, 0.2, 0.6, 0.6) 1
uniform 4 float4 0.35 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.3, 0.3, 0.6, 0.6) 1
uniform 8 float4 0.5 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 0 float4 1.0 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 4 float4 2.0 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.4, 0.1, 0.6, 0.6) 1 diff --git a/tests/hlsl/function.shader_test b/tests/hlsl/function.shader_test index 0db0477e..868d460a 100644 --- a/tests/hlsl/function.shader_test +++ b/tests/hlsl/function.shader_test @@ -1,4 +1,4 @@ -[pixel shader fail] +[pixel shader fail_tpf]
float4 func();
@@ -23,7 +23,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
void func(inout float o) { @@ -37,7 +37,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
void func(inout float2 o) { @@ -51,7 +51,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf]
void func(out float o) { @@ -65,7 +65,7 @@ float4 main() : sv_target return x; }
-[pixel shader fail] +[pixel shader fail_tpf]
void func(inout float o) { @@ -78,7 +78,7 @@ float4 main() : sv_target return x; }
-[pixel shader fail] +[pixel shader fail_tpf]
void func() { @@ -89,7 +89,7 @@ float4 main() : sv_target return func(); }
-[pixel shader fail] +[pixel shader fail_tpf]
void foo() { @@ -109,7 +109,7 @@ float4 main() : sv_target % The function must have been at least declared before calling it. It may have % been declared with a different but compatible type, though.
-[pixel shader fail] +[pixel shader fail_tpf]
float4 main() : sv_target { @@ -135,7 +135,7 @@ void func() { }
-[pixel shader fail] +[pixel shader fail_tpf]
void func(float arg);
diff --git a/tests/hlsl/gather-offset.shader_test b/tests/hlsl/gather-offset.shader_test index 51e6a6b6..b5dfaa3c 100644 --- a/tests/hlsl/gather-offset.shader_test +++ b/tests/hlsl/gather-offset.shader_test @@ -23,7 +23,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.2, 0.1)
@@ -37,7 +37,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.0, 0.1, 0.1, 0.0)
@@ -55,7 +55,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.2, 0.2, 0.1, 0.1)
@@ -69,7 +69,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.1, 0.1, 0.0, 0.0)
@@ -83,7 +83,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.5, 0.0, 0.5, 0.0)
@@ -97,5 +97,5 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.0, 0.4, 0.0, 0.4) diff --git a/tests/hlsl/gather.shader_test b/tests/hlsl/gather.shader_test index 28fd6f9a..998c214d 100644 --- a/tests/hlsl/gather.shader_test +++ b/tests/hlsl/gather.shader_test @@ -23,7 +23,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.0, 0.1, 0.1, 0.0)
@@ -37,7 +37,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.2, 0.1)
@@ -55,7 +55,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.1, 0.1, 0.0, 0.0)
@@ -69,7 +69,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.2, 0.2, 0.1, 0.1)
@@ -83,7 +83,7 @@ float4 main() : sv_target }
[test] -todo draw quad +todo todo_6 draw quad probe all rgba (0.1, 0.1, 0.0, 0.0)
@@ -97,7 +97,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.0, 0.5, 0.0, 0.5)
@@ -111,5 +111,5 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.4, 0.0, 0.4, 0.0) diff --git a/tests/hlsl/getdimensions.shader_test b/tests/hlsl/getdimensions.shader_test index 4d781b32..2bb1481f 100644 --- a/tests/hlsl/getdimensions.shader_test +++ b/tests/hlsl/getdimensions.shader_test @@ -28,7 +28,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (2.0, 3.0, 2.0, 3.0)
[texture 1] @@ -53,5 +53,5 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (2.0, 2.0, 1.0, 2.0) diff --git a/tests/hlsl/initializer-implicit-array.shader_test b/tests/hlsl/initializer-implicit-array.shader_test index 38c8234c..54e8c0e4 100644 --- a/tests/hlsl/initializer-implicit-array.shader_test +++ b/tests/hlsl/initializer-implicit-array.shader_test @@ -22,7 +22,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (5.0, 6.0, 7.0, 8.0) +todo_6 probe all rgba (5.0, 6.0, 7.0, 8.0)
[pixel shader] @@ -66,7 +66,7 @@ draw quad probe all rgba (318.0, 320.0, 322.0, 324.0)
-[pixel shader fail] +[pixel shader fail_tpf] // Incompatible number of arguments in implicit size array initializer float4 main() : SV_TARGET { @@ -76,7 +76,7 @@ float4 main() : SV_TARGET }
-[pixel shader fail] +[pixel shader fail_tpf] // Incompatible number of arguments in implicit size array initializer float4 main() : SV_TARGET { @@ -85,7 +85,7 @@ float4 main() : SV_TARGET return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size inner array float4 main() : sv_target { @@ -95,7 +95,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size array without initializer float4 main() : sv_target { @@ -105,7 +105,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size array as struct member struct foobar { @@ -121,7 +121,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size array as function argument float4 fun(float4 arr[]) { @@ -134,7 +134,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size array as function return type // Note: explicit size arrays are not allowed either. float4[] fun() @@ -150,7 +150,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail skip_dxil] // Implicit size array as a cast float4 main() : sv_target { @@ -161,7 +161,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size array as a typedef typedef float4 arrtype[];
@@ -173,7 +173,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail skip_dxil] // Implicit size array of elements of size 0 struct emp { @@ -187,7 +187,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size array of elements of size 0, without initializer struct emp { @@ -201,7 +201,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail skip_dxil] // Broadcast to an implicit size array float4 main() : sv_target { @@ -211,7 +211,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Implicit size array with an initializer of size 0 struct emp { @@ -225,7 +225,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail skip_dxil] // Implicit size array of elements of size 0 with initializer of size 0 struct emp { diff --git a/tests/hlsl/initializer-invalid-arg-count.shader_test b/tests/hlsl/initializer-invalid-arg-count.shader_test index 4332fbe8..51ec9895 100644 --- a/tests/hlsl/initializer-invalid-arg-count.shader_test +++ b/tests/hlsl/initializer-invalid-arg-count.shader_test @@ -13,7 +13,7 @@ draw quad probe all rgba (17, 18, 19, 20)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float4 color[2][3] = @@ -23,7 +23,7 @@ float4 main() : sv_target return color[1][1]; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float4 color[2][3] = @@ -61,7 +61,7 @@ draw quad probe all rgba (22, 23, 24, 25)
-[pixel shader fail] +[pixel shader fail_tpf] struct stu { struct @@ -84,7 +84,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] struct stu { struct diff --git a/tests/hlsl/initializer-multi.shader_test b/tests/hlsl/initializer-multi.shader_test index 8f8a31e2..db5603c8 100644 --- a/tests/hlsl/initializer-multi.shader_test +++ b/tests/hlsl/initializer-multi.shader_test @@ -11,7 +11,7 @@ draw quad probe all rgba (2, 3, 3, 0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float a = 2.0, b = c + 1.0, c = b; diff --git a/tests/hlsl/initializer-objects.shader_test b/tests/hlsl/initializer-objects.shader_test index d9c0bc91..e6944400 100644 --- a/tests/hlsl/initializer-objects.shader_test +++ b/tests/hlsl/initializer-objects.shader_test @@ -25,7 +25,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.2, 0.2, 0.2, 0.1)
@@ -48,7 +48,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (31.1, 41.1, 51.1, 61.1) 1
@@ -71,7 +71,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] Texture2D tex;
struct foo @@ -90,7 +90,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] Texture2D tex;
struct foo diff --git a/tests/hlsl/intrinsic-override.shader_test b/tests/hlsl/intrinsic-override.shader_test index 55a23f21..b5ce39bb 100644 --- a/tests/hlsl/intrinsic-override.shader_test +++ b/tests/hlsl/intrinsic-override.shader_test @@ -12,7 +12,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.3, 0.3, 0.4, 0.6) +todo_6 probe all rgba (0.3, 0.3, 0.4, 0.6)
[pixel shader]
@@ -28,4 +28,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.3, 0.3, 0.3, 0.4) +todo_6 probe all rgba (0.3, 0.3, 0.3, 0.4) diff --git a/tests/hlsl/invalid.shader_test b/tests/hlsl/invalid.shader_test index ad062652..d5dad403 100644 --- a/tests/hlsl/invalid.shader_test +++ b/tests/hlsl/invalid.shader_test @@ -1,10 +1,10 @@ -[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { return y; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float4 x = float4(0, 0, 0, 0); @@ -12,67 +12,67 @@ float4 main() : sv_target return x; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(float2 pos : TEXCOORD0) : sv_target { float4 x = pos; return x; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 563r(float2 45s : TEXCOORD0) : sv_target { float4 x = 45s; return float4(x.x, x.y, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { struct { int b,c; } x = {0}; return x; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { struct {} x = {}; return x; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(float2 pos : TEXCOORD0) : sv_target { return; }
-[pixel shader fail] +[pixel shader fail_tpf] void main(float2 pos : TEXCOORD0) { return pos; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(float2 pos : TEXCOORD0) : sv_target { return pos; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float a[0]; return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float a[65537]; return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { int x; @@ -80,45 +80,45 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(out float4 o : sv_target) { o = 1; return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(out float4 o) : sv_target { o = 1; return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(in float4 i) : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(float4 i) : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct {float4 a;};
float4 main() : sv_target @@ -126,14 +126,14 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { const float4 x; return x; }
-[pixel shader fail] +[pixel shader fail_tpf] struct input { float4 a; @@ -144,7 +144,7 @@ float4 main(struct input i) : sv_target return i.a; }
-[pixel shader fail] +[pixel shader fail_tpf] struct output { float4 t : sv_target; @@ -157,25 +157,25 @@ void main(out struct output o) o.a = 0; }
-[pixel shader fail] +[pixel shader fail_tpf] uniform in float4 f; float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] in float4 f; float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] static uniform float4 f; float4 main() : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] void main(out uniform float4 o : sv_target) { o = 0; }
-[pixel shader fail] +[pixel shader fail_tpf] void sub(out uniform float4 o) { o = 0; @@ -186,7 +186,7 @@ void main(out float4 o : sv_target) sub(o); }
-[pixel shader fail] +[pixel shader fail_tpf] void sub(in out uniform float4 o) { } @@ -197,21 +197,21 @@ void main(out float4 o : sv_target) sub(o); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(void) : sv_target { uniform float f; return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(void) : sv_target { in float f; return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] const const float4 c;
float4 main() : sv_target @@ -219,7 +219,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] typedef struct apple { float a; @@ -233,7 +233,7 @@ float4 main() : sv_target return a.a; }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { sampler sam; @@ -247,6 +247,6 @@ float4 main() : sv_target return 1.0; }
-[pixel shader fail] +[pixel shader fail_tpf]
float4 main() : sv_target; diff --git a/tests/hlsl/is-front-face.shader_test b/tests/hlsl/is-front-face.shader_test index 11447d26..c473e45d 100644 --- a/tests/hlsl/is-front-face.shader_test +++ b/tests/hlsl/is-front-face.shader_test @@ -22,7 +22,7 @@ float4 main(bool face : sv_isfrontface) : sv_target }
[test] -draw triangle strip 4 +todo_6 draw triangle strip 4 probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex buffer 0] @@ -32,5 +32,5 @@ probe all rgba (0.0, 1.0, 0.0, 1.0) 2.0 2.0
[test] -draw triangle strip 4 +todo_6 draw triangle strip 4 probe all rgba (1.0, 2.0, 1.0, 2.0) diff --git a/tests/hlsl/ldexp.shader_test b/tests/hlsl/ldexp.shader_test index 92988d37..f5c64371 100644 --- a/tests/hlsl/ldexp.shader_test +++ b/tests/hlsl/ldexp.shader_test @@ -10,7 +10,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 2.0 3.0 4.0 5.0 uniform 4 float4 0.0 -10.0 10.0 100.0 -draw quad +todo_6 draw quad probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030)
[require] @@ -28,7 +28,7 @@ float4 main() : SV_TARGET [test] uniform 0 int4 2 3 4 5 uniform 4 int4 0 -10 10 100 -draw quad +todo_6 draw quad probe all rgba (2.0, 0.00292968750, 4096.0, 6.33825300e+030)
@@ -47,7 +47,7 @@ draw quad probe all rgba (64.0, 64.0, 64.0, 40.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 a = {1, 2, 3, 4}; diff --git a/tests/hlsl/length.shader_test b/tests/hlsl/length.shader_test index d5a708e2..287aa7b5 100644 --- a/tests/hlsl/length.shader_test +++ b/tests/hlsl/length.shader_test @@ -8,7 +8,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 4.0 5.0 -draw quad +todo_6 draw quad probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1
[pixel shader] @@ -21,7 +21,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 4.0 0.0 -draw quad +todo_6 draw quad probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1
[pixel shader] @@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1
[pixel shader] @@ -47,7 +47,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (2.0, 2.0, 2.0, 2.0)
[pixel shader] @@ -60,10 +60,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (2.0, 2.0, 2.0, 2.0)
-[pixel shader fail] +[pixel shader fail_tpf] uniform float1x3 x;
float4 main() : SV_TARGET @@ -71,7 +71,7 @@ float4 main() : SV_TARGET return length(x); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4x1 x;
float4 main() : SV_TARGET diff --git a/tests/hlsl/lerp.shader_test b/tests/hlsl/lerp.shader_test index 15e90cef..1b8b810b 100644 --- a/tests/hlsl/lerp.shader_test +++ b/tests/hlsl/lerp.shader_test @@ -12,7 +12,7 @@ float4 main() : SV_TARGET uniform 0 float4 2.0 3.0 4.0 5.0 uniform 4 float4 0.0 -10.0 10.0 100.0 uniform 8 float4 0.0 1.0 -1.0 0.75 -draw quad +todo_6 draw quad probe all rgba (2.0, -10.0, -2.0, 76.25)
[require] @@ -32,7 +32,7 @@ float4 main() : SV_TARGET uniform 0 int4 2 3 4 0 uniform 4 int4 0 -10 10 1000000 uniform 8 int4 0 1 -1 1000000 -draw quad +todo_6 draw quad probe all rgba (2.0, -10.0, -2.0, 1e12)
@@ -52,7 +52,7 @@ draw quad probe all rgba (-6.0, -2.2, 4.48, 8.28) 1
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 a = {0, 1, 2, 3}; diff --git a/tests/hlsl/lit.shader_test b/tests/hlsl/lit.shader_test index cbfffb4e..fe7014b6 100644 --- a/tests/hlsl/lit.shader_test +++ b/tests/hlsl/lit.shader_test @@ -6,17 +6,17 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.1 10.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 0.0, 0.0, 1.0)
[test] uniform 0 float4 1.2 -0.1 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.2, 0.0, 1.0)
[test] uniform 0 float4 1.2 2.0 3.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.2, 8.0, 1.0)
[pixel shader] @@ -27,28 +27,28 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 1.2 2.0 3.0 0.0 -draw quad +todo_6 draw quad probe all rgba (2.0, 2.4, 16.0, 2.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(uniform float4 u) : sv_target { return lit(u.xy, u.y, u.z); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(uniform float4 u) : sv_target { return lit(u.x, u.xy, u.z); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(uniform float4 u) : sv_target { return lit(u.x, u.y, u.yz); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4x4 m;
float4 main(uniform float4 u) : sv_target @@ -56,7 +56,7 @@ float4 main(uniform float4 u) : sv_target return lit(m, u.y, u.z); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4x4 m;
float4 main(uniform float4 u) : sv_target @@ -64,7 +64,7 @@ float4 main(uniform float4 u) : sv_target return lit(u.x, m, u.z); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4x4 m;
float4 main(uniform float4 u) : sv_target diff --git a/tests/hlsl/load-level.shader_test b/tests/hlsl/load-level.shader_test index 0f64bd5d..382c169e 100644 --- a/tests/hlsl/load-level.shader_test +++ b/tests/hlsl/load-level.shader_test @@ -22,13 +22,13 @@ float4 main() : sv_target
[test] uniform 0 uint 0 -draw quad +todo_6 draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) uniform 0 uint 1 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 1.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] sampler s; Texture2D t;
@@ -47,5 +47,5 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/log.shader_test b/tests/hlsl/log.shader_test index b0f405d1..9a08f139 100644 --- a/tests/hlsl/log.shader_test +++ b/tests/hlsl/log.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target
[test] uniform 0 float4 2.0 4.0 5.0 0.4 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 2.32192802, -1.32192802) 1
[pixel shader] @@ -21,7 +21,7 @@ float4 main() : sv_target
[test] uniform 0 float4 10.0 100.0 1.0 0.1 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 0.0, -1.0) 1
[pixel shader] @@ -34,5 +34,5 @@ float4 main() : sv_target
[test] uniform 0 float4 3.0 10.0 1.0 0.1 -draw quad +todo_6 draw quad probe all rgba (1.0986123, 2.302585, 0.0, -2.302585) 2 diff --git a/tests/hlsl/loop.shader_test b/tests/hlsl/loop.shader_test index 75a31f7a..4d4f3854 100644 --- a/tests/hlsl/loop.shader_test +++ b/tests/hlsl/loop.shader_test @@ -16,7 +16,7 @@ float4 main() : sv_target
[test] uniform 0 float 5.0 -draw quad +todo_6 draw quad probe all rgba (50.0, 50.0, 50.0, 50.0)
@@ -39,5 +39,5 @@ float4 main() : sv_target
[test] uniform 0 float 4.0 -draw quad +todo_6 draw quad probe all rgba (20.0, 20.0, 20.0, 20.0) diff --git a/tests/hlsl/majority-pragma.shader_test b/tests/hlsl/majority-pragma.shader_test index 808313e7..ac54889e 100644 --- a/tests/hlsl/majority-pragma.shader_test +++ b/tests/hlsl/majority-pragma.shader_test @@ -17,7 +17,7 @@ uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 uniform 8 float4 0.1 0.3 0.0 0.0 uniform 12 float4 0.2 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.17, 0.39, 0.17, 0.39) 1
@@ -40,7 +40,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
@@ -61,7 +61,7 @@ uniform 0 float4 0.0 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.5 0.6 0.0 0.0 uniform 12 float4 0.7 0.8 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.6, 0.7, 0.8)
@@ -90,7 +90,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.23, 0.34, 0.5, 0.5) 1
@@ -111,13 +111,13 @@ float4 main() : sv_target [test] uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
% In fact, it's illegal to specify a contradictory majority.
-[pixel shader fail] +[pixel shader fail_tpf] #pragma pack_matrix(row_major) typedef float2x2 mat_t; uniform column_major mat_t m; @@ -149,7 +149,7 @@ uniform 0 float4 0.3 0.4 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.0 0.0 0.0 0.0 uniform 12 float4 0.5 0.6 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.4, 0.5, 0.6)
@@ -173,7 +173,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
@@ -201,7 +201,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.2 0.4 0.0 0.0 uniform 4 float4 0.3 0.5 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.3, 0.4, 0.5)
@@ -221,7 +221,7 @@ uniform 0 float4 0.3 0.0 0.0 0.0 uniform 4 float4 0.4 0.0 0.0 0.0 uniform 8 float4 0.0 0.5 0.0 0.0 uniform 12 float4 0.0 0.6 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.4, 0.5, 0.6)
% Compiler options @@ -245,7 +245,7 @@ uniform 0 float4 0.1 0.5 0.9 1.3 uniform 4 float4 0.2 0.6 1.0 1.4 uniform 8 float4 0.3 0.7 1.1 1.5 uniform 12 float4 0.4 0.8 1.2 1.6 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.3, 0.6, 0.7) 1
[require] @@ -267,7 +267,7 @@ uniform 0 float4 0.1 0.5 0.9 1.3 uniform 4 float4 0.2 0.6 1.0 1.4 uniform 8 float4 0.3 0.7 1.1 1.5 uniform 12 float4 0.4 0.8 1.2 1.6 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.3, 0.6, 0.7) 1
[require] @@ -289,7 +289,7 @@ uniform 0 float4 0.1 0.5 0.9 1.3 uniform 4 float4 0.2 0.6 1.0 1.4 uniform 8 float4 0.3 0.7 1.1 1.5 uniform 12 float4 0.4 0.8 1.2 1.6 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.9, 0.6, 1.0) 1
[require] @@ -317,7 +317,7 @@ uniform 16 float4 1.7 2.1 2.5 2.9 uniform 20 float4 1.8 2.2 2.6 3.0 uniform 24 float4 1.9 2.3 2.7 3.1 uniform 28 float4 2.0 2.4 2.8 3.2 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.4, 2.5, 2.9) 1
[require] @@ -345,7 +345,7 @@ uniform 16 float4 1.7 2.1 2.5 2.9 uniform 20 float4 1.8 2.2 2.6 3.0 uniform 24 float4 1.9 2.3 2.7 3.1 uniform 28 float4 2.0 2.4 2.8 3.2 -draw quad +todo_6 draw quad probe all rgba (1.2, 1.6, 3.1, 3.2) 1
[require] @@ -365,5 +365,5 @@ float4 main() : sv_target [test] uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.3, 0.2, 0.4) 1 diff --git a/tests/hlsl/majority-syntax.shader_test b/tests/hlsl/majority-syntax.shader_test index 4ab385a5..d8ec6ad7 100644 --- a/tests/hlsl/majority-syntax.shader_test +++ b/tests/hlsl/majority-syntax.shader_test @@ -11,10 +11,10 @@ float4 main() : sv_target [test] uniform 0 float4 0.1 0.3 0.0 0.0 uniform 4 float4 0.2 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.3, 0.2, 0.4)
-[pixel shader fail] +[pixel shader fail_tpf] row_major row_major float4x4 m;
float4 main() : sv_target @@ -22,7 +22,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] typedef row_major float4x4 mat_t; column_major mat_t m;
@@ -31,7 +31,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] typedef row_major float4x4 matrix_t; typedef column_major matrix_t matrix2_t;
@@ -40,7 +40,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] typedef column_major float4 myfloat_t;
float4 main() : sv_target @@ -48,7 +48,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] column_major float4 f;
float4 main() : sv_target @@ -56,7 +56,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float4x4 m; @@ -68,7 +68,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { float4x4 m; @@ -80,7 +80,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] typedef float4x4 myarray_t[2];
row_major myarray_t a; @@ -90,13 +90,13 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(uniform row_major float4 f) : sv_target { return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct apple { row_major float4 f; diff --git a/tests/hlsl/majority-typedef.shader_test b/tests/hlsl/majority-typedef.shader_test index 1460e9a0..d3384bc2 100644 --- a/tests/hlsl/majority-typedef.shader_test +++ b/tests/hlsl/majority-typedef.shader_test @@ -18,5 +18,5 @@ uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 uniform 8 float4 0.1 0.3 0.0 0.0 uniform 12 float4 0.2 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.17, 0.39, 0.17, 0.39) 1 diff --git a/tests/hlsl/math.shader_test b/tests/hlsl/math.shader_test index 6bd9656d..4c66d69b 100644 --- a/tests/hlsl/math.shader_test +++ b/tests/hlsl/math.shader_test @@ -11,5 +11,5 @@ float4 main(uniform float4 a, uniform float2 b) : SV_TARGET [test] uniform 0 float4 2.5 0.3 0.2 0.7 uniform 4 float4 0.1 1.5 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (-12.43, 9.833333, 1.6, 35.0) 1 diff --git a/tests/hlsl/matrix-indexing.shader_test b/tests/hlsl/matrix-indexing.shader_test index a57d8fb8..f38e50d1 100644 --- a/tests/hlsl/matrix-indexing.shader_test +++ b/tests/hlsl/matrix-indexing.shader_test @@ -11,7 +11,7 @@ uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 13.0 14.0 15.0 16.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 10.0, 15.0)
[pixel shader] @@ -27,7 +27,7 @@ uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 13.0 14.0 15.0 16.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 10.0, 15.0)
[pixel shader] @@ -43,7 +43,7 @@ uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 uniform 8 float4 9.0 10.0 11.0 12.0 uniform 12 float4 13.0 14.0 15.0 16.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 5.0, 7.0, 12.0)
[pixel shader] @@ -58,7 +58,7 @@ float4 main() : SV_TARGET [test] uniform 0 float4 1.0 2.0 3.0 0.0 uniform 4 float4 5.0 6.0 7.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 3.0, 6.0, 7.0)
[pixel shader] @@ -120,7 +120,7 @@ float4 main() : sv_target
[test] uniform 0 float 2 -draw quad +todo_6 draw quad probe all rgba (8, 9, 10, 11)
@@ -136,5 +136,5 @@ float4 main() : sv_target
[test] uniform 0 float 3 -todo draw quad +todo todo_6 draw quad todo probe all rgba (12, 13, 14, 15) diff --git a/tests/hlsl/matrix-semantics.shader_test b/tests/hlsl/matrix-semantics.shader_test index b704dc1a..6622ac23 100644 --- a/tests/hlsl/matrix-semantics.shader_test +++ b/tests/hlsl/matrix-semantics.shader_test @@ -44,7 +44,7 @@ row_major float4x1 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe render target 0 all r (1.0) probe render target 1 all r (2.0) probe render target 2 all r (3.0) @@ -57,13 +57,13 @@ float1x4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe render target 0 all r (1.0) probe render target 1 all r (2.0) probe render target 2 all r (3.0) probe render target 3 all r (4.0)
-[pixel shader fail] +[pixel shader fail_tpf] void main(out float1x2 x : sv_target0, out float1x2 y : sv_target1) { x = float2(1.0, 2.0); @@ -78,7 +78,7 @@ void main(out float1x2 x : sv_target0, out float1x2 y : sv_target2) }
[test] -draw quad +todo_6 draw quad probe render target 0 all r (1.0) probe render target 1 all r (2.0) probe render target 2 all r (5.0) @@ -96,7 +96,7 @@ void main(out row_major float1x4 x : sv_target0, out float1x2 y : sv_target1) }
[test] -draw quad +todo_6 draw quad probe render target 0 all rgba (1.0, 2.0, 3.0, 4.0) probe render target 1 all r (5.0) probe render target 2 all r (6.0) diff --git a/tests/hlsl/max.shader_test b/tests/hlsl/max.shader_test index 3a5c3125..d39b272d 100644 --- a/tests/hlsl/max.shader_test +++ b/tests/hlsl/max.shader_test @@ -6,7 +6,7 @@ float4 main(uniform float2 u) : sv_target
[test] uniform 0 float4 0.7 -0.1 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.7, 2.1, 2.0, -1.0)
@@ -20,7 +20,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 0.7 -0.1 0.4 0.8 -draw quad +todo_6 draw quad probe all rgba (0.7, 0.8, 0.7, 0.2)
@@ -39,7 +39,7 @@ draw quad probe all rgba (6.0, 5.0, 4.0, 5.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 a = {1, 2, 3, 4}; diff --git a/tests/hlsl/nested-arrays.shader_test b/tests/hlsl/nested-arrays.shader_test index 66ae93e1..5f20d6d9 100644 --- a/tests/hlsl/nested-arrays.shader_test +++ b/tests/hlsl/nested-arrays.shader_test @@ -1,4 +1,4 @@ -[pixel shader fail] +[pixel shader fail_tpf] uniform float4 color[2][3];
float4 main() : sv_target @@ -21,5 +21,5 @@ uniform 8 float4 0.3 0.0 0.0 0.0 uniform 12 float4 0.4 0.0 0.0 0.0 uniform 16 float4 0.5 0.0 0.0 0.0 uniform 20 float4 0.6 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.4, 0.1, 0.6, 0.3) diff --git a/tests/hlsl/nointerpolation.shader_test b/tests/hlsl/nointerpolation.shader_test index 8f15be6e..66f92bbd 100644 --- a/tests/hlsl/nointerpolation.shader_test +++ b/tests/hlsl/nointerpolation.shader_test @@ -23,5 +23,5 @@ float4 main(nointerpolation float4 t : texcoord) : sv_target }
[test] -draw triangle list 3 +todo_6 draw triangle list 3 probe all rgba (0.0, 1.0, 0.0, 1.0) diff --git a/tests/hlsl/normalize.shader_test b/tests/hlsl/normalize.shader_test index 359a7590..3ff58ca2 100644 --- a/tests/hlsl/normalize.shader_test +++ b/tests/hlsl/normalize.shader_test @@ -8,7 +8,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 4.0 5.0 -draw quad +todo_6 draw quad probe all rgba (0.272165537, 0.408248305, 0.544331074, 0.680413842) 2
[pixel shader] @@ -21,7 +21,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 4.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.371390700, 0.557086051, 0.742781401, 0.0) 1
[pixel shader] @@ -34,7 +34,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 3.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.554700196, 0.832050323, 0.0, 0.0) 1
[pixel shader] @@ -47,7 +47,7 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] @@ -60,10 +60,10 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 2.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
-[pixel shader fail] +[pixel shader fail_tpf] uniform float1x3 x;
float4 main() : SV_TARGET @@ -71,7 +71,7 @@ float4 main() : SV_TARGET return normalize(x); }
-[pixel shader fail] +[pixel shader fail_tpf] uniform float4x1 x;
float4 main() : SV_TARGET diff --git a/tests/hlsl/numeric-types.shader_test b/tests/hlsl/numeric-types.shader_test index 7504f95a..d4b29fa0 100644 --- a/tests/hlsl/numeric-types.shader_test +++ b/tests/hlsl/numeric-types.shader_test @@ -31,14 +31,14 @@ float4 main() : sv_target draw quad probe all rgba (1.0, 2.0, 3.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] vector main() : sv_target { vector ret = vector(1.0, 2.0, 3.0); return ret; }
-[pixel shader fail] +[pixel shader fail_tpf] vector main() : sv_target { vector<float> ret = vector(1.0, 2.0, 3.0, 4.0); @@ -71,7 +71,7 @@ float4 main() : sv_target draw quad probe all rgba (5.0, 6.0, 7.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { matrix m = matrix<float>(1.0, 2.0, 3.0, 4.0, @@ -81,7 +81,7 @@ float4 main() : sv_target return m[1]; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { matrix m = matrix<float, 4>(1.0, 2.0, 3.0, 4.0, @@ -91,7 +91,7 @@ float4 main() : sv_target return m[1]; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { matrix m = matrix(1.0, 2.0, 3.0, 4.0, diff --git a/tests/hlsl/numthreads.shader_test b/tests/hlsl/numthreads.shader_test index 404d7d76..a13bd7ed 100644 --- a/tests/hlsl/numthreads.shader_test +++ b/tests/hlsl/numthreads.shader_test @@ -8,52 +8,52 @@ shader model >= 5.0 [numthreads(1, 1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads(1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads(1, 1, 1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads(0, 1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads(1, 0, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads(1, 1, 0)] void main() {}
-[compute shader fail todo] +[compute shader fail_tpf todo]
[numthreads(-1, 1, 1)] void main() {}
-[compute shader fail todo] +[compute shader fail_tpf todo]
[numthreads(1, -1, 1)] void main() {}
-[compute shader fail todo] +[compute shader fail_tpf todo]
[numthreads(1, 1, -1)] void main() {}
-[compute shader fail todo] +[compute shader fail_tpf todo]
[numthreads(1, -1, -1)] void main() {} @@ -68,12 +68,12 @@ void main() {} [numthreads(int(1), 1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads(float(1), 1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads(uint1(1), 1, 1)] void main() {} @@ -88,7 +88,7 @@ void main() {} [numthreads(1 + 1, 1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[numthreads("1", 1, 1)] void main() {} @@ -99,11 +99,11 @@ static int x = 1; [numthreads(x, 1, 1)] void main() {}
-[compute shader fail] +[compute shader fail_tpf]
void main() {}
-[compute shader fail] +[compute shader fail_tpf]
[NumThreads(1, 1, 1)] void main() {} @@ -115,21 +115,21 @@ void main();
void main() {}
-[compute shader fail] +[compute shader fail_tpf]
void main() {}
[numthreads(1, 1, 1)] void main();
-[compute shader fail] +[compute shader fail_tpf]
void main();
[numthreads(1, 1, 1)] void main() {}
-[compute shader fail todo] +[compute shader fail_tpf todo]
/* Expressions with side effects are forbidden in attributes (but not if the * attribute is ignored). */ @@ -139,14 +139,14 @@ static int x = 1; [numthreads(x++, 1, 1)] void main() {}
-[compute shader fail todo] +[compute shader fail_tpf todo]
static int x = 1;
[numthreads(++x, 1, 1)] void main() {}
-[compute shader fail todo] +[compute shader fail_tpf todo]
static int x = 1;
@@ -186,7 +186,7 @@ void main(uint2 id : sv_dispatchthreadid)
[test] dispatch 1 1 1 -probe uav 0 (0, 0) r (2.0) +todo_6 probe uav 0 (0, 0) r (2.0) probe uav 0 (0, 1) r (1.0) -probe uav 0 (1, 0) r (2.0) +todo_6 probe uav 0 (1, 0) r (2.0) probe uav 0 (1, 1) r (1.0) diff --git a/tests/hlsl/object-field-offsets.shader_test b/tests/hlsl/object-field-offsets.shader_test index 8afd9af7..84ea885d 100644 --- a/tests/hlsl/object-field-offsets.shader_test +++ b/tests/hlsl/object-field-offsets.shader_test @@ -19,7 +19,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 3.0, 0.0)
@@ -45,7 +45,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 5.0, 0.0)
@@ -66,5 +66,5 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 3.0 4.0 uniform 4 float4 5.0 6.0 7.0 8.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 5.0, 0.0) diff --git a/tests/hlsl/object-parameters.shader_test b/tests/hlsl/object-parameters.shader_test index c6109aef..a84dee00 100644 --- a/tests/hlsl/object-parameters.shader_test +++ b/tests/hlsl/object-parameters.shader_test @@ -1,4 +1,4 @@ -[pixel shader fail todo] +[pixel shader fail_tpf todo] Texture2D tex0;
float4 main(out Texture2D tex : TEXTURE) : sv_target @@ -7,7 +7,7 @@ float4 main(out Texture2D tex : TEXTURE) : sv_target }
-[pixel shader fail todo] +[pixel shader fail todo skip_dxil] struct params { Texture2D tex : TEXTURE; @@ -109,7 +109,7 @@ float4 main(struct apple input) : sv_target }
[test] -todo draw quad +todo todo_6 draw quad todo probe all rgba (416.0, 416.0, 416.0, 111.0)
@@ -132,7 +132,7 @@ float4 main(struct apple input, sampler samp) : sv_target }
[test] -todo draw quad +todo todo_6 draw quad todo probe all rgba (1.0, 1.0, 0.5, 0.5)
@@ -178,5 +178,5 @@ float4 main(struct apple input, sampler samp) : sv_target
[test] -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.5, 1.0, 0.5, 1.0) diff --git a/tests/hlsl/object-references.shader_test b/tests/hlsl/object-references.shader_test index 5ed4dcd6..71bca19c 100644 --- a/tests/hlsl/object-references.shader_test +++ b/tests/hlsl/object-references.shader_test @@ -1,4 +1,4 @@ -[pixel shader fail] +[pixel shader fail_tpf] sampler sam;
float4 main() : sv_target @@ -46,7 +46,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (77.77, 77.77, 77.77, 77.77)
@@ -73,7 +73,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -draw quad +todo_6 draw quad probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4) probe (1, 0) rgba (0.5, 0.7, 0.6, 0.8) probe (0, 1) rgba (0.6, 0.5, 0.2, 0.1) @@ -111,7 +111,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (312, 312, 312, 111)
@@ -134,11 +134,11 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (2132, 2132, 2132, 1111)
-[pixel shader fail] +[pixel shader fail_tpf] Texture2D tex[3]; uniform int n;
@@ -158,7 +158,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Note: Only valid in shader model 5.1 Texture2D tex[3]; uniform int n; @@ -169,7 +169,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] // Note: Only valid in shader model 5.1 RWTexture2D<float4> tex[3]; uniform int n; @@ -202,11 +202,11 @@ float4 main() : sv_target
[test] uniform 0 float 10.0 -draw quad +todo_6 draw quad probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main(Texture2D tex2) : sv_target { Texture2D tex1; @@ -236,5 +236,5 @@ float4 main(struct apple input) : sv_target }
[test] -todo draw quad +todo todo_6 draw quad todo probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0) diff --git a/tests/hlsl/pow.shader_test b/tests/hlsl/pow.shader_test index 1bb3bd94..bf3852c3 100644 --- a/tests/hlsl/pow.shader_test +++ b/tests/hlsl/pow.shader_test @@ -6,7 +6,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 0.4 0.8 2.5 2.0 -draw quad +todo_6 draw quad probe all rgba (0.512, 0.101192884, 0.64, 0.25) 4
@@ -25,7 +25,7 @@ draw quad probe all rgba (1.0, 32.0, 256.0, 125.0) 2
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 a = {1, 2, 3, 4}; diff --git a/tests/hlsl/reflect.shader_test b/tests/hlsl/reflect.shader_test index 02488589..d04a0030 100644 --- a/tests/hlsl/reflect.shader_test +++ b/tests/hlsl/reflect.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.4 -0.3 1.0 -draw quad +todo_6 draw quad probe all rgba (-0.1, -0.5, 0.5, -0.7) 4
[pixel shader] @@ -27,7 +27,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 0.0 0.0 0.0 uniform 4 float4 0.6 0.4 -0.3 1.0 -draw quad +todo_6 draw quad probe all rgba (-0.52, -0.18, 1.01, -1.2) 4
[pixel shader] @@ -44,7 +44,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.3 uniform 4 float4 0.6 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (-0.148, -0.748, -0.448, -0.348) 4
[pixel shader] @@ -62,7 +62,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 0.0 0.0 0.0 uniform 4 float4 0.6 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.14, 0.14, 0.14, 0.14) 4
[pixel shader] @@ -79,7 +79,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.0 0.0 uniform 4 float4 0.6 0.4 -0.3 1.0 -draw quad +todo_6 draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4
[pixel shader] @@ -97,5 +97,5 @@ float4 main() : sv_target [test] uniform 0 float4 0.5 -0.1 0.2 0.0 uniform 4 float4 0.6 0.4 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.188, -0.308, 0.0, 0.0) 4 diff --git a/tests/hlsl/register-reservations.shader_test b/tests/hlsl/register-reservations.shader_test index 7e109eca..716f18f3 100644 --- a/tests/hlsl/register-reservations.shader_test +++ b/tests/hlsl/register-reservations.shader_test @@ -34,7 +34,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (41.0, 41.0, 41.0, 1089.0)
@@ -50,7 +50,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 99.0)
@@ -65,7 +65,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 99.0)
@@ -80,7 +80,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 99.0)
@@ -97,7 +97,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.0, 0.0, 0.0, 99.0) +todo_6 probe all rgba (0.0, 0.0, 0.0, 99.0)
[pixel shader] Texture2D unused[2][2] : register(t0); @@ -109,7 +109,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (4.0, 4.0, 4.0, 99.0)
@@ -125,7 +125,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 99.0)
@@ -140,7 +140,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (2.0, 2.0, 2.0, 99.0)
@@ -154,5 +154,5 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (2.0, 2.0, 2.0, 99.0) diff --git a/tests/hlsl/return-implicit-conversion.shader_test b/tests/hlsl/return-implicit-conversion.shader_test index 1767748b..e86dab1b 100644 --- a/tests/hlsl/return-implicit-conversion.shader_test +++ b/tests/hlsl/return-implicit-conversion.shader_test @@ -98,7 +98,7 @@ float4 main() : sv_target draw quad probe all rgba (0.4, 0.3, 0.2, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float3x1 func() { return float1x3(0.4, 0.3, 0.2); @@ -109,7 +109,7 @@ float4 main() : sv_target return float4(func(), 0.0); }
-[pixel shader fail] +[pixel shader fail_tpf] float1x3 func() { return float3x1(0.4, 0.3, 0.2); @@ -165,7 +165,7 @@ float4 main() : sv_target draw quad probe all rgba (0.4, 0.3, 0.2, 0.0)
-[pixel shader fail todo] +[pixel shader fail_tpf todo] float3x1 func() { return float4(0.4, 0.3, 0.2, 0.1); @@ -191,7 +191,7 @@ float4 main() : sv_target draw quad probe all rgba (0.4, 0.3, 0.2, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float3x1 func() { return float1x4(0.4, 0.3, 0.2, 0.1); @@ -217,7 +217,7 @@ float4 main() : sv_target draw quad probe all rgba (0.4, 0.3, 0.2, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float1x3 func() { return float4x1(0.4, 0.3, 0.2, 0.1); diff --git a/tests/hlsl/return.shader_test b/tests/hlsl/return.shader_test index 9f800d1a..0262160c 100644 --- a/tests/hlsl/return.shader_test +++ b/tests/hlsl/return.shader_test @@ -38,10 +38,10 @@ float4 main() : sv_target
[test] uniform 0 float 0.2 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) uniform 0 float 0.8 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.6, 0.7, 0.8)
[pixel shader] @@ -65,10 +65,10 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.2 -draw quad +todo_6 draw quad probe all rgba (0.3, 0.4, 0.5, 0.6) uniform 0 float 0.8 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4)
[pixel shader] @@ -92,13 +92,13 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.1 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) 1 uniform 0 float 0.5 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.3, 0.4, 0.5) 1 uniform 0 float 0.9 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.6, 0.7, 0.8) 1
[pixel shader] @@ -119,13 +119,13 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.1 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) 1 uniform 0 float 0.5 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.6, 0.7, 0.8) 1 uniform 0 float 0.9 -draw quad +todo_6 draw quad probe all rgba (0.4, 0.5, 0.6, 0.7) 1
[pixel shader] @@ -166,23 +166,23 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.1, 0.1, 0.1) 1
uniform 0 float 0.1 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.2, 0.2, 0.2) 1
uniform 0 float 0.3 -draw quad +todo_6 draw quad probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 0 float 0.7 -draw quad +todo_6 draw quad probe all rgba (0.8, 0.8, 0.8, 0.8) 1
uniform 0 float 0.9 -draw quad +todo_6 draw quad probe all rgba (0.9, 0.9, 0.9, 0.9) 1
[pixel shader] @@ -211,10 +211,10 @@ void main(out float4 ret : sv_target)
[test] uniform 0 float 0.2 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.2, 0.2, 0.2) uniform 0 float 0.8 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
[pixel shader todo] @@ -243,21 +243,21 @@ void main(out float4 ret : sv_target) uniform 0 float4 0.3 0.0 0.0 0.0 uniform 4 float4 0.0 0.0 0.0 0.0 uniform 8 float4 0.1 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.1, 0.1, 0.1, 0.1) 1
uniform 4 float4 0.35 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.2, 0.2, 0.2, 0.2) 1
uniform 8 float4 0.5 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 0 float4 1.0 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.4, 0.4, 0.4, 0.4) 1
uniform 4 float4 2.0 0.0 0.0 0.0 -todo draw quad +todo todo_6 draw quad todo probe all rgba (0.9, 0.9, 0.9, 0.9) 1 diff --git a/tests/hlsl/round.shader_test b/tests/hlsl/round.shader_test index 5e40dc6d..f2b1d310 100644 --- a/tests/hlsl/round.shader_test +++ b/tests/hlsl/round.shader_test @@ -6,7 +6,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.4 -6.6 7.6 3.4 -draw quad +todo_6 draw quad probe all rgba (0.0, -7.0, 8.0, 3.0) 4
@@ -22,7 +22,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.4 -6.6 7.6 3.4 -draw quad +todo_6 draw quad probe all rgba (-7.0, 8.0, 0.0, 3.0) 4
@@ -36,5 +36,5 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -1 0 2 10 -draw quad +todo_6 draw quad probe all rgba (-1.0, 0.0, 2.0, 10.0) 4 diff --git a/tests/hlsl/sample-bias.shader_test b/tests/hlsl/sample-bias.shader_test index 08e50696..089b4b33 100644 --- a/tests/hlsl/sample-bias.shader_test +++ b/tests/hlsl/sample-bias.shader_test @@ -31,13 +31,13 @@ float4 main(float2 coord : texcoord) : sv_target
[test] uniform 0 float4 6.5 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (10.0, 0.0, 10.0, 0.0)
uniform 0 float4 7.5 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (4.0, 0.0, 10.0, 0.0)
uniform 0 float4 8.5 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 10.0, 0.0) diff --git a/tests/hlsl/sample-grad.shader_test b/tests/hlsl/sample-grad.shader_test index c37da299..75ce865d 100644 --- a/tests/hlsl/sample-grad.shader_test +++ b/tests/hlsl/sample-grad.shader_test @@ -26,11 +26,11 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) uniform 0 float4 1.0 1.0 1.0 1.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 1.0, 0.0) uniform 0 float4 2.0 2.0 2.0 2.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/sample-level.shader_test b/tests/hlsl/sample-level.shader_test index ec7c7e2a..1ed90316 100644 --- a/tests/hlsl/sample-level.shader_test +++ b/tests/hlsl/sample-level.shader_test @@ -26,11 +26,11 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 0.0, 1.0, 0.0) uniform 0 float4 0.5 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.0, 1.0, 0.0) uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/sampler-offset.shader_test b/tests/hlsl/sampler-offset.shader_test index 6f8357df..d6cc4fb0 100644 --- a/tests/hlsl/sampler-offset.shader_test +++ b/tests/hlsl/sampler-offset.shader_test @@ -22,7 +22,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.5, 0.0)
@@ -36,7 +36,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.2, 0.2, 0.0, 0.4)
@@ -50,5 +50,5 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.0, 0.2, 0.0, 0.4) diff --git a/tests/hlsl/sampler.shader_test b/tests/hlsl/sampler.shader_test index c4b38b32..02e72dd5 100644 --- a/tests/hlsl/sampler.shader_test +++ b/tests/hlsl/sampler.shader_test @@ -17,7 +17,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.25, 0, 0.25, 0)
[pixel shader] @@ -30,10 +30,10 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (0.25, 0, 0.25, 0)
-[pixel shader fail] +[pixel shader fail_tpf] sampler2D s;
float4 main() : sv_target @@ -42,7 +42,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s;
float4 main() : sv_target diff --git a/tests/hlsl/saturate.shader_test b/tests/hlsl/saturate.shader_test index 41ccc62a..e3d4eb1a 100644 --- a/tests/hlsl/saturate.shader_test +++ b/tests/hlsl/saturate.shader_test @@ -6,7 +6,7 @@ float4 main(uniform float2 u) : sv_target
[test] uniform 0 float4 0.7 -0.1 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.7, 0.0, 1.0, 0.0)
[pixel shader] @@ -18,5 +18,5 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -2 0 2 -1 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 1.0, 0.0) diff --git a/tests/hlsl/shader-interstage-interface.shader_test b/tests/hlsl/shader-interstage-interface.shader_test index 584b88cf..56df0a41 100644 --- a/tests/hlsl/shader-interstage-interface.shader_test +++ b/tests/hlsl/shader-interstage-interface.shader_test @@ -52,5 +52,5 @@ void main(float4 position : SV_Position, float2 t0 : TEXCOORD0, }
[test] -draw triangle strip 4 +todo_6 draw triangle strip 4 probe all rgba (10.0, 8.0, 7.0, 3.0) diff --git a/tests/hlsl/side-effects.shader_test b/tests/hlsl/side-effects.shader_test index 8e4557f0..6c09e734 100644 --- a/tests/hlsl/side-effects.shader_test +++ b/tests/hlsl/side-effects.shader_test @@ -44,4 +44,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (2.2, 2.2, 2.2, 2.2) +todo_6 probe all rgba (2.2, 2.2, 2.2, 2.2) diff --git a/tests/hlsl/sign.shader_test b/tests/hlsl/sign.shader_test index 7ed632db..da3060f5 100644 --- a/tests/hlsl/sign.shader_test +++ b/tests/hlsl/sign.shader_test @@ -8,13 +8,13 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0) uniform 0 float4 -1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (-1.0, -1.0, -1.0, -1.0) uniform 0 float4 0.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader] @@ -27,7 +27,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] @@ -41,7 +41,7 @@ float4 main() : sv_target [test] uniform 0 float4 1.0 2.0 0.0 0.0 uniform 4 float4 3.0 4.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 1.0, 1.0, 1.0)
[pixel shader] @@ -54,13 +54,13 @@ float4 main() : sv_target
[test] uniform 0 int4 1 0 0 0 -draw quad +todo_6 draw quad probe all rgba (1, 1, 1, 1) uniform 0 int4 -1 0 0 0 -draw quad +todo_6 draw quad probe all rgba (-1, -1, -1, -1) uniform 0 int4 0 0 0 0 -draw quad +todo_6 draw quad probe all rgba (0, 0, 0, 0)
[pixel shader] @@ -73,7 +73,7 @@ float4 main() : sv_target
[test] uniform 0 int4 1 2 3 4 -draw quad +todo_6 draw quad probe all rgba (1, 1, 1, 1)
[pixel shader] @@ -87,5 +87,5 @@ float4 main() : sv_target [test] uniform 0 int4 1 2 0 0 uniform 4 int4 3 4 0 0 -draw quad +todo_6 draw quad probe all rgba (1, 1, 1, 1) diff --git a/tests/hlsl/smoothstep.shader_test b/tests/hlsl/smoothstep.shader_test index 63755b08..e87535d7 100644 --- a/tests/hlsl/smoothstep.shader_test +++ b/tests/hlsl/smoothstep.shader_test @@ -27,7 +27,7 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0, 0.104, 0.896, 1.000000) 5 +todo_6 probe all rgba (0, 0.104, 0.896, 1.000000) 5
[pixel shader] @@ -154,7 +154,7 @@ draw quad probe all rgba (0.5, 0.5, 0.5, 0.5)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 a = {0.0, 0.0, 0.0, 0.0}; diff --git a/tests/hlsl/sqrt.shader_test b/tests/hlsl/sqrt.shader_test index 78d89d38..efb68cf7 100644 --- a/tests/hlsl/sqrt.shader_test +++ b/tests/hlsl/sqrt.shader_test @@ -8,7 +8,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 9.0 32.3 46.5 -draw quad +todo_6 draw quad probe all rgba (1.0, 3.0, 5.683309, 6.819091) 1
[pixel shader] @@ -21,5 +21,5 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 9.0 4.0 16.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 0.33333333, 0.5, 0.25) 1 diff --git a/tests/hlsl/state-block-syntax.shader_test b/tests/hlsl/state-block-syntax.shader_test index 26853bf4..8c3a2416 100644 --- a/tests/hlsl/state-block-syntax.shader_test +++ b/tests/hlsl/state-block-syntax.shader_test @@ -1,4 +1,4 @@ -[pixel shader fail] +[pixel shader fail_tpf] sampler s { foo = float; @@ -9,7 +9,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s = sampler_state { foo = float; @@ -20,7 +20,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s { 2 = 3; @@ -31,7 +31,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s { 2; @@ -42,7 +42,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s { foo; @@ -53,7 +53,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s { foo = bar @@ -64,7 +64,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s {}
float4 main() : sv_target @@ -72,7 +72,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float f {} = 1;
float4 main() : sv_target @@ -80,7 +80,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float f = 1 {};
float4 main() : sv_target @@ -88,7 +88,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] sampler s = sampler_state;
float4 main() : sv_target @@ -96,7 +96,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float f {} : register(c1);
float4 main() : sv_target @@ -104,7 +104,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float f { foo = (sampler)2; @@ -115,7 +115,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float f { foo = (faketype)2; @@ -126,7 +126,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float f { foo = (sampler)bar; @@ -137,7 +137,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float f { foo = bar(); diff --git a/tests/hlsl/static-initializer.shader_test b/tests/hlsl/static-initializer.shader_test index 8415d851..c9241a5f 100644 --- a/tests/hlsl/static-initializer.shader_test +++ b/tests/hlsl/static-initializer.shader_test @@ -16,7 +16,7 @@ draw quad probe all rgba (0.8, 0.0, 0.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] static uint i;
float4 main() : sv_target @@ -65,7 +65,7 @@ size (1, 1) 1.0 2.0 3.0 4.0
-[pixel shader fail] +[pixel shader fail_tpf] static Texture2D tex; sampler sam;
@@ -124,7 +124,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] static Texture2D tex1; sampler sam;
@@ -146,7 +146,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (1, 2, 3, 4)
@@ -162,7 +162,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (1, 2, 3, 4)
diff --git a/tests/hlsl/step.shader_test b/tests/hlsl/step.shader_test index e201e15f..162bc8ec 100644 --- a/tests/hlsl/step.shader_test +++ b/tests/hlsl/step.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 5.0 -2.6 3.0 2.0 uniform 4 float4 1.0 -4.3 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (0.0, 0.0, 1.0, 1.0)
@@ -27,7 +27,7 @@ draw quad probe all rgba (1.0, 1.0, 1.0, 0.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float2x2 a = {1, 2, 3, 4}; diff --git a/tests/hlsl/storage-qualifiers.shader_test b/tests/hlsl/storage-qualifiers.shader_test index 00e7b836..d36dbe4f 100644 --- a/tests/hlsl/storage-qualifiers.shader_test +++ b/tests/hlsl/storage-qualifiers.shader_test @@ -17,5 +17,5 @@ void main(in uniform float4 a, uniform float4 b, out float4 o : sv_target) [test] uniform 0 float4 0.1 0.0 0.0 0.0 uniform 4 float4 0.2 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.1, 0.2, 0.3, 0.4) diff --git a/tests/hlsl/struct-array.shader_test b/tests/hlsl/struct-array.shader_test index aff0a677..2c13b1c0 100644 --- a/tests/hlsl/struct-array.shader_test +++ b/tests/hlsl/struct-array.shader_test @@ -18,5 +18,5 @@ float4 main() : sv_target uniform 0 float4 0.1 0.2 0.0 0.0 uniform 4 float4 0.3 0.4 0.0 0.0 uniform 8 float4 0.5 0.6 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.2, 0.3, 0.6, 0.5) diff --git a/tests/hlsl/swizzle-constant-prop.shader_test b/tests/hlsl/swizzle-constant-prop.shader_test index 357a3496..33de96bd 100644 --- a/tests/hlsl/swizzle-constant-prop.shader_test +++ b/tests/hlsl/swizzle-constant-prop.shader_test @@ -25,7 +25,7 @@ float4 main() : sv_target
[test] uniform 0 int 4 -draw quad +todo_6 draw quad probe all rgba (110, 210, 410, 410)
@@ -43,7 +43,7 @@ float4 main() : sv_target
[test] uniform 0 int 3 -draw quad +todo_6 draw quad probe all rgba (105, 5, 305, 305)
@@ -59,5 +59,5 @@ float4 main() : sv_target
[test] uniform 0 int 1 -draw quad +todo_6 draw quad probe all rgba (14.0, 14.0, 14.0, 14.0) diff --git a/tests/hlsl/swizzle-matrix.shader_test b/tests/hlsl/swizzle-matrix.shader_test index bc2814eb..2fb2f51d 100644 --- a/tests/hlsl/swizzle-matrix.shader_test +++ b/tests/hlsl/swizzle-matrix.shader_test @@ -9,7 +9,7 @@ float4 main() : sv_target [test] uniform 0 float4 11 21 31 -1 uniform 4 float4 12 22 32 -1 -draw quad +todo_6 draw quad probe all rgba (21.0, 31.0, 11.0, 12.0)
@@ -24,7 +24,7 @@ float4 main() : sv_target [test] uniform 0 float4 11 21 31 -1 uniform 4 float4 12 22 32 -1 -draw quad +todo_6 draw quad probe all rgba (11.0, 31.0, 12.0, 32.0)
@@ -40,7 +40,7 @@ float4 main() : sv_target uniform 0 float4 11 12 -1 -1 uniform 4 float4 21 22 -1 -1 uniform 8 float4 31 32 -1 -1 -draw quad +todo_6 draw quad probe all rgba (11.0, 31.0, 12.0, 32.0)
@@ -59,7 +59,7 @@ probe all rgba (1.0, 6.0, 1.0, 6.0)
% zero-based and one-based subscripts cannot be used in the same swizzle. -[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -69,7 +69,7 @@ float4 main() : sv_target }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -78,7 +78,7 @@ float4 main() : sv_target return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -87,7 +87,7 @@ float4 main() : sv_target return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -96,7 +96,7 @@ float4 main() : sv_target return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -105,7 +105,7 @@ float4 main() : sv_target return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -114,7 +114,7 @@ float4 main() : sv_target return 0.0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -122,7 +122,7 @@ float4 main() : sv_target return mat._11_11_11_11_11; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3x2 mat = {1, 2, 3, 4, 5, 6}; @@ -131,7 +131,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float3 vec = {1, 2, 3}; @@ -169,7 +169,7 @@ float4 main() : sv_target
[test] uniform 0 float4 20 30 40 -1 -todo draw quad +todo todo_6 draw quad todo probe all rgba (10.0, 20.0, 30.0, 40.0)
@@ -187,12 +187,12 @@ float4 main() : sv_target
[test] uniform 0 float4 20 30 80 -1 -todo draw quad +todo todo_6 draw quad todo probe all rgba (80.0, 30.0, 20.0, 10.0)
% Cannot repeat components when assigning to a swizzle. -[pixel shader fail todo] +[pixel shader fail_tpf todo] float4 main() : sv_target { float2x2 mat = {1, 2, 3, 4}; diff --git a/tests/hlsl/swizzles.shader_test b/tests/hlsl/swizzles.shader_test index c3d3343f..dd336fcd 100644 --- a/tests/hlsl/swizzles.shader_test +++ b/tests/hlsl/swizzles.shader_test @@ -11,7 +11,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0303 0.08 0.07 0.0202 -draw quad +todo_6 draw quad probe all rgba (0.0101, 0.0303, 0.0202, 0.0404)
@@ -149,7 +149,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 3.0, 4.0)
@@ -166,5 +166,5 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 4.0, 2.0, 3.0) diff --git a/tests/hlsl/ternary.shader_test b/tests/hlsl/ternary.shader_test index 91f49e0e..12e04c3d 100644 --- a/tests/hlsl/ternary.shader_test +++ b/tests/hlsl/ternary.shader_test @@ -8,10 +8,10 @@ float4 main() : sv_target
[test] uniform 0 float4 2.0 3.0 4.0 5.0 -draw quad +todo_6 draw quad probe all rgba (2.0, 3.0, 4.0, 5.0) uniform 0 float4 0.0 10.0 11.0 12.0 -draw quad +todo_6 draw quad probe all rgba (-1.0, 9.0, 10.0, 11.0)
[pixel shader] @@ -29,7 +29,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.1 3.0 4.0 5.0 -draw quad +todo_6 draw quad probe all rgba (1.1, 2.0, 0.0, 0.0)
[pixel shader] @@ -44,7 +44,7 @@ float4 main() : sv_target
[test] uniform 0 float4 1.0 0.0 0.0 0.0 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.6, 0.7, 0.0)
[pixel shader] @@ -60,4 +60,4 @@ uniform 0 float4 0.0 1.0 0.0 -3.0 uniform 4 float4 1.0 2.0 3.0 4.0 uniform 8 float4 5.0 6.0 7.0 8.0 draw quad -probe all rgba (5.0, 2.0, 7.0, 4.0) +todo_6 probe all rgba (5.0, 2.0, 7.0, 4.0) diff --git a/tests/hlsl/texture-load-offset.shader_test b/tests/hlsl/texture-load-offset.shader_test index 52b6a5f9..9746191e 100644 --- a/tests/hlsl/texture-load-offset.shader_test +++ b/tests/hlsl/texture-load-offset.shader_test @@ -18,7 +18,7 @@ float4 main(float4 pos : sv_position) : sv_target
[test] -draw quad +todo_6 draw quad probe (0, 0) rgba (0, 1, 0, 1) probe (1, 0) rgba (1, 1, 0, 1) probe (0, 1) rgba (0, 2, 0, 1) @@ -35,14 +35,14 @@ float4 main(float4 pos : sv_position) : sv_target
[test] -draw quad +todo_6 draw quad probe (3, 0) rgba (1, 0, 0, 1) probe (4, 0) rgba (2, 0, 0, 1) probe (3, 1) rgba (1, 1, 0, 1) probe (4, 1) rgba (2, 1, 0, 1)
-[pixel shader fail] +[pixel shader fail_tpf] Texture2D t;
float4 main(float4 pos : sv_position) : sv_target diff --git a/tests/hlsl/texture-load-typed.shader_test b/tests/hlsl/texture-load-typed.shader_test index c9227337..d71f715d 100644 --- a/tests/hlsl/texture-load-typed.shader_test +++ b/tests/hlsl/texture-load-typed.shader_test @@ -1,7 +1,7 @@ [require] shader model >= 4.0
-[pixel shader fail] +[pixel shader fail_tpf] texture<float> t;
float4 main() : sv_target @@ -9,7 +9,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] typedef Texture2D mytex_t; mytex_t<float> t;
@@ -49,4 +49,4 @@ float4 main() : sv_target
[test] draw quad -probe all rgba (0.8, -3.0, 4294967295.0, 123.0) +todo_6 probe all rgba (0.8, -3.0, 4294967295.0, 123.0) diff --git a/tests/hlsl/texture-load.shader_test b/tests/hlsl/texture-load.shader_test index 362e1d2e..e2d68c32 100644 --- a/tests/hlsl/texture-load.shader_test +++ b/tests/hlsl/texture-load.shader_test @@ -15,7 +15,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -draw quad +todo_6 draw quad probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4) probe (1, 0) rgba (0.5, 0.7, 0.6, 0.8) probe (0, 1) rgba (0.6, 0.5, 0.2, 0.1) @@ -30,7 +30,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -draw quad +todo_6 draw quad probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4) probe (1, 0) rgba (0.6, 0.5, 0.2, 0.1) probe (0, 1) rgba (0.5, 0.7, 0.6, 0.8) @@ -46,7 +46,7 @@ float4 main(float4 pos : sv_position) : sv_target }
[test] -draw quad +todo_6 draw quad probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4) probe (1, 0) rgba (0.6, 0.5, 0.2, 0.1) probe (0, 1) rgba (0.5, 0.7, 0.6, 0.8) diff --git a/tests/hlsl/texture-ordering.shader_test b/tests/hlsl/texture-ordering.shader_test index 2291ddf8..c4f8fdbe 100644 --- a/tests/hlsl/texture-ordering.shader_test +++ b/tests/hlsl/texture-ordering.shader_test @@ -133,7 +133,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (450, 139, 876, 333)
@@ -186,7 +186,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (450, 138, 796, 333)
@@ -239,7 +239,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (478, 913, 256, 333)
@@ -272,7 +272,7 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (215, 215, 215, 111)
@@ -302,5 +302,5 @@ float4 main() : sv_target }
[test] -draw quad +todo_6 draw quad probe all rgba (5, 4, 2, 0) diff --git a/tests/hlsl/transpose.shader_test b/tests/hlsl/transpose.shader_test index 83852fa1..e0057fed 100644 --- a/tests/hlsl/transpose.shader_test +++ b/tests/hlsl/transpose.shader_test @@ -22,7 +22,7 @@ draw quad probe all rgba (5.0, 5.0, 5.0, 5.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : sv_target { float4 x = float4(1, 2, 3, 4); diff --git a/tests/hlsl/trigonometry.shader_test b/tests/hlsl/trigonometry.shader_test index 09933d3b..a0476a69 100644 --- a/tests/hlsl/trigonometry.shader_test +++ b/tests/hlsl/trigonometry.shader_test @@ -12,7 +12,7 @@ float4 main(float tex : texcoord) : sv_target }
[test] -draw quad +todo_6 draw quad probe ( 0, 0) rgba ( 0.00000000, 1.00000000, 0.0, 0.0) probe ( 1, 0) rgba ( 0.84147098, 0.54030231, 0.0, 0.0) 1024 probe ( 2, 0) rgba ( 0.90929743, -0.41614684, 0.0, 0.0) 1024 @@ -41,7 +41,7 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.52359877 2.61799387 3.14159265 -draw quad +todo_6 draw quad probe all rgba (0.0, 500.0, 500.0, 0.0)
@@ -55,5 +55,5 @@ float4 main() : sv_target
[test] uniform 0 float4 0.0 0.78539816 1.57079632 2.35619449 -draw quad +todo_6 draw quad probe all rgba (1000.0, 707.0, -0.0, -707.0) diff --git a/tests/hlsl/trunc.shader_test b/tests/hlsl/trunc.shader_test index 419608fb..5333f7ff 100644 --- a/tests/hlsl/trunc.shader_test +++ b/tests/hlsl/trunc.shader_test @@ -6,10 +6,10 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo_6 draw quad probe all rgba (0.0, 6.0, 7.0, 3.0) uniform 0 float4 -1.5 6.5 7.5 3.4 -draw quad +todo_6 draw quad probe all rgba (-1.0, 6.0, 7.0, 3.0)
[pixel shader] @@ -23,7 +23,7 @@ float4 main(uniform float4 u) : sv_target
[test] uniform 0 float4 -0.5 6.5 7.5 3.4 -draw quad +todo_6 draw quad probe all rgba (6.0, 7.0, 0.0, 3.0)
[require] @@ -40,5 +40,5 @@ float4 main(uniform int4 u) : sv_target
[test] uniform 0 int4 -1 6 7 3 -draw quad +todo_6 draw quad probe all rgba (6.0, 7.0, -1.0, 3.0) diff --git a/tests/hlsl/type-names.shader_test b/tests/hlsl/type-names.shader_test index f382ffae..ef2e44bd 100644 --- a/tests/hlsl/type-names.shader_test +++ b/tests/hlsl/type-names.shader_test @@ -38,10 +38,10 @@ float4 main() : SV_TARGET
[test] draw quad -probe all rgba (2.0, 3.0, 4.0, 5.0) +todo_6 probe all rgba (2.0, 3.0, 4.0, 5.0)
% The "dword" alias is pre-defined as lowercase -[pixel shader fail] +[pixel shader fail_tpf] typedef float2 dword;
float4 main() : sv_target @@ -49,7 +49,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] struct DWORD s;
float4 main() : sv_target @@ -57,7 +57,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] typedef float2 float;
float4 main() : sv_target @@ -65,7 +65,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] typedef float2 matrix;
float4 main() : sv_target @@ -73,7 +73,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 f() { typedef float2 matrix; @@ -85,7 +85,7 @@ float4 main() : SV_TARGET return f(); }
-[pixel shader fail] +[pixel shader fail_tpf] float4 f() { typedef float2 vector; @@ -97,7 +97,7 @@ float4 main() : SV_TARGET return f(); }
-[pixel shader fail] +[pixel shader fail_tpf] Matrix<float, 2, 2> m;
float4 main() : sv_target @@ -105,7 +105,7 @@ float4 main() : sv_target return float4(0, 0, 0, 0); }
-[pixel shader fail] +[pixel shader fail_tpf] Vector<float, 2> v;
float4 main() : sv_target diff --git a/tests/hlsl/uav-load.shader_test b/tests/hlsl/uav-load.shader_test index fe6350e0..cad30726 100644 --- a/tests/hlsl/uav-load.shader_test +++ b/tests/hlsl/uav-load.shader_test @@ -23,7 +23,7 @@ void main() }
[test] -dispatch 1 1 1 +todo_6 dispatch 1 1 1 probe uav 0 (0, 0) r (0.6) probe uav 0 (1, 0) r (0.6) probe uav 0 (2, 0) r (0.6) diff --git a/tests/hlsl/uav-out-param.shader_test b/tests/hlsl/uav-out-param.shader_test index f3134474..4eea79c1 100644 --- a/tests/hlsl/uav-out-param.shader_test +++ b/tests/hlsl/uav-out-param.shader_test @@ -27,7 +27,7 @@ void main()
[test] dispatch 1 1 1 -probe uav 0 (0, 0) rgba (0.4, 0.1, 0.2, 0.3) +todo_6 probe uav 0 (0, 0) rgba (0.4, 0.1, 0.2, 0.3)
[uav 0] format r32 float @@ -51,5 +51,5 @@ void main() }
[test] -dispatch 1 1 1 +todo_6 dispatch 1 1 1 probe uav 0 (0, 0) r (0.2) diff --git a/tests/hlsl/uav-rwbuffer.shader_test b/tests/hlsl/uav-rwbuffer.shader_test index 1a7fcf1e..bfad4455 100644 --- a/tests/hlsl/uav-rwbuffer.shader_test +++ b/tests/hlsl/uav-rwbuffer.shader_test @@ -28,7 +28,7 @@ float4 main() : sv_target1 }
% Type size is too wide -[pixel shader fail] +[pixel shader fail_tpf] struct s { float3 a; @@ -41,7 +41,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail todo] +[pixel shader fail_tpf todo] RWBuffer<double3> u;
float4 main() : sv_target1 @@ -58,7 +58,7 @@ float4 main() : sv_target1 }
% Array type -[pixel shader fail] +[pixel shader fail_tpf] typedef float arr[2]; RWBuffer<arr> u;
@@ -68,7 +68,7 @@ float4 main() : sv_target1 }
% Object types -[pixel shader fail] +[pixel shader fail_tpf] RWBuffer<Texture2D> u;
float4 main() : sv_target1 @@ -76,7 +76,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct s { Texture2D t; @@ -104,4 +104,4 @@ float4 main() : sv_target1
[test] draw quad -probe buffer uav 2 (0, 0) rgba (11.1, 12.2, 13.3, 14.4) +todo_6 probe buffer uav 2 (0, 0) rgba (11.1, 12.2, 13.3, 14.4) diff --git a/tests/hlsl/uav-rwstructuredbuffer.shader_test b/tests/hlsl/uav-rwstructuredbuffer.shader_test index 5ea67329..1a12421c 100644 --- a/tests/hlsl/uav-rwstructuredbuffer.shader_test +++ b/tests/hlsl/uav-rwstructuredbuffer.shader_test @@ -36,7 +36,7 @@ float4 main() : sv_target1 }
% Object types -[pixel shader fail] +[pixel shader fail_tpf] RWStructuredBuffer<Texture2D> u;
float4 main() : sv_target1 @@ -44,7 +44,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct s { Texture2D t; diff --git a/tests/hlsl/uav-rwtexture.shader_test b/tests/hlsl/uav-rwtexture.shader_test index 07c28cb8..9a4c28ff 100644 --- a/tests/hlsl/uav-rwtexture.shader_test +++ b/tests/hlsl/uav-rwtexture.shader_test @@ -1,7 +1,7 @@ [require] shader model >= 5.0
-[pixel shader fail] +[pixel shader fail_tpf] RWTexture2D<float4> u;
float4 main() : sv_target @@ -12,7 +12,7 @@ float4 main() : sv_target return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] Texture2D<float4> u;
float4 main() : sv_target @@ -50,11 +50,11 @@ float4 main() : sv_target
[test] draw quad -probe uav 1 (0, 0) r (0.5) -probe uav 1 (0, 1) r (0.6) +todo_6 probe uav 1 (0, 0) r (0.5) +todo_6 probe uav 1 (0, 1) r (0.6) probe uav 1 (1, 0) r (0.2) -probe uav 1 (1, 1) r (0.7) -probe uav 2 (0, 0) rgba (2.0, 1.0, 4.0, 3.0) +todo_6 probe uav 1 (1, 1) r (0.7) +todo_6 probe uav 2 (0, 0) rgba (2.0, 1.0, 4.0, 3.0)
% UAVs are implicitly allocated starting from the highest render target slot. @@ -71,7 +71,7 @@ size (1, 1)
0.1 0.2 0.3 0.4
-[pixel shader fail] +[pixel shader fail_tpf] RWTexture2D<float4> u : register(u0);
float4 main() : sv_target1 @@ -80,7 +80,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] RWTexture2D<float4> u : register(u1);
float4 main() : sv_target1 @@ -100,7 +100,7 @@ float4 main() : sv_target1
[test] draw quad -probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6) +todo_6 probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
[uav 3] @@ -119,7 +119,7 @@ float4 main() : sv_target1
[test] draw quad -probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6) +todo_6 probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
% Uppercase register set name [pixel shader] @@ -133,7 +133,7 @@ float4 main() : sv_target1
[test] draw quad -probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6) +todo_6 probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
% Test that we can declare and use an array of UAVs.
@@ -159,8 +159,8 @@ float4 main() : sv_target1
[test] draw quad -probe uav 2 (0, 0) rgba (1.1, 1.2, 1.3, 1.4) -probe uav 3 (0, 0) rgba (2.1, 2.2, 2.3, 2.4) +todo_6 probe uav 2 (0, 0) rgba (1.1, 1.2, 1.3, 1.4) +todo_6 probe uav 3 (0, 0) rgba (2.1, 2.2, 2.3, 2.4)
% RWTexture1D types [pixel shader] @@ -217,7 +217,7 @@ float4 main() : sv_target1 }
% Type is too wide -[pixel shader fail] +[pixel shader fail_tpf] struct s { float3 a; @@ -230,7 +230,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct s { float3 a; @@ -243,7 +243,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct s { float3 a; @@ -257,7 +257,7 @@ float4 main() : sv_target1 }
% Array type -[pixel shader fail] +[pixel shader fail_tpf] typedef float arr[2]; RWTexture1D<arr> u;
@@ -267,7 +267,7 @@ float4 main() : sv_target1 }
% Object types -[pixel shader fail] +[pixel shader fail_tpf] RWTexture1D<Texture2D> u;
float4 main() : sv_target1 @@ -275,7 +275,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] RWTexture2D<Texture2D> u;
float4 main() : sv_target1 @@ -283,7 +283,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] RWTexture3D<Texture2D> u;
float4 main() : sv_target1 @@ -291,7 +291,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct s { Texture2D t; @@ -304,7 +304,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct s { Texture2D t; @@ -317,7 +317,7 @@ float4 main() : sv_target1 return 0; }
-[pixel shader fail] +[pixel shader fail_tpf] struct s { Texture2D t; diff --git a/tests/hlsl/uniform-semantics.shader_test b/tests/hlsl/uniform-semantics.shader_test index 1125117f..80d609f5 100644 --- a/tests/hlsl/uniform-semantics.shader_test +++ b/tests/hlsl/uniform-semantics.shader_test @@ -10,7 +10,7 @@ float4 main() : sv_target
[test] uniform 0 float 3.5 -draw quad +todo_6 draw quad probe all rgba (3.5, 3.5, 3.5, 3.5)
@@ -24,5 +24,5 @@ float4 main() : sv_target
[test] uniform 0 float4 4.0 5.0 6.0 7.0 -draw quad +todo_6 draw quad probe all rgba (4.0, 5.0, 4.0, 5.0) diff --git a/tests/hlsl/vector-indexing-uniform.shader_test b/tests/hlsl/vector-indexing-uniform.shader_test index e5ffbdd0..90add8a4 100644 --- a/tests/hlsl/vector-indexing-uniform.shader_test +++ b/tests/hlsl/vector-indexing-uniform.shader_test @@ -12,5 +12,5 @@ float4 main() : SV_TARGET
[test] uniform 0 float 2 -draw quad +todo_6 draw quad probe all rgba (0.5, 0.3, 0.8, 0.2) diff --git a/tests/hlsl/vector-indexing.shader_test b/tests/hlsl/vector-indexing.shader_test index 1542d358..03a88a08 100644 --- a/tests/hlsl/vector-indexing.shader_test +++ b/tests/hlsl/vector-indexing.shader_test @@ -23,11 +23,11 @@ float4 main() : SV_TARGET
[test] uniform 0 float4 1.0 2.0 3.0 4.0 -draw quad +todo_6 draw quad probe all rgba (1.0, 2.0, 2.0, 3.0)
-[pixel shader fail] +[pixel shader fail_tpf] float4 main() : SV_TARGET { float4 vec = {0, 1, 2, 3}; diff --git a/tests/hlsl/writemask-assignop-0.shader_test b/tests/hlsl/writemask-assignop-0.shader_test index 374a38bb..df287af8 100644 --- a/tests/hlsl/writemask-assignop-0.shader_test +++ b/tests/hlsl/writemask-assignop-0.shader_test @@ -11,5 +11,5 @@ float4 main() : SV_target
[test] uniform 0 float4 0.0303 0.08 0.07 0.0202 -draw quad +todo_6 draw quad probe all rgba (-0.4697, -0.02, 0.57, 0.3202) 2 diff --git a/tests/hlsl/writemask-assignop-1.shader_test b/tests/hlsl/writemask-assignop-1.shader_test index 61993257..212641e1 100644 --- a/tests/hlsl/writemask-assignop-1.shader_test +++ b/tests/hlsl/writemask-assignop-1.shader_test @@ -12,5 +12,5 @@ float4 main() : SV_target
[test] uniform 0 float4 0.0303 0.08 0.07 0.0202 -draw quad +todo_6 draw quad probe all rgba (0.5697, -0.08, -0.27, -0.4202) diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 65011f86..97874dc2 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -51,6 +51,9 @@ typedef int HRESULT; #define CONST_VTABLE #include "config.h" #include <ctype.h> +#if !defined(VKD3D_CROSSTEST) && !defined(_WIN32) + #include <dlfcn.h> +#endif #include <errno.h> #include <stdbool.h> #include <stdio.h> @@ -59,6 +62,7 @@ typedef int HRESULT; #include "vkd3d_d3dcommon.h" #include "vkd3d_d3dcompiler.h" #include "vkd3d_test.h" +#include "dxcompiler.h" #include "shader_runner.h"
struct test_options test_options = {0}; @@ -482,9 +486,12 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) int ret;
runner->is_todo = false; + runner->is_todo_6 = false;
- if (match_string(line, "todo", &line)) + if (match_string(line, "todo", &line) && !runner->use_dxcompiler) runner->is_todo = true; + if (match_string(line, "todo_6", &line) && runner->use_dxcompiler) + runner->is_todo_6 = true;
if (match_string(line, "dispatch", &line)) { @@ -663,7 +670,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) fatal_error("Malformed probe arguments '%s'.\n", line); if (ret < 5) ulps = 0; - todo_if(runner->is_todo) check_readback_data_vec4(rb, &rect, &v, ulps); + todo_if(runner->is_todo || runner->is_todo_6) check_readback_data_vec4(rb, &rect, &v, ulps); } else if (match_string(line, "r", &line)) { @@ -674,7 +681,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) fatal_error("Malformed probe arguments '%s'.\n", line); if (ret < 2) ulps = 0; - todo_if(runner->is_todo) check_readback_data_float(rb, &rect, expect, ulps); + todo_if(runner->is_todo || runner->is_todo_6) check_readback_data_float(rb, &rect, expect, ulps); } else { @@ -790,7 +797,120 @@ static HRESULT map_unidentified_hrs(HRESULT hr) return hr; }
-static void compile_shader(struct shader_runner *runner, const char *source, size_t len, const char *type, HRESULT expect) +const char *shader_type_string(enum shader_type type) +{ + static const char *const shader_types[] = + { + [SHADER_TYPE_CS] = "cs", + [SHADER_TYPE_GS] = "gs", + [SHADER_TYPE_HS] = "hs", + [SHADER_TYPE_PS] = "ps", + [SHADER_TYPE_VS] = "vs", + }; + assert(type < ARRAY_SIZE(shader_types)); + return shader_types[type]; +} + +HRESULT dxcompiler_compile_shader(enum shader_type type, const char *hlsl, ID3D10Blob **blob_out, + ID3D10Blob **errors_out) +{ + DxcBuffer src_buf = {hlsl, strlen(hlsl), 65001}; + DxcCreateInstanceProc create_instance; + IDxcCompiler3 *compiler; + IDxcBlobUtf8 *errors; + IDxcResult *result; + IDxcBlob *blob; + HRESULT hr; + void *dll; + + static const WCHAR *const shader_profiles[] = + { + [SHADER_TYPE_CS] = L"cs_6_0", + [SHADER_TYPE_GS] = L"gs_6_0", + [SHADER_TYPE_HS] = L"hs_6_0", + [SHADER_TYPE_PS] = L"ps_6_0", + [SHADER_TYPE_VS] = L"vs_6_0", + }; + const WCHAR *args[] = + { + L"/T", + shader_profiles[type], + L"/Qstrip_reflect", + L"/Qstrip_debug", + L"/flegacy-macro-expansion", + L"/flegacy-resource-reservation", + }; + + *blob_out = NULL; + *errors_out = NULL; + +#ifdef _WIN32 + if (!(dll = LoadLibraryA("dxcompiler.dll"))) + { + trace("Failed to load dxcompiler lib, %#lx.\n", GetLastError()); + return E_FAIL; + } + create_instance = (DxcCreateInstanceProc)GetProcAddress(dll, "DxcCreateInstance"); +#else + if (!(dll = dlopen("libdxcompiler.so", RTLD_NOW))) + { + trace("Failed to load dxcompiler lib, %s.\n", dlerror()); + return E_FAIL; + } + create_instance = (DxcCreateInstanceProc)dlsym(dll, "DxcCreateInstance"); +#endif + + if (!create_instance) + { + trace("Failed to get DxcCreateInstance() pointer.\n"); + return E_FAIL; + } + + if (FAILED(hr = create_instance(&CLSID_DxcCompiler, &IID_IDxcCompiler3, (void **)&compiler))) + { + trace("Failed to create instance, hr %#x.\n", hr); + return hr; + } + + if (FAILED(hr = IDxcCompiler3_Compile(compiler, &src_buf, args, ARRAY_SIZE(args), NULL, &IID_IDxcResult, (void **)&result))) + { + trace("Failed to compile shader, hr %#x.\n", hr); + goto compiler_release; + } + + if (IDxcResult_HasOutput(result, DXC_OUT_ERRORS) + && SUCCEEDED(hr = IDxcResult_GetOutput(result, DXC_OUT_ERRORS, &IID_IDxcBlobUtf8, (void **)&errors, NULL))) + { + if (IDxcBlobUtf8_GetStringLength(errors)) + *errors_out = (ID3D10Blob *)errors; + else + IDxcBlobUtf8_Release(errors); + } + + if (!IDxcResult_HasOutput(result, DXC_OUT_OBJECT)) + { + hr = E_FAIL; + goto result_release; + } + + hr = IDxcResult_GetOutput(result, DXC_OUT_OBJECT, &IID_IDxcBlob, (void **)&blob, NULL); + IDxcResult_Release(result); + if (FAILED(hr)) + goto compiler_release; + + IDxcCompiler3_Release(compiler); + *blob_out = (ID3D10Blob *)blob; + return S_OK; + +result_release: + IDxcResult_Release(result); +compiler_release: + IDxcCompiler3_Release(compiler); + return hr; +} + +static void compile_shader(struct shader_runner *runner, const char *source, size_t len, enum shader_type type, + HRESULT expect) { ID3D10Blob *blob = NULL, *errors = NULL; char profile[7]; @@ -804,10 +924,18 @@ static void compile_shader(struct shader_runner *runner, const char *source, siz [SHADER_MODEL_4_1] = "4_1", [SHADER_MODEL_5_0] = "5_0", [SHADER_MODEL_5_1] = "5_1", + [SHADER_MODEL_6_0] = "6_0", };
- sprintf(profile, "%s_%s", type, shader_models[runner->minimum_shader_model]); - hr = D3DCompile(source, len, NULL, NULL, NULL, "main", profile, runner->compile_options, 0, &blob, &errors); + if (runner->use_dxcompiler) + { + hr = dxcompiler_compile_shader(type, source, &blob, &errors); + } + else + { + sprintf(profile, "%s_%s", shader_type_string(type), shader_models[runner->minimum_shader_model]); + hr = D3DCompile(source, len, NULL, NULL, NULL, "main", profile, runner->compile_options, 0, &blob, &errors); + } hr = map_unidentified_hrs(hr); ok(hr == expect, "Got unexpected hr %#x.\n", hr); if (hr == S_OK) @@ -822,18 +950,26 @@ static void compile_shader(struct shader_runner *runner, const char *source, siz if (errors) { if (vkd3d_test_state.debug_level) - trace("%s\n", (char *)ID3D10Blob_GetBufferPointer(errors)); + { + /* GetBufferPointer() on an IDxcBlob does not return a nul-terminated string. */ + trace("%s\n", runner->use_dxcompiler ? IDxcBlobUtf8_GetStringPointer((IDxcBlobUtf8*)errors) + : (char *)ID3D10Blob_GetBufferPointer(errors)); + } ID3D10Blob_Release(errors); } }
static enum parse_state read_shader_directive(struct shader_runner *runner, enum parse_state state, const char *line, - const char *src, HRESULT *expect_hr) + const char *src, HRESULT *expect_hr, bool *skip_compilation) { + *skip_compilation = false; + while (*src && *src != ']') { if (match_directive_substring(src, "todo", &src)) { + if (runner->use_dxcompiler) + continue; if (state == STATE_SHADER_COMPUTE) state = STATE_SHADER_COMPUTE_TODO; else if (state == STATE_SHADER_PIXEL) @@ -845,9 +981,20 @@ static enum parse_state read_shader_directive(struct shader_runner *runner, enum { *expect_hr = E_FAIL; } + else if (match_directive_substring(src, "fail_tpf", &src)) + { + if (!runner->use_dxcompiler) + *expect_hr = E_FAIL; + } + else if (match_directive_substring(src, "skip_dxil", &src)) + { + /* Prevent a crash or hang in dxcompiler. */ + *skip_compilation = true; + } else if (match_directive_substring(src, "notimpl", &src)) { - *expect_hr = E_NOTIMPL; + if (!runner->use_dxcompiler) + *expect_hr = E_NOTIMPL; } else { @@ -861,13 +1008,14 @@ static enum parse_state read_shader_directive(struct shader_runner *runner, enum return state; }
-void run_shader_tests(struct shader_runner *runner, const struct shader_runner_ops *ops) +void run_shader_tests(struct shader_runner *runner, const struct shader_runner_ops *ops, bool use_dxcompiler) { size_t shader_source_size = 0, shader_source_len = 0; struct resource_params current_resource; struct sampler *current_sampler = NULL; enum parse_state state = STATE_NONE; unsigned int i, line_number = 0; + bool skip_compilation = false; char *shader_source = NULL; HRESULT expect_hr = S_OK; char line_buffer[256]; @@ -880,6 +1028,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o fatal_error("Unable to open '%s' for reading: %s\n", test_options.filename, strerror(errno));
memset(runner, 0, sizeof(*runner)); + runner->use_dxcompiler = use_dxcompiler; runner->ops = ops; runner->minimum_shader_model = SHADER_MODEL_2_0;
@@ -916,7 +1065,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o case STATE_SHADER_COMPUTE: case STATE_SHADER_COMPUTE_TODO: todo_if (state == STATE_SHADER_COMPUTE_TODO) - compile_shader(runner, shader_source, shader_source_len, "cs", expect_hr); + compile_shader(runner, shader_source, shader_source_len, SHADER_TYPE_CS, expect_hr); free(runner->cs_source); runner->cs_source = shader_source; shader_source = NULL; @@ -926,8 +1075,15 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
case STATE_SHADER_PIXEL: case STATE_SHADER_PIXEL_TODO: - todo_if (state == STATE_SHADER_PIXEL_TODO) - compile_shader(runner, shader_source, shader_source_len, "ps", expect_hr); + if (!skip_compilation) + { + todo_if (state == STATE_SHADER_PIXEL_TODO) + compile_shader(runner, shader_source, shader_source_len, SHADER_TYPE_PS, expect_hr); + } + else + { + trace("Skipping compilation.\n"); + } free(runner->ps_source); runner->ps_source = shader_source; shader_source = NULL; @@ -938,7 +1094,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o case STATE_SHADER_VERTEX: case STATE_SHADER_VERTEX_TODO: todo_if (state == STATE_SHADER_VERTEX_TODO) - compile_shader(runner, shader_source, shader_source_len, "vs", expect_hr); + compile_shader(runner, shader_source, shader_source_len, SHADER_TYPE_VS, expect_hr); free(runner->vs_source); runner->vs_source = shader_source; shader_source = NULL; @@ -1014,7 +1170,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o { state = STATE_SHADER_COMPUTE; expect_hr = S_OK; - state = read_shader_directive(runner, state, line_buffer, line, &expect_hr); + state = read_shader_directive(runner, state, line_buffer, line, &expect_hr, &skip_compilation); } else if (!strcmp(line, "[require]\n")) { @@ -1024,7 +1180,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o { state = STATE_SHADER_PIXEL; expect_hr = S_OK; - state = read_shader_directive(runner, state, line_buffer, line, &expect_hr); + state = read_shader_directive(runner, state, line_buffer, line, &expect_hr, &skip_compilation); } else if (sscanf(line, "[sampler %u]\n", &index)) { @@ -1122,7 +1278,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o { state = STATE_SHADER_VERTEX; expect_hr = S_OK; - state = read_shader_directive(runner, state, line_buffer, line, &expect_hr); + state = read_shader_directive(runner, state, line_buffer, line, &expect_hr, &skip_compilation); } else if (!strcmp(line, "[input layout]\n")) { @@ -1267,7 +1423,7 @@ START_TEST(shader_runner) run_shader_tests_d3d11();
trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d12.dll\n"); - run_shader_tests_d3d12(); + run_shader_tests_d3d12(false);
print_dll_version("d3dcompiler_47.dll"); print_dll_version("dxgi.dll"); @@ -1284,7 +1440,14 @@ START_TEST(shader_runner) run_shader_tests_d3d11();
trace("Compiling shaders with vkd3d-shader and executing with vkd3d\n"); - run_shader_tests_d3d12(); + run_shader_tests_d3d12(false); + + if (LoadLibraryA("dxcompiler.dll")) + { + trace("Compiling shaders with dxcompiler and executing with vkd3d\n"); + run_shader_tests_d3d12(true); + print_dll_version("dxcompiler.dll"); + }
print_dll_version("d3d9.dll"); print_dll_version("d3d11.dll"); @@ -1295,6 +1458,12 @@ START_TEST(shader_runner) run_shader_tests_vulkan();
trace("Compiling shaders with vkd3d-shader and executing with vkd3d\n"); - run_shader_tests_d3d12(); + run_shader_tests_d3d12(false); + + if (dlopen("libdxcompiler.so", RTLD_NOW)) + { + trace("Compiling shaders with dxcompiler and executing with vkd3d\n"); + run_shader_tests_d3d12(true); + } #endif } diff --git a/tests/shader_runner.h b/tests/shader_runner.h index 0844943d..e2a01227 100644 --- a/tests/shader_runner.h +++ b/tests/shader_runner.h @@ -36,8 +36,20 @@ enum shader_model SHADER_MODEL_4_1, SHADER_MODEL_5_0, SHADER_MODEL_5_1, + SHADER_MODEL_6_0, };
+enum shader_type +{ + SHADER_TYPE_CS, + SHADER_TYPE_GS, + SHADER_TYPE_HS, + SHADER_TYPE_PS, + SHADER_TYPE_VS, +}; + +const char *shader_type_string(enum shader_type type); + enum texture_data_type { TEXTURE_DATA_FLOAT, @@ -103,7 +115,9 @@ struct shader_runner { const struct shader_runner_ops *ops;
+ bool use_dxcompiler; bool is_todo; + bool is_todo_6;
char *vs_source; char *ps_source; @@ -149,8 +163,10 @@ void fatal_error(const char *format, ...) VKD3D_NORETURN VKD3D_PRINTF_FUNC(1, 2)
unsigned int get_vb_stride(const struct shader_runner *runner, unsigned int slot); void init_resource(struct resource *resource, const struct resource_params *params); +HRESULT dxcompiler_compile_shader(enum shader_type type, const char *hlsl, ID3D10Blob **blob_out, + ID3D10Blob **errors_out);
-void run_shader_tests(struct shader_runner *runner, const struct shader_runner_ops *ops); +void run_shader_tests(struct shader_runner *runner, const struct shader_runner_ops *ops, bool use_dxcompiler);
#ifdef _WIN32 void run_shader_tests_d3d9(void); @@ -158,4 +174,4 @@ void run_shader_tests_d3d11(void); #else void run_shader_tests_vulkan(void); #endif -void run_shader_tests_d3d12(void); +void run_shader_tests_d3d12(bool use_dxcompiler); diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index 25b585b1..12b72291 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -747,7 +747,7 @@ void run_shader_tests_d3d11(void) init_adapter_info(); if (init_test_context(&runner)) { - run_shader_tests(&runner.r, &d3d11_runner_ops); + run_shader_tests(&runner.r, &d3d11_runner_ops, false); destroy_test_context(&runner); } } diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index d620f1e2..d4c96e6c 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -22,6 +22,7 @@ #define CONST_VTABLE #define VKD3D_TEST_NO_DEFS #include "d3d12_crosstest.h" +#include "dxcompiler.h" #include "shader_runner.h"
struct d3d12_resource @@ -56,7 +57,7 @@ static struct d3d12_shader_runner *d3d12_shader_runner(struct shader_runner *r) return CONTAINING_RECORD(r, struct d3d12_shader_runner, r); }
-static ID3D10Blob *compile_shader(const struct d3d12_shader_runner *runner, const char *source, const char *type) +static ID3D10Blob *compile_shader(const struct d3d12_shader_runner *runner, const char *source, enum shader_type type) { ID3D10Blob *blob = NULL, *errors = NULL; char profile[7]; @@ -70,10 +71,18 @@ static ID3D10Blob *compile_shader(const struct d3d12_shader_runner *runner, cons [SHADER_MODEL_4_1] = "4_1", [SHADER_MODEL_5_0] = "5_0", [SHADER_MODEL_5_1] = "5_1", + [SHADER_MODEL_6_0] = "6_0", };
- sprintf(profile, "%s_%s", type, shader_models[runner->r.minimum_shader_model]); - hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, runner->r.compile_options, 0, &blob, &errors); + if (runner->r.use_dxcompiler) + { + hr = dxcompiler_compile_shader(type, source, &blob, &errors); + } + else + { + sprintf(profile, "%s_%s", shader_type_string(type), shader_models[runner->r.minimum_shader_model]); + hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, runner->r.compile_options, 0, &blob, &errors); + } ok(FAILED(hr) == !blob, "Got unexpected hr %#x, blob %p.\n", hr, blob); if (errors) { @@ -310,7 +319,7 @@ static bool d3d12_runner_dispatch(struct shader_runner *r, unsigned int x, unsig HRESULT hr; size_t i;
- cs_code = compile_shader(runner, runner->r.cs_source, "cs"); + cs_code = compile_shader(runner, runner->r.cs_source, SHADER_TYPE_CS); todo_if (runner->r.is_todo) ok(cs_code, "Failed to compile shader.\n"); if (!cs_code) return false; @@ -319,8 +328,16 @@ static bool d3d12_runner_dispatch(struct shader_runner *r, unsigned int x, unsig
cs.pShaderBytecode = ID3D10Blob_GetBufferPointer(cs_code); cs.BytecodeLength = ID3D10Blob_GetBufferSize(cs_code); + todo_if(runner->r.is_todo_6) pso = create_compute_pipeline_state(device, root_signature, cs); ID3D10Blob_Release(cs_code); + + if (!pso) + { + ID3D12RootSignature_Release(root_signature); + return false; + } + add_pso(test_context, pso);
ID3D12GraphicsCommandList_SetComputeRootSignature(command_list, root_signature); @@ -385,8 +402,8 @@ static bool d3d12_runner_draw(struct shader_runner *r, HRESULT hr; size_t i;
- ps_code = compile_shader(runner, runner->r.ps_source, "ps"); - vs_code = compile_shader(runner, runner->r.vs_source, "vs"); + ps_code = compile_shader(runner, runner->r.ps_source, SHADER_TYPE_PS); + vs_code = compile_shader(runner, runner->r.vs_source, SHADER_TYPE_VS); todo_if (runner->r.is_todo) ok(ps_code && vs_code, "Failed to compile shaders.\n");
if (!ps_code || !vs_code) @@ -445,10 +462,14 @@ static bool d3d12_runner_draw(struct shader_runner *r,
hr = ID3D12Device_CreateGraphicsPipelineState(device, &pso_desc, &IID_ID3D12PipelineState, (void **)&pso); - ok(hr == S_OK, "Failed to create state, hr %#x.\n", hr); + todo_if(runner->r.is_todo_6) ok(hr == S_OK, "Failed to create state, hr %#x.\n", hr); ID3D10Blob_Release(vs_code); ID3D10Blob_Release(ps_code); free(input_element_descs); + + if (FAILED(hr)) + return false; + add_pso(test_context, pso);
ID3D12GraphicsCommandList_SetGraphicsRootSignature(command_list, test_context->root_signature); @@ -550,7 +571,7 @@ static const struct shader_runner_ops d3d12_runner_ops = .release_readback = d3d12_runner_release_readback, };
-void run_shader_tests_d3d12(void) +void run_shader_tests_d3d12(bool use_dxcompiler) { static const struct test_context_desc desc = { @@ -580,7 +601,7 @@ void run_shader_tests_d3d12(void) runner.compute_allocator, NULL, &IID_ID3D12GraphicsCommandList, (void **)&runner.compute_list); ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
- run_shader_tests(&runner.r, &d3d12_runner_ops); + run_shader_tests(&runner.r, &d3d12_runner_ops, use_dxcompiler);
ID3D12GraphicsCommandList_Release(runner.compute_list); ID3D12CommandAllocator_Release(runner.compute_allocator); diff --git a/tests/shader_runner_d3d9.c b/tests/shader_runner_d3d9.c index 0c6d3788..f487cc67 100644 --- a/tests/shader_runner_d3d9.c +++ b/tests/shader_runner_d3d9.c @@ -541,7 +541,7 @@ void run_shader_tests_d3d9(void)
init_adapter_info(); init_test_context(&runner); - run_shader_tests(&runner.r, &d3d9_runner_ops); + run_shader_tests(&runner.r, &d3d9_runner_ops, false); destroy_test_context(&runner); } FreeLibrary(d3d9_module); diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index 60c473a4..c39d7800 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -1381,7 +1381,7 @@ void run_shader_tests_vulkan(void) if (!init_vulkan_runner(&runner)) return;
- run_shader_tests(&runner.r, &vulkan_runner_ops); + run_shader_tests(&runner.r, &vulkan_runner_ops, false);
cleanup_vulkan_runner(&runner); }
From: Conor McCarthy cmccarthy@codeweavers.com
Dumps DXIL disassembly when shaders are compiled with dxcompiler. --- tests/shader_runner.c | 19 ++++++++++++++++++- tests/utils.h | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 97874dc2..83b536eb 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -816,8 +816,8 @@ HRESULT dxcompiler_compile_shader(enum shader_type type, const char *hlsl, ID3D1 { DxcBuffer src_buf = {hlsl, strlen(hlsl), 65001}; DxcCreateInstanceProc create_instance; + IDxcBlobUtf8 *errors, *disassembly; IDxcCompiler3 *compiler; - IDxcBlobUtf8 *errors; IDxcResult *result; IDxcBlob *blob; HRESULT hr; @@ -898,6 +898,23 @@ HRESULT dxcompiler_compile_shader(enum shader_type type, const char *hlsl, ID3D1 if (FAILED(hr)) goto compiler_release;
+ if (test_options.dump_dxil) + { + src_buf.Ptr = IDxcBlob_GetBufferPointer(blob); + src_buf.Size = IDxcBlob_GetBufferSize(blob); + src_buf.Encoding = 0; + + if (SUCCEEDED(hr = IDxcCompiler3_Disassemble(compiler, &src_buf, &IID_IDxcResult, (void **)&result))) + { + if (SUCCEEDED(hr = IDxcResult_GetOutput(result, DXC_OUT_DISASSEMBLY, &IID_IDxcBlobUtf8, (void **)&disassembly, NULL))) + { + trace("dxcompiler disassembly:\n%s\n", IDxcBlobUtf8_GetStringPointer(disassembly)); + IDxcBlobUtf8_Release(disassembly); + } + IDxcResult_Release(result); + } + } + IDxcCompiler3_Release(compiler); *blob_out = (ID3D10Blob *)blob; return S_OK; diff --git a/tests/utils.h b/tests/utils.h index 67094190..8de930bd 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -215,6 +215,7 @@ struct test_options bool enable_debug_layer; bool enable_gpu_based_validation; const char *filename; + bool dump_dxil; };
extern struct test_options test_options; @@ -233,6 +234,8 @@ static inline void parse_args(int argc, char **argv) test_options.enable_debug_layer = true; else if (!strcmp(argv[i], "--gbv")) test_options.enable_gpu_based_validation = true; + else if (!strcmp(argv[i], "--dump-dxil")) + test_options.dump_dxil = true; else if (argv[i][0] != '-') test_options.filename = argv[i]; }
I haven't reviewed in depth yet, but for the moment I wouldn't mix shader runner tests between SM1-5 and SM6. The SM6 parser is still so crude that it fails on basically everything; also, running SM6 tests requires installing a separate binary component, which developers not interested about SM6 might not have. This would make the handling of `todo_6` and similar annotations more complicated, and for very little useful signal.
For the moment I'd rather keep SM6 tests separated from all the others, and merge them once the SM6 parser allow a decent amount of them to pass.
Also, I would like to have some appropriate abstractions in the shader runner (and in the other vkd3d tests) so that SM6 support is not a special case everywhere, but rather the shader runner itself has support for having different shader compilers (vkd3d-shader, d3dcompiler_xx.dll, dxcompiler.dll) and for targeting different profiles in somehow the same way it now allows using different execution environments (that that support too is still to be perfected). Using SM6 and dxcompiler.dll should just be another case along these axes, rather than an exceptional code flow everywhere.
I had already written some code to this end, I can try to dust it off and submit a proposal. Of course perspectives on how that could work are welcome.
What do you think of all of this?
I haven't reviewed in depth yet, but for the moment I wouldn't mix shader runner tests between SM1-5 and SM6. The SM6 parser is still so crude that it fails on basically everything; also, running SM6 tests requires installing a separate binary component, which developers not interested about SM6 might not have. This would make the handling of `todo_6` and similar annotations more complicated, and for very little useful signal.
For the moment I'd rather keep SM6 tests separated from all the others, and merge them once the SM6 parser allow a decent amount of them to pass.
I don't think that's a problem per se; I think it's fine to annotate some tests with todo/skip/fail based on e.g. the shader model or possible a specific runner. The CI can hopefully help avoid the need for each individual contributor to have a working dxcompiler installation, though I could certainly see it being a bit of a pain when adding new tests, certainly in the beginning when essentially nothing works.
I would like something a bit more coherent than "fail_tpf", "skip_dxil", and "todo_6" though. How about something along the lines of "fail(shader model < 6.0)" and "todo(shader model >= 6.0)"? "skip_dxil" sounds like it should simply be a "shader model < 6.0" line in the "[require]" section.
Also, I would like to have some appropriate abstractions in the shader runner (and in the other vkd3d tests) so that SM6 support is not a special case everywhere, but rather the shader runner itself has support for having different shader compilers (vkd3d-shader, d3dcompiler_xx.dll, dxcompiler.dll) and for targeting different profiles in somehow the same way it now allows using different execution environments (that that support too is still to be perfected). Using SM6 and dxcompiler.dll should just be another case along these axes, rather than an exceptional code flow everywhere.
Essentially, yes. I'm not necessarily convinced that we fully need to resolve that as part of this MR, but plumbing through a "use_dxcompiler" flag everywhere doesn't seem like a step in the right direction; I'd already feel a fair bit better about this if it was expressed in terms of minimum/maximum shader models. I.e., something along the lines of
```c run_shader_tests_d3d12(SHADER_MODEL_4_0, SHADER_MODEL_5_1); run_shader_tests_d3d12(SHADER_MODEL_6_0, SHADER_MODEL_6_0); ```
instead of
```c run_shader_tests_d3d12(false); run_shader_tests_d3d12(true); ```
There are a bunch of style issues in dxcompiler.idl, which I think should be fairly self-evident at this point. Beyond those though, why do we need that to be a public header?
The shader runner changes at first sight look like multiple changes in a single commit.
You'll probably want to use vkd3d_dlopen() and vkd3d_dlsym(), much like the Vulkan runner does.
It's perhaps worth pointing out that "8ba5fb08-5195-40e2-ac58-0d989c3a0102" is also the uuid for ID3D10Blob/ID3DBlob. It looks like IDxcBlob is a simple alias.
On Thu Sep 14 14:46:46 2023 +0000, Henri Verbeet wrote:
I haven't reviewed in depth yet, but for the moment I wouldn't mix
shader runner tests between SM1-5 and SM6. The SM6 parser is still so crude that it fails on basically everything; also, running SM6 tests requires installing a separate binary component, which developers not interested about SM6 might not have. This would make the handling of `todo_6` and similar annotations more complicated, and for very little useful signal.
For the moment I'd rather keep SM6 tests separated from all the
others, and merge them once the SM6 parser allow a decent amount of them to pass. I don't think that's a problem per se; I think it's fine to annotate some tests with todo/skip/fail based on e.g. the shader model or possible a specific runner. The CI can hopefully help avoid the need for each individual contributor to have a working dxcompiler installation, though I could certainly see it being a bit of a pain when adding new tests, certainly in the beginning when essentially nothing works. I would like something a bit more coherent than "fail_tpf", "skip_dxil", and "todo_6" though. How about something along the lines of "fail(shader model < 6.0)" and "todo(shader model >= 6.0)"? "skip_dxil" sounds like it should simply be a "shader model < 6.0" line in the "[require]" section.
Also, I would like to have some appropriate abstractions in the shader
runner (and in the other vkd3d tests) so that SM6 support is not a special case everywhere, but rather the shader runner itself has support for having different shader compilers (vkd3d-shader, d3dcompiler_xx.dll, dxcompiler.dll) and for targeting different profiles in somehow the same way it now allows using different execution environments (that that support too is still to be perfected). Using SM6 and dxcompiler.dll should just be another case along these axes, rather than an exceptional code flow everywhere. Essentially, yes. I'm not necessarily convinced that we fully need to resolve that as part of this MR, but plumbing through a "use_dxcompiler" flag everywhere doesn't seem like a step in the right direction; I'd already feel a fair bit better about this if it was expressed in terms of minimum/maximum shader models. I.e., something along the lines of
run_shader_tests_d3d12(SHADER_MODEL_4_0, SHADER_MODEL_5_1); run_shader_tests_d3d12(SHADER_MODEL_6_0, SHADER_MODEL_6_0);
instead of
run_shader_tests_d3d12(false); run_shader_tests_d3d12(true);
There are a bunch of style issues in dxcompiler.idl, which I think should be fairly self-evident at this point. Beyond those though, why do we need that to be a public header? The shader runner changes at first sight look like multiple changes in a single commit. You'll probably want to use vkd3d_dlopen() and vkd3d_dlsym(), much like the Vulkan runner does. It's perhaps worth pointing out that "8ba5fb08-5195-40e2-ac58-0d989c3a0102" is also the uuid for ID3D10Blob/ID3DBlob. It looks like IDxcBlob is a simple alias.
It is, hence `dxcompiler_compile_shader()` returns an `IDxcBlob` as an `ID3D10Blob`. However they are not quite compatible; see the comment in `compile_shader()` on using the return value of `GetBufferPointer()` as a string.
Beyond those though, why do we need that to be a public header?
I couldn't get it to use vkd3d_windows.h from within `tests`. I need to fix that at some point.
"skip_dxil" sounds like it should simply be a "shader model < 6.0" line in the "[require]" section.
Ironically I started with this and thought it may to too restrictive; I'll need to reorder the tests which need this so they come last in their source file, but it's rare enough not to be an issue.
I would like something a bit more coherent than "fail_tpf", "skip_dxil", and "todo_6" though. How about something along the lines of "fail(shader model < 6.0)" and "todo(shader model >= 6.0)"? "skip_dxil" sounds like it should simply be a "shader model < 6.0" line in the "[require]" section.
I agree something more coherent would be nice, but that seems excessively verbose to me. I don't think we're going to need any more complex categories than "sm1", "sm4", and "sm6".
Wrt fail_tpf... what may make sense is, every time we have a require directive for a shader version, we try to compile it with every version anyway, and validate that HLSL compilation fails for versions outside of the range. Then that would become
[require] shader model >= 6.0
Although you do mention that some tests ICE the native compiler, so I'm not sure how to deal with that...
Somewhat relatedly, for some of those tests I don't even know how the relevant shader would be interpreted, so we may want an actual [test] directive following them.
"skip_dxil" sounds like it should simply be a "shader model < 6.0" line in the "[require]" section.
Ironically I started with this and thought it may to too restrictive; I'll need to reorder the tests which need this so they come last in their source file, but it's rare enough not to be an issue.
No, we should probably just change [require] so that it doesn't skip the whole file.
That or move the relevant tests to separate files. Embedding lots of tests in the same file is... the problem with it is that, somewhat unlike C, it's not the easiest thing to read; I blame the lack of syntax highlighting support.
Essentially, yes. I'm not necessarily convinced that we fully need to resolve that as part of this MR, but plumbing through a "use_dxcompiler" flag everywhere doesn't seem like a step in the right direction; I'd already feel a fair bit better about this if it was expressed in terms of minimum/maximum shader models. I.e., something along the lines of
run_shader_tests_d3d12(SHADER_MODEL_4_0, SHADER_MODEL_5_1); run_shader_tests_d3d12(SHADER_MODEL_6_0, SHADER_MODEL_6_0);
instead of
run_shader_tests_d3d12(false); run_shader_tests_d3d12(true);
Yeah, that's already better. It still conflates the SM and the compiler, which is a thing I'd like to eventually disentangle, but that doesn't need to happen in this MR, and I can take responsibility for that.
Another thing that would be appropriate to add to this MR would be a paragraph of instructions on how to fetch and/or compile `dxcompiler.dll` and to make it available to the test program. And also doing that thing for the CI pipeline (I can assist with that if necessary).
I agree something more coherent would be nice, but that seems excessively verbose to me. I don't think we're going to need any more complex categories than "sm1", "sm4", and "sm6".
I favour less verbosity too. It can be, e.g. `todo(sm4)` or a list like `todo(sm4,sm6)`, with plain `todo` applying to all.