35 {0.41666f, 1.055f, 0.055f, 12.92f},
37 {0.0031308f, 0.0f, 0.0f, 0.0f},
78 "dcl_hs_fork_phase_instance_count",
79 "dcl_hs_join_phase_instance_count",
80 "dcl_hs_max_tessfactor",
81 "dcl_immediateConstantBuffer",
85 "dcl_input_control_point_count",
94 "dcl_output_control_point_count",
98 "dcl_resource_structured",
102 "dcl_tessellator_domain",
103 "dcl_tessellator_output_primitive",
104 "dcl_tessellator_partitioning",
106 "dcl_tgsm_structured",
109 "dcl_uav_structured",
111 "dcl_maxOutputVertexCount",
154 "hs_control_point_phase",
170 "imm_atomic_cmp_exch",
171 "imm_atomic_consume",
336 return "UNRECOGNIZED";
375 e->semantic_idx =
s->usage_idx;
379 e->register_idx =
s->reg.reg.idx[0].offset;
380 e->mask =
s->reg.write_mask;
391 e->register_idx = reg_idx;
392 e->mask = write_mask;
406 WARN(
"Invalid source type %#x specified.\n", source_type);
422 ERR(
"Failed to allocate shader buffer memory.\n");
438 unsigned int new_buffer_size =
buffer->buffer_size * 2;
440 while (rc > 0 && (
unsigned int)rc >= new_buffer_size -
buffer->content_size)
441 new_buffer_size *= 2;
442 if (!(new_buffer =
realloc(
buffer->buffer, new_buffer_size)))
444 ERR(
"Failed to grow buffer.\n");
448 buffer->buffer = new_buffer;
449 buffer->buffer_size = new_buffer_size;
460 if (rc < 0 || (
unsigned int)rc >= rem )
463 buffer->content_size += rc;
493 ERR(
"Couldn't allocate buffer for temporary string.\n");
567 static const struct limits_entry
570 unsigned int max_version;
576 {
WINED3D_SHADER_VERSION(1, 0),
WINED3D_SHADER_VERSION(1, 1), { 0, 0, 256, 0, 12, 0}},
577 {
WINED3D_SHADER_VERSION(2, 0),
WINED3D_SHADER_VERSION(2, 1), { 0, 16, 256, 16, 12, 0}},
583 {
WINED3D_SHADER_VERSION(3, 0),
WINED3D_SHADER_VERSION(3, 0), { 4, 16, 256, 16, 12, 0}},
584 {
WINED3D_SHADER_VERSION(4, 0),
WINED3D_SHADER_VERSION(4, 0), {16, 0, 0, 0, 16, 0}},
585 {
WINED3D_SHADER_VERSION(4, 1),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 0}},
591 {
WINED3D_SHADER_VERSION(5, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 32}},
596 {
WINED3D_SHADER_VERSION(5, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 32}},
601 {
WINED3D_SHADER_VERSION(4, 0),
WINED3D_SHADER_VERSION(4, 0), {16, 0, 0, 0, 32, 16}},
602 {
WINED3D_SHADER_VERSION(4, 1),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 32}},
608 {
WINED3D_SHADER_VERSION(1, 0),
WINED3D_SHADER_VERSION(1, 3), { 4, 0, 8, 0, 0, 0}},
609 {
WINED3D_SHADER_VERSION(1, 4),
WINED3D_SHADER_VERSION(1, 4), { 6, 0, 8, 0, 0, 0}},
610 {
WINED3D_SHADER_VERSION(2, 0),
WINED3D_SHADER_VERSION(2, 0), {16, 0, 32, 0, 0, 0}},
611 {
WINED3D_SHADER_VERSION(2, 1),
WINED3D_SHADER_VERSION(2, 1), {16, 16, 32, 16, 0, 0}},
612 {
WINED3D_SHADER_VERSION(3, 0),
WINED3D_SHADER_VERSION(3, 0), {16, 16, 224, 16, 0, 10}},
613 {
WINED3D_SHADER_VERSION(4, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 0, 32}},
619 {
WINED3D_SHADER_VERSION(5, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 0, 0}},
621 const struct limits_entry *limits_array;
623 shader->reg_maps.shader_version.minor);
626 switch (
shader->reg_maps.shader_version.type)
629 FIXME(
"Unexpected shader type %u found.\n",
shader->reg_maps.shader_version.type);
632 limits_array = vs_limits;
635 limits_array = hs_limits;
638 limits_array = ds_limits;
641 limits_array = gs_limits;
644 limits_array = ps_limits;
647 limits_array = cs_limits;
653 if (shader_version <= limits_array[
i].max_version)
655 shader->limits = &limits_array[
i].limits;
662 FIXME(
"Unexpected shader version \"%u.%u\" (shader type %u).\n",
663 shader->reg_maps.shader_version.major,
664 shader->reg_maps.shader_version.minor,
665 shader->reg_maps.shader_version.type);
666 shader->limits = &limits_array[
max(0,
i - 1)].limits;
679 reg_maps->
address |= 1u <<
reg->idx[0].offset;
687 if (
reg->idx[0].rel_addr)
695 if (
reg->idx[0].rel_addr)
696 shader->u.ps.input_reg_used = ~0
u;
698 shader->u.ps.input_reg_used |= 1u <<
reg->idx[0].offset;
707 if (
reg->idx[0].offset == 1)
709 if (
reg->idx[0].offset == 2)
716 if (!
reg->idx[0].offset)
718 else if (
reg->idx[0].offset == 1)
724 if (
reg->idx[0].rel_addr)
734 if (
reg->idx[0].offset >=
min(
shader->limits->constant_float, constf_size))
736 WARN(
"Shader using float constant %u which is not supported.\n",
reg->idx[0].offset);
747 if (
reg->idx[0].offset >=
shader->limits->constant_int)
749 WARN(
"Shader using integer constant %u which is not supported.\n",
reg->idx[0].offset);
759 if (
reg->idx[0].offset >=
shader->limits->constant_bool)
761 WARN(
"Shader using bool constant %u which is not supported.\n",
reg->idx[0].offset);
771 reg_maps->
rt_mask |= (1u <<
reg->idx[0].offset);
787 TRACE(
"Not recording register of type %#x and [%#x][%#x].\n",
788 reg->type,
reg->idx[0].offset,
reg->idx[1].offset);
795 unsigned int resource_idx,
unsigned int sampler_idx,
unsigned int bind_idx)
805 if (
entries[
i].resource_idx == resource_idx &&
entries[
i].sampler_idx == sampler_idx)
813 ERR(
"Failed to allocate sampler map entries.\n");
826 ERR(
"Failed to resize sampler map entries.\n");
834 entry->resource_idx = resource_idx;
835 entry->sampler_idx = sampler_idx;
836 entry->bind_idx = bind_idx;
845 return param == 1 ? 3 : 0;
849 return param == 1 ? 2 : 0;
852 return param == 1 ? 1 : 0;
860 unsigned int register_idx,
unsigned int size,
unsigned int stride)
866 ERR(
"Invalid TGSM register index %u.\n", register_idx);
871 FIXME(
"TGSM declarations are allowed only in compute shaders.\n");
876 register_idx + 1,
sizeof(*reg_maps->
tgsm)))
880 tgsm = ®_maps->
tgsm[register_idx];
888 const DWORD *current_instruction_ptr,
const DWORD *previous_instruction_ptr)
892 if ((phase = *current_phase))
894 phase->
end = previous_instruction_ptr;
895 *current_phase =
NULL;
907 if (
shader->u.hs.phases.control_point)
909 FIXME(
"Multiple control point phases.\n");
912 if (!(
shader->u.hs.phases.control_point =
calloc(1,
sizeof(*
shader->u.hs.phases.control_point))))
914 phase =
shader->u.hs.phases.control_point;
918 &
shader->u.hs.phases.fork_size,
shader->u.hs.phases.fork_count + 1,
919 sizeof(*
shader->u.hs.phases.fork)))
921 phase = &
shader->u.hs.phases.fork[
shader->u.hs.phases.fork_count++];
925 &
shader->u.hs.phases.join_size,
shader->u.hs.phases.join_count + 1,
926 sizeof(*
shader->u.hs.phases.join)))
928 phase = &
shader->u.hs.phases.join[
shader->u.hs.phases.join_count++];
935 phase->
start = current_instruction_ptr;
936 *current_phase = phase;
950 WARN(
"Invalid clip/cull distance index %u.\n",
e->semantic_idx);
962 FIXME(
"Unexpected interpolation mode %#x.\n",
mode);
1011 unsigned int cur_loop_depth = 0, max_loop_depth = 0;
1014 const DWORD *
ptr, *prev_ins, *current_ins;
1015 void *fe_data =
shader->frontend_data;
1019 memset(reg_maps, 0,
sizeof(*reg_maps));
1020 memset(input_signature_elements, 0,
sizeof(input_signature_elements));
1021 memset(output_signature_elements, 0,
sizeof(output_signature_elements));
1026 prev_ins = current_ins =
ptr;
1032 sizeof(*reg_maps->
constf))))
1034 ERR(
"Failed to allocate constant map memory.\n");
1049 WARN(
"Encountered unrecognised or invalid instruction.\n");
1058 unsigned int reg_idx = semantic->
reg.reg.idx[0].offset;
1060 switch (semantic->
reg.reg.type)
1066 ERR(
"Invalid input register index %u.\n", reg_idx);
1080 ERR(
"Invalid output register index %u.\n", reg_idx);
1096 ERR(
"Invalid resource index %u.\n", reg_idx);
1111 ERR(
"Invalid UAV resource index %u.\n", reg_idx);
1117 FIXME(
"Ignoring typed UAV flags %#x.\n", ins.
flags);
1121 TRACE(
"Not recording DCL register type %#x.\n", semantic->
reg.reg.type);
1130 ERR(
"Invalid CB index %u.\n",
reg->idx[0].offset);
1143 shader->u.ps.force_early_depth_stencil =
TRUE;
1145 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1150 WARN(
"Ignoring global flags %#x.\n", ins.
flags);
1158 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1167 FIXME(
"Instruction %s outside of shader phase.\n",
1173 FIXME(
"Multiple immediate constant buffers.\n");
1180 FIXME(
"Indexable temporary registers not supported.\n");
1198 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1206 ERR(
"Invalid register index %u.\n", reg_idx);
1212 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1224 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1240 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1248 ERR(
"Invalid resource index %u.\n", reg_idx);
1261 ERR(
"Invalid resource index %u.\n", reg_idx);
1325 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1334 ERR(
"Invalid UAV resource index %u.\n", reg_idx);
1338 FIXME(
"Ignoring raw UAV flags %#x.\n", ins.
flags);
1348 ERR(
"Invalid UAV resource index %u.\n", reg_idx);
1352 FIXME(
"Ignoring structured UAV flags %#x.\n", ins.
flags);
1363 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1371 if (!(lconst =
malloc(
sizeof(*lconst))))
1374 lconst->
idx = ins.
dst[0].reg.idx[0].offset;
1403 if (!(lconst =
malloc(
sizeof(*lconst))))
1406 lconst->
idx = ins.
dst[0].reg.idx[0].offset;
1416 if (!(lconst =
malloc(
sizeof(*lconst))))
1419 lconst->
idx = ins.
dst[0].reg.idx[0].offset;
1436 reg_maps->
labels |= 1u << ins.
src[0].reg.idx[0].offset;
1453 shader_version.
type, constf_size))
1460 switch (ins.
dst[
i].reg.type)
1463 if (shader_version.
major >= 3)
1488 if (shader_version.
major >= 3)
1495 output_signature_elements[
idx].
mask |= ins.
dst[
i].write_mask;
1507 if (shader_version.
major >= 3)
1511 WARN(
"Invalid output register index %u.\n",
idx);
1519 WARN(
"Invalid texcoord index %u.\n",
idx);
1525 output_signature_elements[
idx].
mask |= ins.
dst[
i].write_mask;
1563 && ins.
dst[
i].reg.idx[0].offset ==
shader->u.ps.color0_reg)
1570 if (shader_version.
major == 1
1583 unsigned int reg_idx = ins.
dst[
i].reg.idx[0].offset;
1587 WARN(
"Invalid 1.x sampler index %u.\n", reg_idx);
1591 TRACE(
"Setting fake 2D resource for 1.x pixelshader.\n");
1601 reg_maps->
bumpmat |= 1u << reg_idx;
1610 reg_maps->
bumpmat |= 1u << ins.
dst[
i].reg.idx[0].offset;
1616 unsigned int reg_idx = ins.
src[0].reg.idx[0].offset;
1619 ERR(
"Invalid UAV index %u.\n", reg_idx);
1648 ERR(
"Invalid UAV index %u.\n",
reg->idx[0].offset);
1680 if (cur_loop_depth > max_loop_depth)
1681 max_loop_depth = cur_loop_depth;
1729 shader_version.
type, constf_size))
1738 shader_version.
type, constf_size))
1742 ++
reg.idx[0].offset;
1744 shader_version.
type, constf_size))
1755 shader->u.ps.color0_reg = ins.
src[
i].reg.idx[0].offset;
1761 prev_ins = current_ins;
1767 phase->
end = prev_ins;
1774 reg_maps->
rt_mask |= (1u << 0);
1784 WARN(
"Invalid input signature register index %u.\n", input_signature->
elements[
i].register_idx);
1814 *
e++ = input_signature_elements[
i];
1826 unsigned int count = 0;
1842 *
e++ = output_signature_elements[
i];
1867 map &= reg_maps->
shader_version.major < 3 ? ~reg_maps->texcoord : ~reg_maps->input_registers;
1879 void *fe_data =
shader->frontend_data;
1889 state.current_loop_depth = 0;
1890 state.current_loop_reg = 0;
1898 ctx.backend_data = backend_ctx;
1913 WARN(
"Encountered unrecognised or invalid instruction.\n");
1918 FIXME(
"Predicates not implemented.\n");
1921 device->shader_backend->shader_handle_instruction(&ins);
1936 free(
shader->patch_constant_signature.elements);
1939 shader->device->shader_backend->shader_destroy(
shader);
1996 void *vertex_priv, *fragment_priv;
1999 if (!(priv =
malloc(
sizeof(*priv))))
2004 ERR(
"Failed to initialize vertex pipe.\n");
2011 ERR(
"Failed to initialize fragment pipe.\n");
2020 device->vertex_priv = vertex_priv;
2021 device->fragment_priv = fragment_priv;
2022 device->shader_priv = priv;
2044 memset(caps, 0,
sizeof(*caps));
2106 for (
i = 0;
i <
s->element_count; ++
i)
2129 if (output->
mask & (1u <<
idx))
2135 *component_idx =
idx;
2157 const char *
n = so_desc->
elements[
i].semantic_name;
2168 s->desc.elements =
s->elements;
2170 name = (
char *)&
s->elements[
s->desc.element_count];
2175 if (!
e->semantic_name)
2180 e->semantic_name =
name;
2189 gs->so_desc = &
s->desc;
2210 WARN(
"Failed to initialise frontend data.\n");
2216 switch (shader_version.
type)
2221 shader->functionLength = 0;
2232 shader->reg_maps.shader_version = shader_version;
2243 if (!
e->semantic_name)
2246 e->stream_idx,
e->semantic_name,
e->semantic_idx))
2249 WARN(
"Failed to find output signature element for stream output entry.\n");
2256 WARN(
"Invalid component range %u-%u (mask %#x), output mask %#x.\n",
2264 WARN(
"Failed to initialise stream output description, hr %#lx.\n",
hr);
2286 info.source_type = source_type;
2288 info.options = compile_options;
2295 FIXME(
"Shader log:\n");
2306 ERR(
"Failed to disassemble, ret %d.\n",
ret);
2325 unsigned int highest_reg_used = 0, num_regs_used = 0;
2327 unsigned int backend_version;
2330 TRACE(
"shader %p, byte_code %p, size %#Ix, type %s, float_const_count %u.\n",
2333 if (!
desc->byte_code)
2336 if (
desc->byte_code_size == ~(
size_t)0)
2347 FIXME(
"Unable to find frontend for shader.\n");
2355 WARN(
"Failed to initialise frontend data.\n");
2380 unsigned int max_version;
2388 shader->byte_code_size =
desc->byte_code_size;
2399 FIXME(
"Unable to find frontend for shader.\n");
2425 FIXME(
"Failed to initialize frontend.\n");
2432 shader->load_local_constsF =
shader->lconst_inf_or_nan;
2442 WARN(
"Shader version %u not supported by this device.\n",
version->major);
2448 for (
unsigned int i = 0;
i <
shader->input_signature.element_count; ++
i)
2455 shader->u.vs.attributes[
input->register_idx].usage =
2457 shader->u.vs.attributes[
input->register_idx].usage_idx =
input->semantic_idx;
2463 backend_version = d3d_info->
limits.vs_version;
2467 backend_version = d3d_info->
limits.hs_version;
2470 backend_version = d3d_info->
limits.ds_version;
2473 backend_version = d3d_info->
limits.gs_version;
2478 if (
shader->u.ps.input_reg_used & (1u <<
i))
2481 highest_reg_used =
i;
2487 if (highest_reg_used < (d3d_info->
limits.varying_count / 4)
2488 || num_regs_used > (d3d_info->
limits.varying_count / 4)
2489 ||
shader->reg_maps.shader_version.major >= 4)
2491 if (num_regs_used > (d3d_info->
limits.varying_count / 4))
2496 WARN(
"More varying registers used than supported.\n");
2502 shader->u.ps.declared_in_count = highest_reg_used + 1;
2506 shader->u.ps.declared_in_count = 0;
2509 if (
shader->u.ps.input_reg_used & (1u <<
i))
2510 shader->u.ps.input_reg_map[
i] =
shader->u.ps.declared_in_count++;
2512 shader->u.ps.input_reg_map[
i] = ~0
u;
2516 backend_version = d3d_info->
limits.ps_version;
2519 backend_version = d3d_info->
limits.cs_version;
2522 FIXME(
"No backend version-checking for this shader type.\n");
2523 backend_version = 0;
2525 if (
version->major > backend_version)
2527 WARN(
"Shader version %u.%u not supported by the current shader backend.\n",
2539 TRACE(
"%p increasing refcount to %u.\n",
shader, refcount);
2562 device->adapter->d3d_info.limits.vs_uniform_count);
2574 device->adapter->d3d_info.limits.ps_uniform_count);
2582 TRACE(
"object %p.\n",
object);
2592 TRACE(
"%p decreasing refcount to %u.\n",
shader, refcount);
2597 shader->parent_ops->wined3d_object_destroyed(
shader->parent);
2643 TRACE(
"shader %p, start_idx %u, src_data %p, count %u.\n",
shader, start_idx, src_data,
count);
2645 if (end_idx >
shader->limits->constant_float)
2647 WARN(
"end_idx %u > float constants limit %u.\n",
2648 end_idx,
shader->limits->constant_float);
2649 end_idx =
shader->limits->constant_float;
2652 for (
i = start_idx;
i < end_idx; ++
i)
2657 if (!(lconst =
malloc(
sizeof(*lconst))))
2679 || pixel_shader->
reg_maps.shader_version.major < 4)
2681 memset(interpolation_args, 0,
sizeof(pixel_shader->
u.
ps.interpolation_mode));
2685 memcpy(interpolation_args, pixel_shader->
u.
ps.interpolation_mode,
2686 sizeof(pixel_shader->
u.
ps.interpolation_mode));
2696 WORD swizzle_map =
context->stream_info.swizzle_map;
2716 if (
state->vertex_declaration->position_transformed)
2736 if (
shader->reg_maps.shader_version.major >= 4)
2737 args->next_shader_input_count = hull_shader ? hull_shader->
limits->packed_input
2738 : geometry_shader ? geometry_shader->
limits->packed_input
2739 : pixel_shader ? pixel_shader->
limits->packed_input : 0;
2741 args->next_shader_input_count = 0;
2742 args->swizzle_map = swizzle_map;
2746 args->flatshading = 0;
2754 if (usage_idx1 != usage_idx2)
2756 if (usage1 == usage2)
2776 shader->u.vs.attributes[
i].usage_idx, usage_req, usage_idx_req))
2792 shader->parent_ops = parent_ops;
2845 args->tessellator_output_primitive = hull_shader->
u.
hs.tessellator_output_primitive;
2846 args->tessellator_partitioning = hull_shader->
u.
hs.tessellator_partitioning;
2848 args->output_count = geometry_shader ? geometry_shader->
limits->packed_input
2849 : pixel_shader ? pixel_shader->
limits->packed_input :
shader->limits->packed_output;
2863 args->output_count = pixel_shader ? pixel_shader->
limits->packed_input :
shader->limits->packed_output;
2865 if (!(
args->primitive_type =
shader->u.gs.input_type))
2866 args->primitive_type =
state->primitive_type;
2883 static unsigned int warned = 0;
2885 args->srgb_correction = 1;
2886 if (
state->blend_state &&
state->blend_state->desc.rt[0].enable && !warned++)
2887 WARN(
"Blending into a sRGB render target with no GL_ARB_framebuffer_sRGB "
2888 "support, expect rendering artifacts.\n");
2891 if (
shader->reg_maps.shader_version.major == 1
2892 &&
shader->reg_maps.shader_version.minor <= 3)
2894 for (
i = 0;
i <
shader->limits->sampler; ++
i)
2902 if (!
vs ||
vs->is_ffp_vs)
2909 for (
j = 0;
j <
state->vertex_declaration->element_count; ++
j)
2912 &
state->vertex_declaration->elements[
j];
2917 max_valid =
element->format->component_count;
2921 if (!tex_transform || tex_transform > max_valid)
2923 WARN(
"Fixing up projected texture transform flags from %#x to %#x.\n",
2924 tex_transform, max_valid);
2925 tex_transform = max_valid;
2935 WARN(
"Application requested projected texture with unsuitable texture coordinates.\n");
2936 WARN(
"(texture unit %u, transform flags %#x, sampler type %u).\n",
2937 i, tex_transform, resource_type);
2947 if (
shader->reg_maps.shader_version.major == 1
2948 &&
shader->reg_maps.shader_version.minor <= 4)
2950 for (
i = 0;
i <
shader->limits->sampler; ++
i)
2954 if (!
shader->reg_maps.resource_info[
i].type)
2964 switch (
texture->resource.type)
2984 else if (
shader->reg_maps.shader_version.major <= 3)
2986 for (
i = 0;
i <
shader->limits->sampler; ++
i)
2991 if (!(resource_type =
shader->reg_maps.resource_info[
i].type))
2994 switch (resource_type)
3023 if (
shader->reg_maps.shader_version.major >= 4)
3034 if (!
shader->reg_maps.resource_info[
i].type)
3047 args->color_fixup[
i] =
texture->resource.format->color_fixup;
3050 args->shadow |= 1u <<
i;
3054 if (
shader->reg_maps.shader_version.major >= 3)
3056 if (position_transformed)
3087 args->texcoords_initialized = 0;
3093 args->texcoords_initialized |= 1u <<
i;
3103 args->texcoords_initialized |= 1u <<
i;
3129 args->rt_alpha_swizzle |= 1u <<
i;
3132 args->dual_source_blend =
state->blend_state &&
state->blend_state->dual_source;
3154 unsigned int resource_idx,
DWORD tex_types)
3173 return shader_resource_type_from_shader_tex_types[
idx];
3182 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3185 if (!(
object =
calloc(1,
sizeof(*
object))))
3199 TRACE(
"Created compute shader %p.\n",
object);
3211 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3214 if (!(
object =
calloc(1,
sizeof(*
object))))
3228 TRACE(
"Created domain shader %p.\n",
object);
3241 TRACE(
"device %p, desc %p, so_desc %p, parent %p, parent_ops %p, shader %p.\n",
3244 if (!(
object =
calloc(1,
sizeof(*
object))))
3249 WARN(
"Failed to initialize geometry shader, hr %#lx.\n",
hr);
3256 TRACE(
"Created geometry shader %p.\n",
object);
3268 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3271 if (!(
object =
calloc(1,
sizeof(*
object))))
3285 TRACE(
"Created hull shader %p.\n",
object);
3297 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3300 if (!(
object =
calloc(1,
sizeof(*
object))))
3305 WARN(
"Failed to initialize pixel shader, hr %#lx.\n",
hr);
3312 TRACE(
"Created pixel shader %p.\n",
object);
3324 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3327 if (!(
object =
calloc(1,
sizeof(*
object))))
3332 WARN(
"Failed to initialize vertex shader, hr %#lx.\n",
hr);
3339 TRACE(
"Created vertex shader %p.\n",
object);
3350 if (!(
object =
calloc(1,
sizeof(*
object))))
3354 object->is_ffp_vs =
true;
3364 TRACE(
"Created FFP vertex shader %p.\n",
object);
3375 if (!(
object =
calloc(1,
sizeof(*
object))))
3379 object->is_ffp_ps =
true;
3389 TRACE(
"Created FFP pixel shader %p.\n",
object);
struct mke2fs_defaults settings[]
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
list(size_type __n, const_reference __val=_STLP_DEFAULT_CONSTRUCTED(value_type), const allocator_type &__a=allocator_type())
_STLP_TEMPLATE_FOR_CONT_EXT size_type count(const _KT &__x) const
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
void wined3d_cs_init_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
static HRESULT shader_calculate_clip_or_cull_distance_mask(const struct wined3d_shader_signature_element *e, unsigned int *mask)
void string_buffer_list_cleanup(struct wined3d_string_buffer_list *list)
HRESULT CDECL wined3d_shader_create_gs(struct wined3d_device *device, const struct wined3d_shader_desc *desc, const struct wined3d_stream_output_desc *so_desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
static void shader_none_get_caps(const struct wined3d_adapter *adapter, struct shader_caps *caps)
static void shader_signature_from_usage(struct wined3d_shader_signature_element *e, enum wined3d_decl_usage usage, UINT usage_idx, UINT reg_idx, DWORD write_mask)
void string_buffer_clear(struct wined3d_string_buffer *buffer)
static void shader_none_apply_compute_state(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state)
static void init_interpolation_compile_args(uint32_t *interpolation_args, const struct wined3d_shader *pixel_shader, const struct wined3d_d3d_info *d3d_info)
HRESULT CDECL wined3d_shader_create_vs(struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
static HRESULT vertex_shader_init(struct wined3d_shader *shader, struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
static void wined3d_insert_interpolation_mode(uint32_t *packed_interpolation_mode, unsigned int register_idx, enum wined3d_shader_interpolation_mode mode)
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage)
void *CDECL wined3d_shader_get_parent(const struct wined3d_shader *shader)
static void shader_none_free_context_data(struct wined3d_context *context)
ULONG CDECL wined3d_shader_incref(struct wined3d_shader *shader)
void find_ds_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct ds_compile_args *args, const struct wined3d_context *context)
static uint64_t shader_none_shader_compile(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc, enum wined3d_shader_type shader_type)
BOOL shader_get_stream_output_register_info(const struct wined3d_shader *shader, const struct wined3d_stream_output_element *so_element, unsigned int *register_idx, unsigned int *component_idx)
static HRESULT shader_set_function(struct wined3d_shader *shader, const struct wined3d_shader_desc *desc, enum wined3d_shader_type type, const struct wined3d_stream_output_desc *so_desc, unsigned int float_const_count)
const struct wined3d_shader_backend_ops none_shader_backend
HRESULT wined3d_shader_create_ffp_vs(struct wined3d_device *device, const struct wined3d_ffp_vs_settings *settings, struct wined3d_shader **shader)
struct wined3d_string_buffer * string_buffer_get(struct wined3d_string_buffer_list *list)
HRESULT CDECL wined3d_shader_create_ps(struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
static void shader_none_precompile(void *shader_priv, struct wined3d_shader *shader)
static const char *const shader_opcode_names[]
static const struct wined3d_shader_frontend * shader_select_frontend(enum vkd3d_shader_source_type source_type)
static void shader_none_free(struct wined3d_device *device, struct wined3d_context *context)
static void shader_delete_constant_list(struct list *clist)
static HRESULT geometry_shader_init_so_desc(struct wined3d_geometry_shader *gs, struct wined3d_device *device, const struct wined3d_stream_output_desc *so_desc)
HRESULT CDECL wined3d_shader_get_byte_code(const struct wined3d_shader *shader, void *byte_code, UINT *byte_code_size)
bool vshader_get_input(const struct wined3d_shader *shader, uint8_t usage_req, uint8_t usage_idx_req, unsigned int *regnum)
void find_gs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct gs_compile_args *args, const struct wined3d_context *context)
void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, BOOL position_transformed, struct ps_compile_args *args, const struct wined3d_context *context)
static void shader_set_limits(struct wined3d_shader *shader)
static enum wined3d_sysval_semantic shader_sysval_semantic_from_usage(enum wined3d_decl_usage usage)
HRESULT CDECL wined3d_shader_set_local_constants_float(struct wined3d_shader *shader, UINT start_idx, const float *src_data, UINT count)
static HRESULT geometry_shader_init_stream_output(struct wined3d_shader *shader, const struct wined3d_stream_output_desc *so_desc)
void string_buffer_free(struct wined3d_string_buffer *buffer)
HRESULT wined3d_shader_create_ffp_ps(struct wined3d_device *device, const struct ffp_frag_settings *settings, struct wined3d_shader **shader)
static unsigned int get_instr_extra_regcount(enum WINED3D_SHADER_INSTRUCTION_HANDLER instr, unsigned int param)
ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
void find_vs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct vs_compile_args *args, const struct wined3d_context *context)
enum vkd3d_shader_visibility vkd3d_shader_visibility_from_wined3d(enum wined3d_shader_type shader_type)
static const char *const semantic_names[]
static HRESULT shader_get_registers_used(struct wined3d_shader *shader, DWORD constf_size)
static void shader_signature_from_semantic(struct wined3d_shader_signature_element *e, const struct wined3d_shader_semantic *s)
void string_buffer_sprintf(struct wined3d_string_buffer *buffer, const char *format,...)
static void shader_none_destroy(struct wined3d_shader *shader)
static int string_buffer_vsprintf(struct wined3d_string_buffer *buffer, const char *format, va_list args)
BOOL string_buffer_init(struct wined3d_string_buffer *buffer)
static unsigned int shader_max_version_from_feature_level(enum wined3d_feature_level level)
int shader_addline(struct wined3d_string_buffer *buffer, const char *format,...)
static void shader_none_handle_instruction(const struct wined3d_shader_instruction *ins)
HRESULT CDECL wined3d_shader_create_hs(struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
HRESULT CDECL wined3d_shader_create_ds(struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
static HRESULT shader_reg_maps_add_tgsm(struct wined3d_shader_reg_maps *reg_maps, unsigned int register_idx, unsigned int size, unsigned int stride)
int shader_vaddline(struct wined3d_string_buffer *buffer, const char *format, va_list args)
static struct wined3d_shader_signature_element * shader_find_signature_element(const struct wined3d_shader_signature *s, unsigned int stream_idx, const char *semantic_name, unsigned int semantic_idx)
static void shader_none_apply_draw_state(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state)
HRESULT CDECL wined3d_shader_create_cs(struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
static HRESULT geometry_shader_init(struct wined3d_shader *shader, struct wined3d_device *device, const struct wined3d_shader_desc *desc, const struct wined3d_stream_output_desc *so_desc, void *parent, const struct wined3d_parent_ops *parent_ops)
BOOL string_buffer_resize(struct wined3d_string_buffer *buffer, int rc)
static BOOL shader_none_color_fixup_supported(struct color_fixup_desc fixup)
static HRESULT shader_record_shader_phase(struct wined3d_shader *shader, struct wined3d_shader_phase **current_phase, const struct wined3d_shader_instruction *ins, const DWORD *current_instruction_ptr, const DWORD *previous_instruction_ptr)
static HRESULT shader_scan_output_signature(struct wined3d_shader *shader)
static void shader_cleanup_reg_maps(struct wined3d_shader_reg_maps *reg_maps)
static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
static void shader_none_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count)
static void shader_record_sample(struct wined3d_shader_reg_maps *reg_maps, unsigned int resource_idx, unsigned int sampler_idx, unsigned int bind_idx)
static HRESULT shader_none_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, const struct wined3d_fragment_pipe_ops *fragment_pipe)
static enum wined3d_decl_usage shader_usage_from_semantic_name(const char *name)
const char * debug_d3dshaderinstructionhandler(enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx)
static BOOL shader_none_allocate_context_data(struct wined3d_context *context)
void string_buffer_release(struct wined3d_string_buffer_list *list, struct wined3d_string_buffer *buffer)
static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct wined3d_shader_reg_maps *reg_maps, const struct wined3d_shader_register *reg, enum wined3d_shader_type shader_type, unsigned int constf_size)
void string_buffer_list_init(struct wined3d_string_buffer_list *list)
static void shader_init(struct wined3d_shader *shader, struct wined3d_device *device, void *parent, const struct wined3d_parent_ops *parent_ops)
enum wined3d_shader_resource_type pixelshader_get_resource_type(const struct wined3d_shader_reg_maps *reg_maps, unsigned int resource_idx, DWORD tex_types)
static const char * shader_semantic_name_from_usage(enum wined3d_decl_usage usage)
static void shader_none_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count)
static void shader_none_disable(void *shader_priv, struct wined3d_context *context)
static void shader_cleanup(struct wined3d_shader *shader)
static void shader_trace(const void *code, size_t size, enum vkd3d_shader_source_type source_type)
unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_maps *reg_maps, unsigned int max)
static void shader_none_init_context_state(struct wined3d_context *context)
const struct wined3d_vec4 wined3d_srgb_const[]
static void wined3d_shader_destroy_object(void *object)
static void wined3d_shader_init_object(void *object)
static BOOL match_usage(BYTE usage1, BYTE usage_idx1, BYTE usage2, BYTE usage_idx2)
HRESULT shader_generate_code(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer, const struct wined3d_shader_reg_maps *reg_maps, void *backend_ctx, const DWORD *start, const DWORD *end)
const char * debug_shader_type(enum wined3d_shader_type type)
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
const char * wine_dbg_sprintf(const char *format,...)
#define stricmp(_String1, _String2)
static const WCHAR version[]
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
bool ffp_hlsl_compile_ps(const struct ffp_frag_settings *settings, struct wined3d_shader_desc *shader_desc)
bool ffp_hlsl_compile_vs(const struct wined3d_ffp_vs_settings *settings, struct wined3d_shader_desc *shader_desc, struct wined3d_device *device)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLenum GLenum GLenum input
GLsizeiptr const GLvoid GLenum usage
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
D3D11_SHADER_VARIABLE_DESC desc
static float(__cdecl *square_half_float)(float x
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
#define WINE_RB_ENTRY_VALUE
const struct wined3d_shader_frontend sm1_shader_frontend
const struct wined3d_shader_frontend sm4_shader_frontend
HRESULT wined3d_shader_extract_from_dxbc(struct wined3d_shader *shader, unsigned int max_shader_version, enum vkd3d_shader_source_type *source_type)
const struct wined3d_vertex_pipe_ops * vertex_pipe
const struct wined3d_fragment_pipe_ops * fragment_pipe
uint32_t full_ffp_varyings
struct wined3d_d3d_limits limits
uint32_t emulated_flatshading
uint32_t shader_output_interpolation
uint32_t srgb_write_control
const struct wined3d_parent_ops * parent_ops
const struct wined3d_format * format
const struct wined3d_shader_reg_maps * reg_maps
struct wined3d_shader_tex_mx * tex_mx
void(* shader_read_header)(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
BOOL(* shader_is_end)(void *data, const DWORD **ptr)
void *(* shader_init)(const DWORD *byte_code, size_t byte_code_size, const struct wined3d_shader_signature *output_signature)
void(* shader_free)(void *data)
void(* shader_read_instruction)(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins)
struct wined3d_shader_primitive_type primitive_type
struct wined3d_shader_tgsm_structured tgsm_structured
enum wined3d_tessellator_partitioning tessellator_partitioning
const struct wined3d_shader_src_param * src
union wined3d_shader_instruction::@348 declaration
struct wined3d_shader_semantic semantic
const struct wined3d_shader_dst_param * dst
const struct wined3d_shader_src_param * predicate
enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx
struct wined3d_shader_indexable_temp indexable_temp
struct wined3d_shader_structured_resource structured_resource
enum wined3d_tessellator_output_primitive tessellator_output_primitive
enum wined3d_tessellator_domain tessellator_domain
struct wined3d_shader_tgsm_raw tgsm_raw
const struct wined3d_shader_context * ctx
const struct wined3d_shader_immediate_constant_buffer * icb
struct wined3d_shader_thread_group_size thread_group_size
unsigned int instance_count
unsigned int temporary_count
UINT cb_sizes[WINED3D_MAX_CBS]
DWORD sampler_comparison_mode
struct wined3d_shader_version shader_version
DWORD input_rel_addressing
DWORD texcoord_mask[MAX_REG_TEXCRD]
union wined3d_shader_reg_maps::@346 u
struct wined3d_shader_tgsm * tgsm
const struct wined3d_shader_immediate_constant_buffer * icb
unsigned int min_rel_offset
unsigned int temporary_count
struct wined3d_shader_sampler_map sampler_map
unsigned int max_rel_offset
struct list indexable_temps
BYTE output_registers_mask[MAX_REG_OUTPUT]
uint32_t resource_map[WINED3D_BITMAP_SIZE(MAX_SHADER_RESOURCE_VIEWS)]
struct wined3d_shader_resource_info resource_info[MAX_SHADER_RESOURCE_VIEWS]
struct wined3d_shader_resource_info uav_resource_info[MAX_UNORDERED_ACCESS_VIEWS]
struct wined3d_shader_sampler_map_entry * entries
struct wined3d_shader_dst_param reg
unsigned int sample_count
enum wined3d_decl_usage usage
enum wined3d_data_type resource_data_type
enum wined3d_shader_resource_type resource_type
unsigned int register_idx
const char * semantic_name
unsigned int semantic_idx
unsigned int element_count
struct wined3d_shader_signature_element * elements
enum wined3d_shader_type type
union wined3d_shader::@358 u
const struct wined3d_parent_ops * parent_ops
struct wined3d_pixel_shader ps
const struct wined3d_shader_limits * limits
struct wined3d_shader_reg_maps reg_maps
struct wined3d_hull_shader hs
unsigned int element_count
const struct wined3d_stream_output_element * elements
unsigned int semantic_idx
const char * semantic_name
#define FIELD_OFFSET(t, f)
@ VKD3D_SHADER_COMPILE_OPTION_API_VERSION
VKD3D_SHADER_API void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code)
@ VKD3D_SHADER_SOURCE_D3D_BYTECODE
@ VKD3D_SHADER_SOURCE_DXBC_TPF
@ VKD3D_SHADER_LOG_WARNING
@ VKD3D_SHADER_STRUCTURE_TYPE_COMPILE_INFO
@ VKD3D_SHADER_VISIBILITY_DOMAIN
@ VKD3D_SHADER_VISIBILITY_COMPUTE
@ VKD3D_SHADER_VISIBILITY_PIXEL
@ VKD3D_SHADER_VISIBILITY_ALL
@ VKD3D_SHADER_VISIBILITY_GEOMETRY
@ VKD3D_SHADER_VISIBILITY_VERTEX
@ VKD3D_SHADER_VISIBILITY_HULL
@ VKD3D_SHADER_API_VERSION_1_6
VKD3D_SHADER_API int vkd3d_shader_compile(const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages)
@ VKD3D_SHADER_TARGET_D3D_ASM
VKD3D_SHADER_API void vkd3d_shader_free_messages(char *messages)
const struct wined3d_parent_ops wined3d_null_parent_ops
static unsigned int wined3d_log2i(unsigned int x)
@ WINED3D_DECL_USAGE_PSIZE
@ WINED3D_DECL_USAGE_POSITION
@ WINED3D_DECL_USAGE_COLOR
@ WINED3D_DECL_USAGE_POSITIONT
@ WINED3D_DECL_USAGE_TEXCOORD
@ WINED3D_RS_FOGTABLEMODE
@ WINED3D_RS_CLIPPLANEENABLE
@ WINED3D_RS_POINTSPRITEENABLE
@ WINED3D_RS_ALPHATESTENABLE
static int wined3d_bit_scan(unsigned int *x)
#define WINED3DUSAGE_LEGACY_CUBEMAP
@ WINED3D_RTYPE_TEXTURE_2D
@ WINED3D_RTYPE_TEXTURE_1D
@ WINED3D_RTYPE_TEXTURE_3D
#define WINED3D_VIEW_BUFFER_RAW
#define WINED3D_MAX_FRAGMENT_SAMPLERS
@ WINED3D_TSS_TEXCOORD_INDEX
@ WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
@ WINED3D_FEATURE_LEVEL_11
@ WINED3D_FEATURE_LEVEL_10_1
@ WINED3D_FEATURE_LEVEL_9_3
@ WINED3D_FEATURE_LEVEL_10
@ WINED3D_FEATURE_LEVEL_11_1
@ WINED3D_FEATURE_LEVEL_9_1
@ WINED3D_FEATURE_LEVEL_9_2
#define WINED3D_MAX_CLIP_DISTANCES
@ WINED3D_SHADER_TYPE_HULL
@ WINED3D_SHADER_TYPE_PIXEL
@ WINED3D_SHADER_TYPE_GEOMETRY
@ WINED3D_SHADER_TYPE_DOMAIN
@ WINED3D_SHADER_TYPE_COMPUTE
@ WINED3D_SHADER_TYPE_VERTEX
#define WINED3DERR_INVALIDCALL
#define WINED3D_MAX_FFP_TEXTURES
void WINAPI wined3d_mutex_unlock(void)
void WINAPI wined3d_mutex_lock(void)
#define WINED3DSP_WRITEMASK_ALL
#define WINED3DSP_WRITEMASK_0
wined3d_shader_interpolation_mode
@ WINED3DSIM_LINEAR_NOPERSPECTIVE_SAMPLE
WINED3D_SHADER_INSTRUCTION_HANDLER
@ WINED3DSIH_DCL_TESSELLATOR_PARTITIONING
@ WINED3DSIH_GATHER4_PO_C
@ WINED3DSIH_IMM_ATOMIC_XOR
@ WINED3DSIH_DCL_CONSTANT_BUFFER
@ WINED3DSIH_TEXM3x3VSPEC
@ WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER
@ WINED3DSIH_DCL_THREAD_GROUP
@ WINED3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE
@ WINED3DSIH_HS_CONTROL_POINT_PHASE
@ WINED3DSIH_LD_STRUCTURED
@ WINED3DSIH_IMM_ATOMIC_AND
@ WINED3DSIH_IMM_ATOMIC_CONSUME
@ WINED3DSIH_HS_FORK_PHASE
@ WINED3DSIH_DCL_VERTICES_OUT
@ WINED3DSIH_HS_JOIN_PHASE
@ WINED3DSIH_DCL_OUTPUT_TOPOLOGY
@ WINED3DSIH_DCL_GS_INSTANCES
@ WINED3DSIH_DCL_TGSM_RAW
@ WINED3DSIH_DCL_UAV_TYPED
@ WINED3DSIH_DCL_INPUT_PS
@ WINED3DSIH_LD_UAV_TYPED
@ WINED3DSIH_DCL_UAV_STRUCTURED
@ WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT
@ WINED3DSIH_DCL_GLOBAL_FLAGS
@ WINED3DSIH_IMM_ATOMIC_ALLOC
@ WINED3DSIH_DCL_TESSELLATOR_DOMAIN
@ WINED3DSIH_DCL_TGSM_STRUCTURED
@ WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT
@ WINED3DSIH_DCL_INDEXABLE_TEMP
@ WINED3DSIH_DCL_RESOURCE_RAW
@ WINED3DSIH_DCL_INPUT_PRIMITIVE
@ WINED3DSIH_DCL_HS_JOIN_PHASE_INSTANCE_COUNT
@ WINED3DSIH_DCL_RESOURCE_STRUCTURED
#define WINED3D_PSARGS_PROJECTED
#define WINED3DSI_SAMPLER_COMPARISON_MODE
#define WINED3D_FFP_TCI_SHIFT
#define WINED3D_PACKED_INTERPOLATION_BIT_COUNT
#define WINED3D_PSARGS_TEXTYPE_MASK
static BOOL use_vs(const struct wined3d_state *state)
#define WINED3D_FORMAT_CAP_SHADOW
#define WINED3D_PSARGS_TEXTRANSFORM_SHIFT
@ WINED3D_SV_CULL_DISTANCE
@ WINED3D_SV_CLIP_DISTANCE
@ WINED3D_SV_VIEWPORT_ARRAY_INDEX
@ WINED3D_SV_IS_FRONT_FACE
#define MAX_UNORDERED_ACCESS_VIEWS
#define WINED3D_FFP_TCI_MASK
wined3d_shader_resource_type
@ WINED3D_SHADER_RESOURCE_BUFFER
@ WINED3D_SHADER_RESOURCE_TEXTURE_3D
@ WINED3D_SHADER_RESOURCE_TEXTURE_2D
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DMS
@ WINED3D_SHADER_RESOURCE_TEXTURE_CUBE
@ WINED3D_SHADER_RESOURCE_TEXTURE_1D
#define WINED3D_SAMPLER_DEFAULT
static enum wined3d_cmp_func wined3d_sanitize_cmp_func(enum wined3d_cmp_func func)
static BOOL can_use_texture_swizzle(const struct wined3d_d3d_info *d3d_info, const struct wined3d_format *format)
static uint32_t wined3d_mask_from_size(unsigned int size)
#define WINED3D_SHADER_VERSION(major, minor)
static const char * wined3d_get_line(const char **ptr, const char *end)
static const struct color_fixup_desc COLOR_FIXUP_IDENTITY
static BOOL wined3d_bitmap_set(uint32_t *map, unsigned int idx)
static void wined3d_insert_bits(uint32_t *bitstream, unsigned int offset, unsigned int count, DWORD bits)
static BOOL is_identity_fixup(struct color_fixup_desc fixup)
@ WINED3DSPR_OUTCONTROLPOINT
#define WINED3D_PSARGS_TEXTYPE_SHIFT
#define WINED3DSP_NOSWIZZLE
static BOOL needs_srgb_write(const struct wined3d_d3d_info *d3d_info, const struct wined3d_state *state, const struct wined3d_fb_state *fb)
@ WINED3DSGF_FORCE_EARLY_DEPTH_STENCIL
@ WINED3D_SHADER_TEX_CUBE
@ WINED3D_FFP_PS_FOG_EXP2
@ WINED3D_FFP_PS_FOG_LINEAR
#define MAX_TGSM_REGISTERS
static unsigned int wined3d_popcount(unsigned int x)
static struct wined3d_texture * texture_from_resource(struct wined3d_resource *resource)
#define WINED3DSP_WRITEMASK_1