mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Generate vsir registers from patch variable derefs.
This commit is contained in:
Notes:
Henri Verbeet
2025-02-03 16:40:17 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Elizabeth Figura (@zfigura) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1362
@ -6497,6 +6497,9 @@ bool hlsl_offset_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref
|
|||||||
|
|
||||||
*offset = deref->const_offset;
|
*offset = deref->const_offset;
|
||||||
|
|
||||||
|
if (hlsl_type_is_patch_array(deref->var->data_type))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (offset_node)
|
if (offset_node)
|
||||||
{
|
{
|
||||||
/* We should always have generated a cast to UINT. */
|
/* We should always have generated a cast to UINT. */
|
||||||
@ -7505,6 +7508,22 @@ static void vsir_src_from_hlsl_node(struct vkd3d_shader_src_param *src,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct vkd3d_shader_src_param *sm4_generate_vsir_new_idx_src(struct hlsl_ctx *ctx,
|
||||||
|
struct vsir_program *program, const struct hlsl_ir_node *rel_offset)
|
||||||
|
{
|
||||||
|
struct vkd3d_shader_src_param *idx_src;
|
||||||
|
|
||||||
|
if (!(idx_src = vsir_program_get_src_params(program, 1)))
|
||||||
|
{
|
||||||
|
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(idx_src, 0, sizeof(*idx_src));
|
||||||
|
vsir_src_from_hlsl_node(idx_src, ctx, rel_offset, VKD3DSP_WRITEMASK_ALL);
|
||||||
|
return idx_src;
|
||||||
|
}
|
||||||
|
|
||||||
static bool sm4_generate_vsir_numeric_reg_from_deref(struct hlsl_ctx *ctx, struct vsir_program *program,
|
static bool sm4_generate_vsir_numeric_reg_from_deref(struct hlsl_ctx *ctx, struct vsir_program *program,
|
||||||
struct vkd3d_shader_register *reg, uint32_t *writemask, const struct hlsl_deref *deref)
|
struct vkd3d_shader_register *reg, uint32_t *writemask, const struct hlsl_deref *deref)
|
||||||
{
|
{
|
||||||
@ -7531,17 +7550,8 @@ static bool sm4_generate_vsir_numeric_reg_from_deref(struct hlsl_ctx *ctx, struc
|
|||||||
|
|
||||||
if (deref->rel_offset.node)
|
if (deref->rel_offset.node)
|
||||||
{
|
{
|
||||||
struct vkd3d_shader_src_param *idx_src;
|
if (!(reg->idx[1].rel_addr = sm4_generate_vsir_new_idx_src(ctx, program, deref->rel_offset.node)))
|
||||||
|
|
||||||
if (!(idx_src = vsir_program_get_src_params(program, 1)))
|
|
||||||
{
|
|
||||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
memset(idx_src, 0, sizeof(*idx_src));
|
|
||||||
reg->idx[1].rel_addr = idx_src;
|
|
||||||
|
|
||||||
vsir_src_from_hlsl_node(idx_src, ctx, deref->rel_offset.node, VKD3DSP_WRITEMASK_ALL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7647,16 +7657,12 @@ static bool sm4_generate_vsir_reg_from_deref(struct hlsl_ctx *ctx, struct vsir_p
|
|||||||
bool is_patch = hlsl_type_is_patch_array(var->data_type);
|
bool is_patch = hlsl_type_is_patch_array(var->data_type);
|
||||||
bool has_idx;
|
bool has_idx;
|
||||||
|
|
||||||
if (is_patch)
|
|
||||||
{
|
|
||||||
hlsl_fixme(ctx, &var->loc, "Generating vsir registers from patch variable deref.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sm4_register_from_semantic_name(version, var->semantic.name, false, ®->type, &has_idx))
|
if (sm4_register_from_semantic_name(version, var->semantic.name, false, ®->type, &has_idx))
|
||||||
{
|
{
|
||||||
unsigned int offset = hlsl_offset_from_deref_safe(ctx, deref);
|
unsigned int offset = hlsl_offset_from_deref_safe(ctx, deref);
|
||||||
|
|
||||||
|
VKD3D_ASSERT(!is_patch);
|
||||||
|
|
||||||
if (has_idx)
|
if (has_idx)
|
||||||
{
|
{
|
||||||
reg->idx[0].offset = var->semantic.index + offset / 4;
|
reg->idx[0].offset = var->semantic.index + offset / 4;
|
||||||
@ -7675,15 +7681,22 @@ static bool sm4_generate_vsir_reg_from_deref(struct hlsl_ctx *ctx, struct vsir_p
|
|||||||
|
|
||||||
VKD3D_ASSERT(hlsl_reg.allocated);
|
VKD3D_ASSERT(hlsl_reg.allocated);
|
||||||
|
|
||||||
if (version->type == VKD3D_SHADER_TYPE_DOMAIN)
|
reg->type = sm4_get_semantic_register_type(version->type, ctx->is_patch_constant_func, var);
|
||||||
reg->type = VKD3DSPR_PATCHCONST;
|
|
||||||
else
|
|
||||||
reg->type = VKD3DSPR_INPUT;
|
|
||||||
reg->dimension = VSIR_DIMENSION_VEC4;
|
reg->dimension = VSIR_DIMENSION_VEC4;
|
||||||
reg->idx[0].offset = hlsl_reg.id;
|
reg->idx[is_patch ? 1 : 0].offset = hlsl_reg.id;
|
||||||
reg->idx_count = 1;
|
reg->idx_count = is_patch ? 2 : 1;
|
||||||
*writemask = hlsl_reg.writemask;
|
*writemask = hlsl_reg.writemask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_patch)
|
||||||
|
{
|
||||||
|
reg->idx[0].offset = deref->const_offset / 4;
|
||||||
|
if (deref->rel_offset.node)
|
||||||
|
{
|
||||||
|
if (!(reg->idx[0].rel_addr = sm4_generate_vsir_new_idx_src(ctx, program, deref->rel_offset.node)))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (var->is_output_semantic)
|
else if (var->is_output_semantic)
|
||||||
{
|
{
|
||||||
@ -8994,14 +9007,19 @@ static void sm4_generate_vsir_instr_dcl_semantic(struct hlsl_ctx *ctx, struct vs
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
opcode = (version->type == VKD3D_SHADER_TYPE_PIXEL)
|
if (version->type == VKD3D_SHADER_TYPE_PIXEL)
|
||||||
? VKD3DSIH_DCL_INPUT_PS_SIV : VKD3DSIH_DCL_INPUT_SIV;
|
opcode = VKD3DSIH_DCL_INPUT_PS_SIV;
|
||||||
|
else if (is_patch)
|
||||||
|
opcode = VKD3DSIH_DCL_INPUT;
|
||||||
|
else
|
||||||
|
opcode = VKD3DSIH_DCL_INPUT_SIV;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (semantic == VKD3D_SHADER_SV_NONE || version->type == VKD3D_SHADER_TYPE_PIXEL)
|
if (semantic == VKD3D_SHADER_SV_NONE || version->type == VKD3D_SHADER_TYPE_PIXEL
|
||||||
|
|| version->type == VKD3D_SHADER_TYPE_HULL)
|
||||||
opcode = VKD3DSIH_DCL_OUTPUT;
|
opcode = VKD3DSIH_DCL_OUTPUT;
|
||||||
else
|
else
|
||||||
opcode = VKD3DSIH_DCL_OUTPUT_SIV;
|
opcode = VKD3DSIH_DCL_OUTPUT_SIV;
|
||||||
@ -9026,13 +9044,13 @@ static void sm4_generate_vsir_instr_dcl_semantic(struct hlsl_ctx *ctx, struct vs
|
|||||||
|
|
||||||
if (opcode == VKD3DSIH_DCL_OUTPUT)
|
if (opcode == VKD3DSIH_DCL_OUTPUT)
|
||||||
{
|
{
|
||||||
VKD3D_ASSERT(semantic == VKD3D_SHADER_SV_NONE
|
VKD3D_ASSERT(semantic == VKD3D_SHADER_SV_NONE || semantic == VKD3D_SHADER_SV_TARGET
|
||||||
|| semantic == VKD3D_SHADER_SV_TARGET || type != VKD3DSPR_OUTPUT);
|
|| version->type == VKD3D_SHADER_TYPE_HULL || type != VKD3DSPR_OUTPUT);
|
||||||
dst_param = &ins->declaration.dst;
|
dst_param = &ins->declaration.dst;
|
||||||
}
|
}
|
||||||
else if (opcode == VKD3DSIH_DCL_INPUT || opcode == VKD3DSIH_DCL_INPUT_PS)
|
else if (opcode == VKD3DSIH_DCL_INPUT || opcode == VKD3DSIH_DCL_INPUT_PS)
|
||||||
{
|
{
|
||||||
VKD3D_ASSERT(semantic == VKD3D_SHADER_SV_NONE);
|
VKD3D_ASSERT(semantic == VKD3D_SHADER_SV_NONE || is_patch);
|
||||||
dst_param = &ins->declaration.dst;
|
dst_param = &ins->declaration.dst;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -122,7 +122,7 @@ float4 main(InputPatch<data, 2> patch) : SV_TARGET
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hull shader todo]
|
[hull shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
@ -148,7 +148,7 @@ float4 main(InputPatch<data, 2> patch) : POSITION
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hull shader todo]
|
[hull shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
@ -242,7 +242,7 @@ float4 main(OutputPatch<data, 2> patch) : POSITION
|
|||||||
return patch[0].val;
|
return patch[0].val;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hull shader todo]
|
[hull shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
@ -273,7 +273,7 @@ out_data main()
|
|||||||
return (out_data)0;
|
return (out_data)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[domain shader todo]
|
[domain shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
@ -304,7 +304,7 @@ void main(OutputPatch<data, 2> patch, inout PointStream<data> vout)
|
|||||||
|
|
||||||
% Patch parameters can't have more than 32 control points.
|
% Patch parameters can't have more than 32 control points.
|
||||||
|
|
||||||
[hull shader todo]
|
[hull shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
@ -356,7 +356,7 @@ float4 main(InputPatch<data, 33> patch) : POSITION
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[domain shader todo]
|
[domain shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
@ -446,7 +446,7 @@ float4 main(OutputPatch<data, 2> patch, patch_constant_data input, OutputPatch<d
|
|||||||
|
|
||||||
% InputPatch types must match between the main function and the patch constant function of a hull shader.
|
% InputPatch types must match between the main function and the patch constant function of a hull shader.
|
||||||
|
|
||||||
[hull shader fail todo]
|
[hull shader fail]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
@ -477,7 +477,7 @@ float4 main(InputPatch<data, 2> patch) : POSITION
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hull shader fail todo]
|
[hull shader fail]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 val : VAL;
|
float4 val : VAL;
|
||||||
|
@ -17,7 +17,7 @@ void main(uint id : SV_VertexID, out data output)
|
|||||||
output.zero = float3(0.0, 0.0, 0.0);
|
output.zero = float3(0.0, 0.0, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
[hull shader todo]
|
[hull shader]
|
||||||
struct vsdata
|
struct vsdata
|
||||||
{
|
{
|
||||||
float4 position : SV_Position;
|
float4 position : SV_Position;
|
||||||
@ -61,7 +61,7 @@ data main(InputPatch<vsdata, 3> input, uint i : SV_OutputControlPointID)
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
[domain shader todo]
|
[domain shader]
|
||||||
struct hsdata
|
struct hsdata
|
||||||
{
|
{
|
||||||
float4 position : SV_Position;
|
float4 position : SV_Position;
|
||||||
@ -105,5 +105,6 @@ float4 main(data input) : sv_target
|
|||||||
}
|
}
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
todo(sm<6) draw 3 control point patch list 3
|
% llvmpipe currently segfaults due to a bug during shader compilation in the driver.
|
||||||
todo(mvk) probe (0, 0, 640, 480) rgba (-1.0, -2.0, 0.5, 1.0)
|
if(!llvmpipe) todo(glsl | msl | mvk & vulkan) draw 3 control point patch list 3
|
||||||
|
if(!llvmpipe) todo(mvk) probe (0, 0, 640, 480) rgba (-1.0, -2.0, 0.5, 1.0)
|
||||||
|
@ -19,7 +19,7 @@ void main(uint id : SV_VertexID, out data output)
|
|||||||
output.b = 0.0;
|
output.b = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hull shader todo]
|
[hull shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 position : SV_Position;
|
float4 position : SV_Position;
|
||||||
@ -50,7 +50,7 @@ data main(InputPatch<data, 3> input, uint i : SV_OutputControlPointID)
|
|||||||
return input[i];
|
return input[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
[domain shader todo]
|
[domain shader]
|
||||||
struct data
|
struct data
|
||||||
{
|
{
|
||||||
float4 position : SV_Position;
|
float4 position : SV_Position;
|
||||||
@ -94,8 +94,9 @@ float4 main(data input) : sv_target
|
|||||||
}
|
}
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
todo(sm<6) draw 3 control point patch list 3
|
% llvmpipe currently segfaults due to a bug during shader compilation in the driver.
|
||||||
todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
if(!llvmpipe) todo(glsl | msl | mvk & vulkan) draw 3 control point patch list 3
|
||||||
|
if(!llvmpipe) todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
||||||
|
|
||||||
% Passthrough hull shader control point function.
|
% Passthrough hull shader control point function.
|
||||||
[hull shader todo]
|
[hull shader todo]
|
||||||
@ -129,5 +130,5 @@ void main(InputPatch<data, 3> input)
|
|||||||
}
|
}
|
||||||
|
|
||||||
[test]
|
[test]
|
||||||
todo(sm<6) draw 3 control point patch list 3
|
if(!llvmpipe) todo(sm<6) draw 3 control point patch list 3
|
||||||
todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
if(!llvmpipe) todo(mvk) probe (0, 0, 640, 480) rgba(0.0, 1.0, 0.0, 1.0)
|
||||||
|
@ -1171,97 +1171,6 @@ static void test_emit_signature(void)
|
|||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||||
};
|
};
|
||||||
static const uint32_t dxbc_hs[] =
|
|
||||||
{
|
|
||||||
0x43425844, 0x943f0a0f, 0x97e66e61, 0x82e4cc08, 0xce70cbd1, 0x00000001, 0x0000064c, 0x00000006,
|
|
||||||
0x00000038, 0x000000b0, 0x000000e0, 0x00000110, 0x000001f0, 0x000005b0, 0x46454452, 0x00000070,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x0000003c, 0x48530500, 0x00000100, 0x0000003c, 0x31314452,
|
|
||||||
0x0000003c, 0x00000018, 0x00000020, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x7263694d,
|
|
||||||
0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x31207265,
|
|
||||||
0x2e302e30, 0x31303031, 0x36312e31, 0x00343833, 0x4e475349, 0x00000028, 0x00000001, 0x00000008,
|
|
||||||
0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x786d6573, 0xababab00,
|
|
||||||
0x4e47534f, 0x00000028, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
|
|
||||||
0x00000000, 0x0000000f, 0x786d6573, 0xababab00, 0x47534350, 0x000000d8, 0x00000007, 0x00000008,
|
|
||||||
0x000000b0, 0x00000000, 0x0000000b, 0x00000003, 0x00000000, 0x00000e01, 0x000000b0, 0x00000001,
|
|
||||||
0x0000000b, 0x00000003, 0x00000001, 0x00000e01, 0x000000b0, 0x00000002, 0x0000000b, 0x00000003,
|
|
||||||
0x00000002, 0x00000e01, 0x000000b0, 0x00000003, 0x0000000b, 0x00000003, 0x00000003, 0x00000e01,
|
|
||||||
0x000000be, 0x00000000, 0x0000000c, 0x00000003, 0x00000004, 0x00000e01, 0x000000be, 0x00000001,
|
|
||||||
0x0000000c, 0x00000003, 0x00000005, 0x00000e01, 0x000000d2, 0x00000000, 0x00000000, 0x00000003,
|
|
||||||
0x00000006, 0x0000000f, 0x545f5653, 0x46737365, 0x6f746361, 0x56530072, 0x736e495f, 0x54656469,
|
|
||||||
0x46737365, 0x6f746361, 0x65730072, 0xab00786d, 0x58454853, 0x000003b8, 0x00030050, 0x000000ee,
|
|
||||||
0x01000071, 0x0100b093, 0x01008094, 0x01001895, 0x01000896, 0x01001897, 0x0100086a, 0x00001835,
|
|
||||||
0x00000012, 0x3f000000, 0x3dcccccd, 0x00000000, 0x00000000, 0x3f19999a, 0x3e4ccccd, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x3e99999a, 0x00000000, 0x00000000, 0x00000000, 0x3ecccccd, 0x00000000,
|
|
||||||
0x00000000, 0x01000072, 0x0200005f, 0x00016000, 0x0200005f, 0x0000b000, 0x0400005f, 0x002010f2,
|
|
||||||
0x00000016, 0x00000000, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000002, 0x04000056,
|
|
||||||
0x00100012, 0x00000000, 0x00016001, 0x04000056, 0x00100022, 0x00000000, 0x0000b001, 0x08000036,
|
|
||||||
0x001000c2, 0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04000036,
|
|
||||||
0x00100012, 0x00000001, 0x00016001, 0x09000000, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000,
|
|
||||||
0x00a01e46, 0x0010000a, 0x00000001, 0x00000000, 0x0100003e, 0x01000073, 0x02000099, 0x00000004,
|
|
||||||
0x0200005f, 0x00017000, 0x04000067, 0x00102012, 0x00000000, 0x0000000b, 0x04000067, 0x00102012,
|
|
||||||
0x00000001, 0x0000000c, 0x04000067, 0x00102012, 0x00000002, 0x0000000d, 0x04000067, 0x00102012,
|
|
||||||
0x00000003, 0x0000000e, 0x02000068, 0x00000001, 0x0400005b, 0x00102012, 0x00000000, 0x00000004,
|
|
||||||
0x04000036, 0x00100012, 0x00000000, 0x0001700a, 0x07000036, 0x00902012, 0x0010000a, 0x00000000,
|
|
||||||
0x0090901a, 0x0010000a, 0x00000000, 0x0100003e, 0x01000073, 0x02000099, 0x00000002, 0x0200005f,
|
|
||||||
0x00017000, 0x04000067, 0x00102012, 0x00000004, 0x0000000f, 0x04000067, 0x00102012, 0x00000005,
|
|
||||||
0x00000010, 0x02000068, 0x00000001, 0x0400005b, 0x00102012, 0x00000004, 0x00000002, 0x04000036,
|
|
||||||
0x00100012, 0x00000000, 0x0001700a, 0x08000036, 0x00d02012, 0x00000004, 0x0010000a, 0x00000000,
|
|
||||||
0x0090900a, 0x0010000a, 0x00000000, 0x0100003e, 0x01000073, 0x0200005f, 0x0000b000, 0x0400005f,
|
|
||||||
0x00219012, 0x00000016, 0x00000000, 0x03000065, 0x00102012, 0x00000006, 0x02000068, 0x00000001,
|
|
||||||
0x04000036, 0x00100012, 0x00000000, 0x0000b001, 0x07000036, 0x00102012, 0x00000006, 0x00a1900a,
|
|
||||||
0x0010000a, 0x00000000, 0x00000000, 0x0100003e, 0x01000073, 0x0200005f, 0x0000b000, 0x0400005f,
|
|
||||||
0x00219022, 0x00000016, 0x00000000, 0x03000065, 0x00102022, 0x00000006, 0x02000068, 0x00000001,
|
|
||||||
0x04000036, 0x00100012, 0x00000000, 0x0000b001, 0x07000036, 0x00102022, 0x00000006, 0x00a1901a,
|
|
||||||
0x0010000a, 0x00000000, 0x00000000, 0x0100003e, 0x01000073, 0x0200005f, 0x0000b000, 0x0400005f,
|
|
||||||
0x00219042, 0x00000016, 0x00000000, 0x03000065, 0x00102042, 0x00000006, 0x02000068, 0x00000001,
|
|
||||||
0x04000036, 0x00100012, 0x00000000, 0x0000b001, 0x07000036, 0x00102042, 0x00000006, 0x00a1902a,
|
|
||||||
0x0010000a, 0x00000000, 0x00000000, 0x0100003e, 0x01000073, 0x0200005f, 0x0000b000, 0x0400005f,
|
|
||||||
0x00219082, 0x00000016, 0x00000000, 0x03000065, 0x00102082, 0x00000006, 0x02000068, 0x00000001,
|
|
||||||
0x04000036, 0x00100012, 0x00000000, 0x0000b001, 0x07000036, 0x00102082, 0x00000006, 0x00a1903a,
|
|
||||||
0x0010000a, 0x00000000, 0x00000000, 0x0100003e, 0x54415453, 0x00000094, 0x00000018, 0x00000002,
|
|
||||||
0x00000004, 0x00000007, 0x00000001, 0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x0000000e, 0x00000000, 0x00000002, 0x00000000, 0x0000001d, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000003, 0x00000001, 0x00000003,
|
|
||||||
0x00000000, 0x00000000, 0x00000000,
|
|
||||||
};
|
|
||||||
static const uint32_t dxbc_ds[] =
|
|
||||||
{
|
|
||||||
0x43425844, 0x3744324a, 0x2e7f6684, 0x41142245, 0x9e6ecf04, 0x00000001, 0x0000042c, 0x00000006,
|
|
||||||
0x00000038, 0x000000b0, 0x000000e0, 0x000001c0, 0x000001f4, 0x00000390, 0x46454452, 0x00000070,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x0000003c, 0x44530500, 0x00000100, 0x0000003c, 0x31314452,
|
|
||||||
0x0000003c, 0x00000018, 0x00000020, 0x00000028, 0x00000024, 0x0000000c, 0x00000000, 0x7263694d,
|
|
||||||
0x666f736f, 0x52282074, 0x4c482029, 0x53204c53, 0x65646168, 0x6f432072, 0x6c69706d, 0x31207265,
|
|
||||||
0x2e302e30, 0x31303031, 0x36312e31, 0x00343833, 0x4e475349, 0x00000028, 0x00000001, 0x00000008,
|
|
||||||
0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x786d6573, 0xababab00,
|
|
||||||
0x47534350, 0x000000d8, 0x00000007, 0x00000008, 0x000000b0, 0x00000000, 0x0000000b, 0x00000003,
|
|
||||||
0x00000000, 0x00000001, 0x000000b0, 0x00000001, 0x0000000b, 0x00000003, 0x00000001, 0x00000001,
|
|
||||||
0x000000b0, 0x00000002, 0x0000000b, 0x00000003, 0x00000002, 0x00000101, 0x000000b0, 0x00000003,
|
|
||||||
0x0000000b, 0x00000003, 0x00000003, 0x00000001, 0x000000be, 0x00000000, 0x0000000c, 0x00000003,
|
|
||||||
0x00000004, 0x00000101, 0x000000be, 0x00000001, 0x0000000c, 0x00000003, 0x00000005, 0x00000001,
|
|
||||||
0x000000d2, 0x00000000, 0x00000000, 0x00000003, 0x00000006, 0x00000f0f, 0x545f5653, 0x46737365,
|
|
||||||
0x6f746361, 0x56530072, 0x736e495f, 0x54656469, 0x46737365, 0x6f746361, 0x65730072, 0xab00786d,
|
|
||||||
0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003,
|
|
||||||
0x00000000, 0x0000000f, 0x705f5653, 0x7469736f, 0x006e6f69, 0x58454853, 0x00000194, 0x00040050,
|
|
||||||
0x00000065, 0x01008093, 0x01001895, 0x0100086a, 0x04000061, 0x0011b012, 0x00000002, 0x0000000d,
|
|
||||||
0x04000061, 0x0011b012, 0x00000004, 0x0000000f, 0x0300005f, 0x0011b0f2, 0x00000006, 0x0200005f,
|
|
||||||
0x0001c032, 0x0400005f, 0x002190f2, 0x00000010, 0x00000000, 0x04000067, 0x001020f2, 0x00000000,
|
|
||||||
0x00000001, 0x02000068, 0x00000002, 0x04000036, 0x00100032, 0x00000000, 0x0001c046, 0x05000036,
|
|
||||||
0x001000c2, 0x00000000, 0x0011b006, 0x00000002, 0x07000000, 0x001000f2, 0x00000000, 0x00100e46,
|
|
||||||
0x00000000, 0x0011be46, 0x00000006, 0x05000036, 0x00100012, 0x00000001, 0x0011b00a, 0x00000002,
|
|
||||||
0x05000036, 0x00100042, 0x00000001, 0x0011b00a, 0x00000004, 0x07000000, 0x001000f2, 0x00000000,
|
|
||||||
0x00100e46, 0x00000000, 0x00100a06, 0x00000001, 0x05000036, 0x00100012, 0x00000001, 0x0011b00a,
|
|
||||||
0x00000004, 0x06000036, 0x001000c2, 0x00000001, 0x00219ea6, 0x00000004, 0x00000000, 0x07000000,
|
|
||||||
0x001000f2, 0x00000000, 0x00100e46, 0x00000000, 0x00100e06, 0x00000001, 0x06000036, 0x00100032,
|
|
||||||
0x00000001, 0x00219046, 0x00000004, 0x00000000, 0x08000036, 0x001000c2, 0x00000001, 0x00004002,
|
|
||||||
0x00000000, 0x00000000, 0x40400000, 0x40800000, 0x07000000, 0x001020f2, 0x00000000, 0x00100e46,
|
|
||||||
0x00000000, 0x00100e46, 0x00000001, 0x0100003e, 0x54415453, 0x00000094, 0x0000000d, 0x00000002,
|
|
||||||
0x00000000, 0x00000006, 0x00000004, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
|
||||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0x00000003,
|
|
||||||
0x00000000, 0x00000000, 0x00000000,
|
|
||||||
};
|
|
||||||
static const uint32_t dxbc_gs[] =
|
static const uint32_t dxbc_gs[] =
|
||||||
{
|
{
|
||||||
0x43425844, 0xe27a1766, 0x53623db9, 0x85065db9, 0x79f2e81e, 0x00000001, 0x00000324, 0x00000005,
|
0x43425844, 0xe27a1766, 0x53623db9, 0x85065db9, 0x79f2e81e, 0x00000001, 0x00000324, 0x00000005,
|
||||||
@ -1440,7 +1349,7 @@ static void test_emit_signature(void)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hs_5_0",
|
"hs_5_0",
|
||||||
{dxbc_hs, sizeof(dxbc_hs)},
|
{NULL, 0},
|
||||||
"struct input_data\n"
|
"struct input_data\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" float4 x : semx;\n"
|
" float4 x : semx;\n"
|
||||||
@ -1500,7 +1409,7 @@ static void test_emit_signature(void)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ds_5_0",
|
"ds_5_0",
|
||||||
{dxbc_ds, sizeof(dxbc_ds)},
|
{NULL, 0},
|
||||||
"struct constant_data\n"
|
"struct constant_data\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" float edges[4] : SV_TessFactor;\n"
|
" float edges[4] : SV_TessFactor;\n"
|
||||||
@ -1532,7 +1441,7 @@ static void test_emit_signature(void)
|
|||||||
".param SV_InsideTessFactor.x, vpc4.x, float, QUADINT\n"
|
".param SV_InsideTessFactor.x, vpc4.x, float, QUADINT\n"
|
||||||
".param SV_InsideTessFactor1.x, vpc5, float, QUADINT\n"
|
".param SV_InsideTessFactor1.x, vpc5, float, QUADINT\n"
|
||||||
".param semx.xyzw, vpc6.xyzw, float\n",
|
".param semx.xyzw, vpc6.xyzw, float\n",
|
||||||
false
|
true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"gs_5_0",
|
"gs_5_0",
|
||||||
|
Reference in New Issue
Block a user