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",
153 "hs_control_point_phase",
169 "imm_atomic_cmp_exch",
170 "imm_atomic_consume",
347 return "UNRECOGNIZED";
386 e->semantic_idx =
s->usage_idx;
390 e->register_idx =
s->reg.reg.idx[0].offset;
391 e->mask =
s->reg.write_mask;
402 e->register_idx = reg_idx;
403 e->mask = write_mask;
417 WARN(
"Invalid byte code format %#x specified.\n",
format);
433 ERR(
"Failed to allocate shader buffer memory.\n");
449 unsigned int new_buffer_size =
buffer->buffer_size * 2;
451 while (rc > 0 && (
unsigned int)rc >= new_buffer_size -
buffer->content_size)
452 new_buffer_size *= 2;
455 ERR(
"Failed to grow buffer.\n");
459 buffer->buffer = new_buffer;
460 buffer->buffer_size = new_buffer_size;
471 if (rc < 0 || (
unsigned int)rc >= rem )
474 buffer->content_size += rc;
504 ERR(
"Couldn't allocate buffer for temporary string.\n");
571 switch (register_type)
578 FIXME(
"Unsupported register type: %u.\n", register_type);
594 static const struct limits_entry
597 unsigned int max_version;
603 {
WINED3D_SHADER_VERSION(1, 0),
WINED3D_SHADER_VERSION(1, 1), { 0, 0, 256, 0, 12, 0}},
604 {
WINED3D_SHADER_VERSION(2, 0),
WINED3D_SHADER_VERSION(2, 1), { 0, 16, 256, 16, 12, 0}},
610 {
WINED3D_SHADER_VERSION(3, 0),
WINED3D_SHADER_VERSION(3, 0), { 4, 16, 256, 16, 12, 0}},
611 {
WINED3D_SHADER_VERSION(4, 0),
WINED3D_SHADER_VERSION(4, 0), {16, 0, 0, 0, 16, 0}},
612 {
WINED3D_SHADER_VERSION(4, 1),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 0}},
618 {
WINED3D_SHADER_VERSION(5, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 32}},
623 {
WINED3D_SHADER_VERSION(5, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 32}},
628 {
WINED3D_SHADER_VERSION(4, 0),
WINED3D_SHADER_VERSION(4, 0), {16, 0, 0, 0, 32, 16}},
629 {
WINED3D_SHADER_VERSION(4, 1),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 32, 32}},
635 {
WINED3D_SHADER_VERSION(1, 0),
WINED3D_SHADER_VERSION(1, 3), { 4, 0, 8, 0, 0, 0}},
636 {
WINED3D_SHADER_VERSION(1, 4),
WINED3D_SHADER_VERSION(1, 4), { 6, 0, 8, 0, 0, 0}},
637 {
WINED3D_SHADER_VERSION(2, 0),
WINED3D_SHADER_VERSION(2, 0), {16, 0, 32, 0, 0, 0}},
638 {
WINED3D_SHADER_VERSION(2, 1),
WINED3D_SHADER_VERSION(2, 1), {16, 16, 32, 16, 0, 0}},
639 {
WINED3D_SHADER_VERSION(3, 0),
WINED3D_SHADER_VERSION(3, 0), {16, 16, 224, 16, 0, 10}},
640 {
WINED3D_SHADER_VERSION(4, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 0, 32}},
646 {
WINED3D_SHADER_VERSION(5, 0),
WINED3D_SHADER_VERSION(5, 0), {16, 0, 0, 0, 0, 0}},
648 const struct limits_entry *limits_array;
650 shader->reg_maps.shader_version.minor);
653 switch (
shader->reg_maps.shader_version.type)
656 FIXME(
"Unexpected shader type %u found.\n",
shader->reg_maps.shader_version.type);
659 limits_array = vs_limits;
662 limits_array = hs_limits;
665 limits_array = ds_limits;
668 limits_array = gs_limits;
671 limits_array = ps_limits;
674 limits_array = cs_limits;
680 if (shader_version <= limits_array[
i].max_version)
682 shader->limits = &limits_array[
i].limits;
689 FIXME(
"Unexpected shader version \"%u.%u\".\n",
690 shader->reg_maps.shader_version.major,
691 shader->reg_maps.shader_version.minor);
692 shader->limits = &limits_array[
max(0,
i - 1)].limits;
705 reg_maps->
address |= 1u <<
reg->idx[0].offset;
713 if (
reg->idx[0].rel_addr)
721 if (
reg->idx[0].rel_addr)
722 shader->u.ps.input_reg_used = ~0
u;
724 shader->u.ps.input_reg_used |= 1u <<
reg->idx[0].offset;
733 if (
reg->idx[0].offset == 1)
735 if (
reg->idx[0].offset == 2)
742 if (!
reg->idx[0].offset)
744 else if (
reg->idx[0].offset == 1)
750 if (
reg->idx[0].rel_addr)
760 if (
reg->idx[0].offset >=
min(
shader->limits->constant_float, constf_size))
762 WARN(
"Shader using float constant %u which is not supported.\n",
reg->idx[0].offset);
773 if (
reg->idx[0].offset >=
shader->limits->constant_int)
775 WARN(
"Shader using integer constant %u which is not supported.\n",
reg->idx[0].offset);
785 if (
reg->idx[0].offset >=
shader->limits->constant_bool)
787 WARN(
"Shader using bool constant %u which is not supported.\n",
reg->idx[0].offset);
797 reg_maps->
rt_mask |= (1u <<
reg->idx[0].offset);
805 TRACE(
"Not recording register of type %#x and [%#x][%#x].\n",
806 reg->type,
reg->idx[0].offset,
reg->idx[1].offset);
813 unsigned int resource_idx,
unsigned int sampler_idx,
unsigned int bind_idx)
823 if (
entries[
i].resource_idx == resource_idx &&
entries[
i].sampler_idx == sampler_idx)
831 ERR(
"Failed to allocate sampler map entries.\n");
844 ERR(
"Failed to resize sampler map entries.\n");
852 entry->resource_idx = resource_idx;
853 entry->sampler_idx = sampler_idx;
854 entry->bind_idx = bind_idx;
863 return param == 1 ? 3 : 0;
867 return param == 1 ? 2 : 0;
870 return param == 1 ? 1 : 0;
878 unsigned int register_idx,
unsigned int size,
unsigned int stride)
884 ERR(
"Invalid TGSM register index %u.\n", register_idx);
889 FIXME(
"TGSM declarations are allowed only in compute shaders.\n");
894 register_idx + 1,
sizeof(*reg_maps->
tgsm)))
898 tgsm = ®_maps->
tgsm[register_idx];
906 const DWORD *current_instruction_ptr,
const DWORD *previous_instruction_ptr)
910 if ((phase = *current_phase))
912 phase->
end = previous_instruction_ptr;
913 *current_phase =
NULL;
918 ERR(
"Unexpected shader type %#x.\n",
shader->reg_maps.shader_version.type);
925 if (
shader->u.hs.phases.control_point)
927 FIXME(
"Multiple control point phases.\n");
930 if (!(
shader->u.hs.phases.control_point = heap_alloc_zero(
sizeof(*
shader->u.hs.phases.control_point))))
932 phase =
shader->u.hs.phases.control_point;
936 &
shader->u.hs.phases.fork_size,
shader->u.hs.phases.fork_count + 1,
937 sizeof(*
shader->u.hs.phases.fork)))
939 phase = &
shader->u.hs.phases.fork[
shader->u.hs.phases.fork_count++];
943 &
shader->u.hs.phases.join_size,
shader->u.hs.phases.join_count + 1,
944 sizeof(*
shader->u.hs.phases.join)))
946 phase = &
shader->u.hs.phases.join[
shader->u.hs.phases.join_count++];
953 phase->
start = current_instruction_ptr;
954 *current_phase = phase;
968 WARN(
"Invalid clip/cull distance index %u.\n",
e->semantic_idx);
980 FIXME(
"Unexpected interpolation mode %#x.\n",
mode);
993 unsigned int cur_loop_depth = 0, max_loop_depth = 0;
996 const DWORD *
ptr, *prev_ins, *current_ins;
997 void *fe_data =
shader->frontend_data;
1001 memset(reg_maps, 0,
sizeof(*reg_maps));
1002 memset(input_signature_elements, 0,
sizeof(input_signature_elements));
1003 memset(output_signature_elements, 0,
sizeof(output_signature_elements));
1008 prev_ins = current_ins =
ptr;
1014 sizeof(*reg_maps->
constf))))
1016 ERR(
"Failed to allocate constant map memory.\n");
1031 WARN(
"Encountered unrecognised or invalid instruction.\n");
1040 unsigned int reg_idx = semantic->
reg.reg.idx[0].offset;
1042 switch (semantic->
reg.reg.type)
1048 ERR(
"Invalid input register index %u.\n", reg_idx);
1062 ERR(
"Invalid output register index %u.\n", reg_idx);
1078 ERR(
"Invalid resource index %u.\n", reg_idx);
1088 ERR(
"Invalid UAV resource index %u.\n", reg_idx);
1094 FIXME(
"Ignoring typed UAV flags %#x.\n", ins.
flags);
1098 TRACE(
"Not recording DCL register type %#x.\n", semantic->
reg.reg.type);
1106 ERR(
"Invalid CB index %u.\n",
reg->idx[0].offset);
1115 shader->u.ps.force_early_depth_stencil =
TRUE;
1117 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1122 WARN(
"Ignoring global flags %#x.\n", ins.
flags);
1130 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1139 FIXME(
"Instruction %s outside of shader phase.\n",
1145 FIXME(
"Multiple immediate constant buffers.\n");
1152 FIXME(
"Indexable temporary registers not supported.\n");
1170 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1178 ERR(
"Invalid register index %u.\n", reg_idx);
1184 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1196 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1212 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1220 ERR(
"Invalid resource index %u.\n", reg_idx);
1232 ERR(
"Invalid resource index %u.\n", reg_idx);
1295 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1304 ERR(
"Invalid UAV resource index %u.\n", reg_idx);
1308 FIXME(
"Ignoring raw UAV flags %#x.\n", ins.
flags);
1318 ERR(
"Invalid UAV resource index %u.\n", reg_idx);
1322 FIXME(
"Ignoring structured UAV flags %#x.\n", ins.
flags);
1333 FIXME(
"Invalid instruction %#x for shader type %#x.\n",
1344 lconst->
idx = ins.
dst[0].reg.idx[0].offset;
1376 lconst->
idx = ins.
dst[0].reg.idx[0].offset;
1389 lconst->
idx = ins.
dst[0].reg.idx[0].offset;
1406 reg_maps->
labels |= 1u << ins.
src[0].reg.idx[0].offset;
1423 shader_version.
type, constf_size))
1430 switch (ins.
dst[
i].reg.type)
1433 if (shader_version.
major >= 3)
1458 if (shader_version.
major >= 3)
1465 output_signature_elements[
idx].
mask |= ins.
dst[
i].write_mask;
1477 if (shader_version.
major >= 3)
1481 WARN(
"Invalid output register index %u.\n",
idx);
1489 WARN(
"Invalid texcoord index %u.\n",
idx);
1495 output_signature_elements[
idx].
mask |= ins.
dst[
i].write_mask;
1533 && ins.
dst[
i].reg.idx[0].offset ==
shader->u.ps.color0_reg)
1540 if (shader_version.
major == 1
1553 unsigned int reg_idx = ins.
dst[
i].reg.idx[0].offset;
1557 WARN(
"Invalid 1.x sampler index %u.\n", reg_idx);
1561 TRACE(
"Setting fake 2D resource for 1.x pixelshader.\n");
1570 reg_maps->
bumpmat |= 1u << reg_idx;
1579 reg_maps->
bumpmat |= 1u << ins.
dst[
i].reg.idx[0].offset;
1585 unsigned int reg_idx = ins.
src[0].reg.idx[0].offset;
1588 ERR(
"Invalid UAV index %u.\n", reg_idx);
1600 unsigned int reg_idx;
1602 reg_idx = ins.
src[1].reg.idx[0].offset;
1604 reg_idx = ins.
src[2].reg.idx[0].offset;
1606 reg_idx = ins.
dst[0].reg.idx[0].offset;
1608 reg_idx = ins.
src[0].reg.idx[0].offset;
1610 reg_idx = ins.
dst[1].reg.idx[0].offset;
1613 ERR(
"Invalid UAV index %u.\n", reg_idx);
1644 if (cur_loop_depth > max_loop_depth)
1645 max_loop_depth = cur_loop_depth;
1692 shader_version.
type, constf_size))
1701 shader_version.
type, constf_size))
1705 ++
reg.idx[0].offset;
1707 shader_version.
type, constf_size))
1718 shader->u.ps.color0_reg = ins.
src[
i].reg.idx[0].offset;
1724 prev_ins = current_ins;
1730 phase->
end = prev_ins;
1737 reg_maps->
rt_mask |= (1u << 0);
1747 WARN(
"Invalid input signature register index %u.\n", input_signature->
elements[
i].register_idx);
1777 *
e++ = input_signature_elements[
i];
1817 *
e++ = output_signature_elements[
i];
1842 map &= reg_maps->
shader_version.major < 3 ? ~reg_maps->texcoord : ~reg_maps->input_registers;
1852 global_flags &= ~WINED3DSGF_REFACTORING_ALLOWED;
1860 global_flags &= ~WINED3DSGF_FORCE_EARLY_DEPTH_STENCIL;
1868 global_flags &= ~WINED3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS;
1880 sync_flags &= ~WINED3DSSF_GROUP_SHARED_MEMORY;
1885 sync_flags &= ~WINED3DSSF_THREAD_GROUP;
1897 uav_flags &= ~WINED3DSUF_GLOBALLY_COHERENT;
1902 uav_flags &= ~WINED3DSUF_ORDER_PRESERVING_COUNTER;
1932 switch (output_primitive)
1955 switch (partitioning)
2108 switch (semantic->
usage)
2171 FIXME(
"Unrecognised semantic usage %#x.\n", semantic->
usage);
2179 static const char *
const rastout_reg_names[] = {
"oPos",
"oFog",
"oPts"};
2180 static const char *
const misctype_reg_names[] = {
"vPos",
"vFace"};
2232 if (shader_version->
major >= 3)
2261 FIXME(
"Unhandled misctype register %u.\n",
offset);
2386 switch (
reg->immconst_type)
2389 switch (
reg->data_type)
2409 switch (
reg->data_type)
2413 *(
const float *)&
reg->u.immconst_data[0], *(
const float *)&
reg->u.immconst_data[1],
2414 *(
const float *)&
reg->u.immconst_data[2], *(
const float *)&
reg->u.immconst_data[3]);
2418 reg->u.immconst_data[0],
reg->u.immconst_data[1],
2419 reg->u.immconst_data[2],
reg->u.immconst_data[3]);
2425 reg->u.immconst_data[0],
reg->u.immconst_data[1],
2426 reg->u.immconst_data[2],
reg->u.immconst_data[3]);
2447 if (
reg->idx[0].rel_addr)
2454 if (
reg->idx[1].offset != ~0
u)
2457 if (
reg->idx[1].rel_addr)
2480 static const char write_mask_chars[] =
"xyzw";
2516 switch (src_modifier)
2537 static const char swizzle_chars[] =
"xyzw";
2543 if (swizzle_x == swizzle_y
2544 && swizzle_x == swizzle_z
2545 && swizzle_x == swizzle_w)
2552 swizzle_chars[swizzle_z], swizzle_chars[swizzle_w]);
2564 void *fe_data =
shader->frontend_data;
2574 state.current_loop_depth = 0;
2575 state.current_loop_reg = 0;
2579 ctx.gl_info = &
device->adapter->gl_info;
2584 ctx.backend_data = backend_ctx;
2599 WARN(
"Encountered unrecognised or invalid instruction.\n");
2604 FIXME(
"Predicates not implemented.\n");
2607 device->shader_backend->shader_handle_instruction(&ins);
2635 if (mmask)
FIXME(
"Unrecognised modifier %#x.\n", mmask);
2641 switch (primitive_type->
type)
2688 switch (interpolation_mode)
2721 const char *type_prefix;
2728 ERR(
"Failed to initialize string buffer.\n");
2736 switch (shader_version.
type)
2763 FIXME(
"Unhandled shader type %#x.\n", shader_version.
type);
2764 type_prefix =
"unknown";
2777 WARN(
"Skipping unrecognized instruction.\n");
2967 ins.
dst[0].reg.idx[0].offset),
2968 *(
const float *)&ins.
src[0].reg.u.immconst_data[0],
2969 *(
const float *)&ins.
src[0].reg.u.immconst_data[1],
2970 *(
const float *)&ins.
src[0].reg.u.immconst_data[2],
2971 *(
const float *)&ins.
src[0].reg.u.immconst_data[3]);
2976 ins.
src[0].reg.u.immconst_data[0],
2977 ins.
src[0].reg.u.immconst_data[1],
2978 ins.
src[0].reg.u.immconst_data[2],
2979 ins.
src[0].reg.u.immconst_data[3]);
2984 ins.
dst[0].reg.idx[0].offset, ins.
src[0].reg.u.immconst_data[0] ?
"true" :
"false");
3029 && shader_version.
major >= 2
3105 shader->device->shader_backend->shader_destroy(
shader);
3168 void *vertex_priv, *fragment_priv;
3176 ERR(
"Failed to initialize vertex pipe.\n");
3183 ERR(
"Failed to initialize fragment pipe.\n");
3194 device->vertex_priv = vertex_priv;
3195 device->fragment_priv = fragment_priv;
3196 device->shader_priv = priv;
3272 unsigned int backend_version;
3275 TRACE(
"shader %p, float_const_count %u, type %#x, max_version %u.\n",
3276 shader, float_const_count,
type, max_version);
3282 FIXME(
"Failed to initialize frontend.\n");
3292 &
shader->output_signature, float_const_count)))
3302 WARN(
"Shader version %d not supported by this D3D API version.\n", reg_maps->
shader_version.major);
3308 backend_version = d3d_info->
limits.vs_version;
3311 backend_version = d3d_info->
limits.hs_version;
3314 backend_version = d3d_info->
limits.ds_version;
3317 backend_version = d3d_info->
limits.gs_version;
3320 backend_version = d3d_info->
limits.ps_version;
3323 backend_version = d3d_info->
limits.cs_version;
3326 FIXME(
"No backend version-checking for this shader type.\n");
3327 backend_version = 0;
3331 WARN(
"Shader version %d.%d not supported by your GPU with the current shader backend.\n",
3343 TRACE(
"%p increasing refcount to %u.\n",
shader, refcount);
3368 TRACE(
"%p decreasing refcount to %u.\n",
shader, refcount);
3372 shader->parent_ops->wined3d_object_destroyed(
shader->parent);
3387 void *byte_code,
UINT *byte_code_size)
3389 TRACE(
"shader %p, byte_code %p, byte_code_size %p.\n",
shader, byte_code, byte_code_size);
3393 *byte_code_size =
shader->functionLength;
3397 if (*byte_code_size < shader->functionLength)
3417 TRACE(
"shader %p, start_idx %u, src_data %p, count %u.\n",
shader, start_idx, src_data,
count);
3419 if (end_idx >
shader->limits->constant_float)
3421 WARN(
"end_idx %u > float constants limit %u.\n",
3422 end_idx,
shader->limits->constant_float);
3423 end_idx =
shader->limits->constant_float;
3426 for (
i = start_idx;
i < end_idx; ++
i)
3453 || !pixel_shader || pixel_shader->
reg_maps.shader_version.major < 4)
3455 memset(interpolation_args, 0,
sizeof(pixel_shader->
u.
ps.interpolation_mode));
3459 memcpy(interpolation_args, pixel_shader->
u.
ps.interpolation_mode,
3460 sizeof(pixel_shader->
u.
ps.interpolation_mode));
3477 args->per_vertex_point_size =
shader->reg_maps.point_size;
3480 if (
shader->reg_maps.shader_version.major >= 4)
3481 args->next_shader_input_count = hull_shader ? hull_shader->
limits->packed_input
3482 : geometry_shader ? geometry_shader->
limits->packed_input
3483 : pixel_shader ? pixel_shader->
limits->packed_input : 0;
3485 args->next_shader_input_count = 0;
3486 args->swizzle_map = swizzle_map;
3490 args->flatshading = 0;
3498 if (usage_idx1 != usage_idx2)
3500 if (usage1 == usage2)
3511 BYTE usage_req,
BYTE usage_idx_req,
unsigned int *regnum)
3518 if (!(
map & 1))
continue;
3521 shader->u.vs.attributes[
i].usage_idx, usage_req, usage_idx_req))
3557 if (!
src->element_count)
3560 ptr = *signature_strings;
3562 dst->element_count =
src->element_count;
3566 for (
i = 0;
i <
src->element_count; ++
i)
3568 e = &
src->elements[
i];
3569 dst->elements[
i] = *
e;
3573 dst->elements[
i].semantic_name =
ptr;
3577 *signature_strings =
ptr;
3586 size_t byte_code_size;
3591 TRACE(
"byte_code %p, byte_code_size %#lx, format %#x, max_version %#x.\n",
3592 desc->byte_code, (
long)
desc->byte_code_size,
desc->format,
desc->max_version);
3594 if (!
desc->byte_code)
3599 FIXME(
"Unable to find frontend for shader.\n");
3606 shader->parent_ops = parent_ops;
3646 byte_code_size =
desc->byte_code_size;
3647 if (byte_code_size == ~(
size_t)0)
3657 WARN(
"Failed to initialise frontend data.\n");
3668 byte_code_size = (
ptr -
desc->byte_code) *
sizeof(*
ptr);
3677 shader->functionLength = byte_code_size;
3681 WARN(
"Failed to set function, hr %#x.\n",
hr);
3686 shader->load_local_constsF =
shader->lconst_inf_or_nan;
3704 for (
i = 0;
i <
shader->input_signature.element_count; ++
i)
3711 shader->u.vs.attributes[
input->register_idx].usage =
3713 shader->u.vs.attributes[
input->register_idx].usage_idx =
input->semantic_idx;
3740 shader->u.gs.so_desc = *so_desc;
3756 args->tessellator_output_primitive = hull_shader->
u.
hs.tessellator_output_primitive;
3757 args->tessellator_partitioning = hull_shader->
u.
hs.tessellator_partitioning;
3759 args->output_count = geometry_shader ? geometry_shader->
limits->packed_input
3760 : pixel_shader ? pixel_shader->
limits->packed_input :
shader->limits->packed_output;
3763 args->render_offscreen =
context->render_offscreen;
3777 args->output_count = pixel_shader ? pixel_shader->
limits->packed_input :
shader->limits->packed_output;
3793 static unsigned int warned = 0;
3795 args->srgb_correction = 1;
3797 WARN(
"Blending into a sRGB render target with no GL_ARB_framebuffer_sRGB "
3798 "support, expect rendering artifacts.\n");
3801 if (
shader->reg_maps.shader_version.major == 1
3802 &&
shader->reg_maps.shader_version.minor <= 3)
3804 for (
i = 0;
i <
shader->limits->sampler; ++
i)
3810 DWORD tex_transform =
flags & ~WINED3D_TTFF_PROJECTED;
3819 for (
j = 0;
j <
state->vertex_declaration->element_count; ++
j)
3822 &
state->vertex_declaration->elements[
j];
3827 max_valid =
element->format->component_count;
3831 if (!tex_transform || tex_transform > max_valid)
3833 WARN(
"Fixing up projected texture transform flags from %#x to %#x.\n",
3834 tex_transform, max_valid);
3835 tex_transform = max_valid;
3845 WARN(
"Application requested projected texture with unsuitable texture coordinates.\n");
3846 WARN(
"(texture unit %u, transform flags %#x, sampler type %u).\n",
3847 i, tex_transform, resource_type);
3857 if (
shader->reg_maps.shader_version.major == 1
3858 &&
shader->reg_maps.shader_version.minor <= 4)
3860 for (
i = 0;
i <
shader->limits->sampler; ++
i)
3864 if (!
shader->reg_maps.resource_info[
i].type)
3891 if (
shader->reg_maps.shader_version.major >= 4)
3897 args->np2_fixup = 0;
3903 if (!
shader->reg_maps.resource_info[
i].type)
3915 args->color_fixup[
i] =
texture->resource.format->color_fixup;
3918 args->shadow |= 1u <<
i;
3922 args->np2_fixup |= (1u <<
i);
3926 if (
shader->reg_maps.shader_version.major >= 3)
3928 if (position_transformed)
3974 args->texcoords_initialized = 0;
3980 args->texcoords_initialized |= 1u <<
i;
3990 args->texcoords_initialized |= 1u <<
i;
4013 ?
context->render_offscreen : 0;
4022 unsigned int i, highest_reg_used = 0, num_regs_used = 0;
4031 if (
shader->u.ps.input_reg_used & (1u <<
i))
4034 highest_reg_used =
i;
4040 if (highest_reg_used < (gl_info->
limits.glsl_varyings / 4)
4041 || num_regs_used > (gl_info->
limits.glsl_varyings / 4)
4042 ||
shader->reg_maps.shader_version.major >= 4)
4044 if (num_regs_used > (gl_info->
limits.glsl_varyings / 4))
4049 WARN(
"More varying registers used than supported\n");
4057 shader->u.ps.declared_in_count = highest_reg_used + 1;
4061 shader->u.ps.declared_in_count = 0;
4064 if (
shader->u.ps.input_reg_used & (1u <<
i))
4065 shader->u.ps.input_reg_map[
i] =
shader->u.ps.declared_in_count++;
4066 else shader->u.ps.input_reg_map[
i] = ~0
U;
4081 for (
i = 0;
i <
shader->limits->sampler; ++
i)
4084 if (!resource_info[
i].
type)
4110 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
4113 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
4118 WARN(
"Failed to initialize compute shader, hr %#x.\n",
hr);
4123 TRACE(
"Created compute shader %p.\n",
object);
4135 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
4138 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
4143 WARN(
"Failed to initialize domain shader, hr %#x.\n",
hr);
4148 TRACE(
"Created domain shader %p.\n",
object);
4161 TRACE(
"device %p, desc %p, so_desc %p, parent %p, parent_ops %p, shader %p.\n",
4164 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
4169 WARN(
"Failed to initialize geometry shader, hr %#x.\n",
hr);
4174 TRACE(
"Created geometry shader %p.\n",
object);
4186 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
4189 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
4194 WARN(
"Failed to initialize hull shader, hr %#x.\n",
hr);
4199 TRACE(
"Created hull shader %p.\n",
object);
4211 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
4214 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
4219 WARN(
"Failed to initialize pixel shader, hr %#x.\n",
hr);
4224 TRACE(
"Created pixel shader %p.\n",
object);
4236 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
4239 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
4244 WARN(
"Failed to initialize vertex shader, hr %#x.\n",
hr);
4249 TRACE(
"Created vertex shader %p.\n",
object);
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#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)
static void shader_dump_tessellator_output_primitive(struct wined3d_string_buffer *buffer, enum wined3d_tessellator_output_primitive output_primitive)
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_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 init_interpolation_compile_args(DWORD *interpolation_args, const struct wined3d_shader *pixel_shader, const struct wined3d_gl_info *gl_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 shader_dump_sync_flags(struct wined3d_string_buffer *buffer, DWORD sync_flags)
static const struct @292 shader_input_sysval_semantic_names[]
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)
static void shader_dump_ins_modifiers(struct wined3d_string_buffer *buffer, const struct wined3d_shader_dst_param *dst)
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)
const struct wined3d_shader_backend_ops none_shader_backend
void find_vs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, WORD swizzle_map, struct vs_compile_args *args, const struct wined3d_context *context)
static BOOL shader_none_has_ffp_proj_control(void *shader_priv)
const float wined3d_srgb_const0[]
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 HRESULT shader_signature_calculate_strings_length(const struct wined3d_shader_signature *signature, SIZE_T *total)
static void shader_none_precompile(void *shader_priv, struct wined3d_shader *shader)
static HRESULT shader_init(struct wined3d_shader *shader, struct wined3d_device *device, const struct wined3d_shader_desc *desc, DWORD float_const_count, enum wined3d_shader_type type, void *parent, const struct wined3d_parent_ops *parent_ops)
static void shader_dump_decl_usage(struct wined3d_string_buffer *buffer, const struct wined3d_shader_semantic *semantic, unsigned int flags, const struct wined3d_shader_version *shader_version)
static const char *const shader_opcode_names[]
static HRESULT shader_signature_copy(struct wined3d_shader_signature *dst, const struct wined3d_shader_signature *src, char **signature_strings)
static const struct wined3d_shader_frontend * shader_select_frontend(enum wined3d_shader_byte_code_format format)
static void shader_delete_constant_list(struct list *clist)
HRESULT CDECL wined3d_shader_get_byte_code(const struct wined3d_shader *shader, void *byte_code, UINT *byte_code_size)
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)
void string_buffer_free(struct wined3d_string_buffer *buffer)
static unsigned int get_instr_extra_regcount(enum WINED3D_SHADER_INSTRUCTION_HANDLER instr, unsigned int param)
static void shader_dump_uav_flags(struct wined3d_string_buffer *buffer, DWORD uav_flags)
static void shader_dump_global_flags(struct wined3d_string_buffer *buffer, DWORD global_flags)
ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
static void shader_none_load_constants(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state)
static const char *const semantic_names[]
enum wined3d_shader_input_sysval_semantic sysval_semantic
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 HRESULT shader_none_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, const struct fragment_pipeline *fragment_pipe)
static HRESULT shader_set_function(struct wined3d_shader *shader, DWORD float_const_count, enum wined3d_shader_type type, unsigned int max_version)
static int string_buffer_vsprintf(struct wined3d_string_buffer *buffer, const char *format, va_list args)
static void shader_dump_dst_param(struct wined3d_string_buffer *buffer, const struct wined3d_shader_dst_param *param, const struct wined3d_shader_version *shader_version)
BOOL string_buffer_init(struct wined3d_string_buffer *buffer)
static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const struct wined3d_shader_frontend *fe, struct wined3d_shader_reg_maps *reg_maps, struct wined3d_shader_signature *input_signature, struct wined3d_shader_signature *output_signature, DWORD constf_size)
static void shader_dump_tessellator_partitioning(struct wined3d_string_buffer *buffer, enum wined3d_tessellator_partitioning partitioning)
int shader_addline(struct wined3d_string_buffer *buffer, const char *format,...)
static void shader_none_handle_instruction(const struct wined3d_shader_instruction *ins)
static void shader_none_select_compute(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state)
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)
static void shader_none_select(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state)
BOOL vshader_get_input(const struct wined3d_shader *shader, BYTE usage_req, BYTE usage_idx_req, unsigned int *regnum)
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)
void pixelshader_update_resource_types(struct wined3d_shader *shader, WORD tex_types)
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)
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 unsigned int shader_get_float_offset(enum wined3d_shader_register_type register_type, UINT register_idx)
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 void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe_data)
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 void shader_dump_shader_input_sysval_semantic(struct wined3d_string_buffer *buffer, enum wined3d_shader_input_sysval_semantic semantic)
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_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps)
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 void shader_dump_interpolation_mode(struct wined3d_string_buffer *buffer, enum wined3d_shader_interpolation_mode interpolation_mode)
static enum wined3d_decl_usage shader_usage_from_semantic_name(const char *name)
static void shader_dump_src_param(struct wined3d_string_buffer *buffer, const struct wined3d_shader_src_param *param, const struct wined3d_shader_version *shader_version)
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 void shader_dump_register(struct wined3d_string_buffer *buffer, const struct wined3d_shader_register *reg, const struct wined3d_shader_version *shader_version)
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_none_free(struct wined3d_device *device)
static void shader_dump_primitive_type(struct wined3d_string_buffer *buffer, const struct wined3d_shader_primitive_type *primitive_type)
const float wined3d_srgb_const1[]
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 wined3d_insert_interpolation_mode(DWORD *packed_interpolation_mode, unsigned int register_idx, enum wined3d_shader_interpolation_mode mode)
static void shader_cleanup(struct wined3d_shader *shader)
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)
static void wined3d_shader_destroy_object(void *object)
static void wined3d_shader_init_object(void *object)
static void shader_dump_tessellator_domain(struct wined3d_string_buffer *buffer, enum wined3d_tessellator_domain domain)
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)
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
unsigned int wined3d_max_compat_varyings(const struct wined3d_gl_info *gl_info)
const char * wine_dbg_sprintf(const char *format,...)
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble GLdouble q
#define GL_TEXTURE_CUBE_MAP_ARB
#define GL_TEXTURE_RECTANGLE_ARB
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)
static const WCHAR desc[]
static float(__cdecl *square_half_float)(float x
static void * heap_calloc(SIZE_T count, SIZE_T size)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
const struct wined3d_shader_frontend sm1_shader_frontend
const struct wined3d_shader_frontend sm4_shader_frontend
const struct fragment_pipeline * fragment_pipe
const struct wined3d_vertex_pipe_ops * vertex_pipe
BOOL emulated_flatshading
struct wined3d_d3d_limits limits
BOOL supported[WINED3D_GL_EXT_COUNT]
struct wined3d_gl_limits limits
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
struct wined3d_shader_semantic semantic
const struct wined3d_shader_dst_param * dst
struct wined3d_shader_function_table_pointer fp
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
struct wined3d_shader_index_range index_range
float max_tessellation_factor
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_texel_offset texel_offset
struct wined3d_shader_thread_group_size thread_group_size
union wined3d_shader_instruction::@296 declaration
struct wined3d_shader_register_semantic register_semantic
unsigned int instance_count
unsigned int temporary_count
enum wined3d_primitive_type type
unsigned int patch_vertex_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::@294 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]
struct wined3d_shader_resource_info resource_info[MAX_SHADER_RESOURCE_VIEWS]
struct wined3d_shader_resource_info uav_resource_info[MAX_UNORDERED_ACCESS_VIEWS]
enum wined3d_shader_resource_type type
struct wined3d_shader_sampler_map_entry * entries
struct wined3d_shader_dst_param reg
enum wined3d_decl_usage usage
enum wined3d_data_type resource_data_type
enum wined3d_shader_resource_type resource_type
unsigned int register_idx
struct wined3d_shader_signature_element * elements
enum wined3d_shader_type type
union wined3d_shader::@304 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
struct wined3d_stream_output_element * elements
unsigned int element_count
static unsigned int wined3d_log2i(unsigned int x)
@ WINED3D_DECL_USAGE_DEPTH
@ WINED3D_DECL_USAGE_BLEND_INDICES
@ WINED3D_DECL_USAGE_TESS_FACTOR
@ WINED3D_DECL_USAGE_NORMAL
@ WINED3D_DECL_USAGE_PSIZE
@ WINED3D_DECL_USAGE_BLEND_WEIGHT
@ WINED3D_DECL_USAGE_SAMPLE
@ WINED3D_DECL_USAGE_POSITION
@ WINED3D_DECL_USAGE_BINORMAL
@ WINED3D_DECL_USAGE_COLOR
@ WINED3D_DECL_USAGE_POSITIONT
@ WINED3D_DECL_USAGE_TEXCOORD
@ WINED3D_DECL_USAGE_TANGENT
@ WINED3D_RS_ALPHABLENDENABLE
@ WINED3D_RS_FOGTABLEMODE
@ WINED3D_RS_CLIPPLANEENABLE
@ WINED3D_RS_POINTSPRITEENABLE
@ WINED3D_RS_FOGVERTEXMODE
@ WINED3D_RS_ALPHATESTENABLE
@ WINED3D_PT_LINESTRIP_ADJ
@ WINED3D_PT_TRIANGLELIST_ADJ
@ WINED3D_PT_LINELIST_ADJ
@ WINED3D_PT_TRIANGLESTRIP_ADJ
@ WINED3D_PT_TRIANGLESTRIP
@ WINED3D_PT_TRIANGLELIST
@ WINED3D_SV_CULL_DISTANCE
@ WINED3D_SV_CLIP_DISTANCE
@ WINED3D_SV_IS_FRONT_FACE
#define WINED3D_VIEW_BUFFER_RAW
@ WINED3D_TSS_TEXCOORD_INDEX
@ WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
wined3d_shader_byte_code_format
@ WINED3D_SHADER_BYTE_CODE_FORMAT_SM1
@ WINED3D_SHADER_BYTE_CODE_FORMAT_SM4
#define WINED3DERR_INVALIDCALL
@ ARB_FRAGMENT_COORD_CONVENTIONS
@ WINED3D_GL_LEGACY_CONTEXT
static BOOL needs_interpolation_qualifiers_for_shader_outputs(const struct wined3d_gl_info *gl_info)
#define WINED3DSP_WRITEMASK_ALL
#define WINED3DSP_WRITEMASK_0
@ WINED3D_SHADER_REL_OP_GT
@ WINED3D_SHADER_REL_OP_LE
@ WINED3D_SHADER_REL_OP_GE
@ WINED3D_SHADER_REL_OP_EQ
@ WINED3D_SHADER_REL_OP_LT
@ WINED3D_SHADER_REL_OP_NE
#define MAX_FRAGMENT_SAMPLERS
wined3d_shader_interpolation_mode
@ WINED3DSIM_LINEAR_CENTROID
@ WINED3DSIM_LINEAR_NOPERSPECTIVE_SAMPLE
@ WINED3DSIM_LINEAR_NOPERSPECTIVE
@ WINED3DSIM_LINEAR_NOPERSPECTIVE_CENTROID
@ WINED3DSIM_LINEAR_SAMPLE
WINED3D_SHADER_INSTRUCTION_HANDLER
@ WINED3DSIH_DCL_TESSELLATOR_PARTITIONING
@ WINED3DSIH_GATHER4_PO_C
@ WINED3DSIH_DCL_FUNCTION_TABLE
@ WINED3DSIH_DCL_INPUT_SIV
@ WINED3DSIH_IMM_ATOMIC_XOR
@ WINED3DSIH_DCL_CONSTANT_BUFFER
@ WINED3DSIH_DCL_INTERFACE
@ WINED3DSIH_TEXM3x3VSPEC
@ WINED3DSIH_DCL_INPUT_SGV
@ WINED3DSIH_DCL_INPUT_PS_SGV
@ WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER
@ WINED3DSIH_DCL_THREAD_GROUP
@ WINED3DSIH_DCL_OUTPUT_SIV
@ WINED3DSIH_DCL_INDEX_RANGE
@ 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_HS_MAX_TESSFACTOR
@ 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_INPUT_CONTROL_POINT_COUNT
@ WINED3DSIH_DCL_GLOBAL_FLAGS
@ WINED3DSIH_IMM_ATOMIC_ALLOC
@ WINED3DSIH_DCL_TESSELLATOR_DOMAIN
@ WINED3DSIH_DCL_INPUT_PS_SIV
@ WINED3DSIH_DCL_TGSM_STRUCTURED
@ WINED3DSIH_DCL_FUNCTION_BODY
@ 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 WINED3DSP_WRITEMASK_3
wined3d_tessellator_output_primitive
@ WINED3D_TESSELLATOR_OUTPUT_POINT
@ WINED3D_TESSELLATOR_OUTPUT_TRIANGLE_CW
@ WINED3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW
@ WINED3D_TESSELLATOR_OUTPUT_LINE
#define WINED3D_PSARGS_PROJECTED
#define WINED3DSI_SAMPLER_COMPARISON_MODE
@ WINED3DSSF_THREAD_GROUP
@ WINED3DSSF_GROUP_SHARED_MEMORY
#define WINED3D_FFP_TCI_SHIFT
wined3d_shader_src_modifier
#define WINED3D_PACKED_INTERPOLATION_BIT_COUNT
#define WINED3D_PSARGS_TEXTYPE_MASK
#define WINED3DFMT_FLAG_SHADOW
static BOOL use_vs(const struct wined3d_state *state)
#define WINED3D_PSARGS_TEXTRANSFORM_SHIFT
@ WINED3DSPDM_MSAMPCENTROID
@ WINED3DSPDM_PARTIALPRECISION
#define WINED3DSI_RESINFO_UINT
#define WINED3D_TEXTURE_POW2_MAT_IDENT
static BOOL wined3d_dualblend_enabled(const struct wined3d_state *state, const struct wined3d_gl_info *gl_info)
static BOOL wined3d_shader_instruction_has_texel_offset(const struct wined3d_shader_instruction *ins)
#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_1DARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DMS
@ WINED3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY
@ 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)
@ WINED3DSUF_ORDER_PRESERVING_COUNTER
@ WINED3DSUF_GLOBALLY_COHERENT
wined3d_shader_input_sysval_semantic
@ WINED3D_SIV_VIEWPORT_ARRAY_INDEX
@ WINED3D_SIV_TRIANGLE_INNER_TESS_FACTOR
@ WINED3D_SIV_CULL_DISTANCE
@ WINED3D_SIV_QUAD_V0_TESS_FACTOR
@ WINED3D_SIV_IS_FRONT_FACE
@ WINED3D_SIV_QUAD_V_INNER_TESS_FACTOR
@ WINED3D_SIV_TRIANGLE_U_TESS_FACTOR
@ WINED3D_SIV_INSTANCE_ID
@ WINED3D_SIV_TRIANGLE_W_TESS_FACTOR
@ WINED3D_SIV_RENDER_TARGET_ARRAY_INDEX
@ WINED3D_SIV_QUAD_U0_TESS_FACTOR
@ WINED3D_SIV_CLIP_DISTANCE
@ WINED3D_SIV_QUAD_U1_TESS_FACTOR
@ WINED3D_SIV_SAMPLE_INDEX
@ WINED3D_SIV_TRIANGLE_V_TESS_FACTOR
@ WINED3D_SIV_LINE_DETAIL_TESS_FACTOR
@ WINED3D_SIV_LINE_DENSITY_TESS_FACTOR
@ WINED3D_SIV_QUAD_V1_TESS_FACTOR
@ WINED3D_SIV_PRIMITIVE_ID
@ WINED3D_SIV_QUAD_U_INNER_TESS_FACTOR
#define WINED3D_SHADER_VERSION(major, minor)
static const struct color_fixup_desc COLOR_FIXUP_IDENTITY
wined3d_tessellator_domain
@ WINED3D_TESSELLATOR_DOMAIN_TRIANGLE
@ WINED3D_TESSELLATOR_DOMAIN_QUAD
@ WINED3D_TESSELLATOR_DOMAIN_LINE
#define WINED3DSI_SAMPLE_INFO_UINT
#define WINED3DSI_INDEXED_DYNAMIC
static BOOL needs_srgb_write(const struct wined3d_context *context, const struct wined3d_state *state, const struct wined3d_fb_state *fb)
static void wined3d_insert_bits(DWORD *bitstream, unsigned int offset, unsigned int count, DWORD bits)
wined3d_shader_register_type
@ WINED3DSPR_LOCALTHREADID
@ WINED3DSPR_FUNCTIONPOINTER
@ WINED3DSPR_OUTCONTROLPOINT
@ WINED3DSPR_INCONTROLPOINT
@ WINED3DSPR_THREADGROUPID
@ WINED3DSPR_FUNCTIONBODY
@ WINED3DSPR_GROUPSHAREDMEM
@ WINED3DSPR_LOCALTHREADINDEX
@ WINED3DSPR_IMMCONSTBUFFER
#define WINED3D_PSARGS_TEXTYPE_SHIFT
#define WINED3D_FRAGMENT_CAP_PROJ_CONTROL
#define WINED3DSP_NOSWIZZLE
#define WINED3DSI_TEXLD_PROJECT
@ WINED3D_IMMCONST_SCALAR
@ WINED3DSGF_REFACTORING_ALLOWED
@ WINED3DSGF_FORCE_EARLY_DEPTH_STENCIL
@ WINED3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS
@ WINED3D_SHADER_TYPE_HULL
@ WINED3D_SHADER_TYPE_PIXEL
@ WINED3D_SHADER_TYPE_GEOMETRY
@ WINED3D_SHADER_TYPE_DOMAIN
@ WINED3D_SHADER_TYPE_COMPUTE
@ WINED3D_SHADER_TYPE_VERTEX
static BOOL use_ps(const struct wined3d_state *state)
#define WINED3DSI_RESINFO_RCP_FLOAT
wined3d_tessellator_partitioning
@ WINED3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD
@ WINED3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN
@ WINED3D_TESSELLATOR_PARTITIONING_INTEGER
@ WINED3D_TESSELLATOR_PARTITIONING_POW2
@ WINED3D_SHADER_TEX_CUBE
@ WINED3D_FFP_PS_FOG_EXP2
@ WINED3D_FFP_PS_FOG_LINEAR
#define MAX_CLIP_DISTANCES
static BOOL can_use_texture_swizzle(const struct wined3d_gl_info *gl_info, const struct wined3d_format *format)
#define MAX_TGSM_REGISTERS
static unsigned int wined3d_popcount(unsigned int x)
#define WINED3DSP_WRITEMASK_2
#define WINED3DSP_WRITEMASK_1
@ WINED3D_SHADER_CONDITIONAL_OP_NZ
@ WINED3D_SHADER_CONDITIONAL_OP_Z