ReactOS 0.4.16-dev-329-g9223134
shader_sm4.c
Go to the documentation of this file.
1/*
2 * Copyright 2009 Henri Verbeet for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#include "config.h"
20#include "wine/port.h"
21
22#include "wined3d_private.h"
23
26
27#define WINED3D_SM4_INSTRUCTION_MODIFIER (0x1u << 31)
28
29#define WINED3D_SM4_MODIFIER_AOFFIMMI 0x1
30#define WINED3D_SM4_AOFFIMMI_U_SHIFT 9
31#define WINED3D_SM4_AOFFIMMI_U_MASK (0xfu << WINED3D_SM4_AOFFIMMI_U_SHIFT)
32#define WINED3D_SM4_AOFFIMMI_V_SHIFT 13
33#define WINED3D_SM4_AOFFIMMI_V_MASK (0xfu << WINED3D_SM4_AOFFIMMI_V_SHIFT)
34#define WINED3D_SM4_AOFFIMMI_W_SHIFT 17
35#define WINED3D_SM4_AOFFIMMI_W_MASK (0xfu << WINED3D_SM4_AOFFIMMI_W_SHIFT)
36
37#define WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT 24
38#define WINED3D_SM4_INSTRUCTION_LENGTH_MASK (0x1fu << WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT)
39
40#define WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT 11
41#define WINED3D_SM4_INSTRUCTION_FLAGS_MASK (0x7u << WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT)
42
43#define WINED3D_SM4_RESOURCE_TYPE_SHIFT 11
44#define WINED3D_SM4_RESOURCE_TYPE_MASK (0xfu << WINED3D_SM4_RESOURCE_TYPE_SHIFT)
45
46#define WINED3D_SM4_PRIMITIVE_TYPE_SHIFT 11
47#define WINED3D_SM4_PRIMITIVE_TYPE_MASK (0x3fu << WINED3D_SM4_PRIMITIVE_TYPE_SHIFT)
48
49#define WINED3D_SM4_INDEX_TYPE_SHIFT 11
50#define WINED3D_SM4_INDEX_TYPE_MASK (0x1u << WINED3D_SM4_INDEX_TYPE_SHIFT)
51
52#define WINED3D_SM4_SAMPLER_MODE_SHIFT 11
53#define WINED3D_SM4_SAMPLER_MODE_MASK (0xfu << WINED3D_SM4_SAMPLER_MODE_SHIFT)
54
55#define WINED3D_SM4_SHADER_DATA_TYPE_SHIFT 11
56#define WINED3D_SM4_SHADER_DATA_TYPE_MASK (0xfu << WINED3D_SM4_SHADER_DATA_TYPE_SHIFT)
57
58#define WINED3D_SM4_INTERPOLATION_MODE_SHIFT 11
59#define WINED3D_SM4_INTERPOLATION_MODE_MASK (0xfu << WINED3D_SM4_INTERPOLATION_MODE_SHIFT)
60
61#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT 11
62#define WINED3D_SM4_GLOBAL_FLAGS_MASK (0xffu << WINED3D_SM4_GLOBAL_FLAGS_SHIFT)
63
64#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT 11
65#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK (0xffu << WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT)
66
67#define WINED3D_SM5_FP_ARRAY_SIZE_SHIFT 16
68#define WINED3D_SM5_FP_TABLE_COUNT_MASK 0xffffu
69
70#define WINED3D_SM5_UAV_FLAGS_SHIFT 15
71#define WINED3D_SM5_UAV_FLAGS_MASK (0x1ffu << WINED3D_SM5_UAV_FLAGS_SHIFT)
72
73#define WINED3D_SM5_SYNC_FLAGS_SHIFT 11
74#define WINED3D_SM5_SYNC_FLAGS_MASK (0xffu << WINED3D_SM5_SYNC_FLAGS_SHIFT)
75
76#define WINED3D_SM5_TESSELLATOR_SHIFT 11
77#define WINED3D_SM5_TESSELLATOR_MASK (0xfu << WINED3D_SM5_TESSELLATOR_SHIFT)
78
79#define WINED3D_SM4_OPCODE_MASK 0xff
80
81#define WINED3D_SM4_REGISTER_MODIFIER (0x1u << 31)
82
83#define WINED3D_SM4_ADDRESSING_SHIFT1 25
84#define WINED3D_SM4_ADDRESSING_MASK1 (0x3u << WINED3D_SM4_ADDRESSING_SHIFT1)
85
86#define WINED3D_SM4_ADDRESSING_SHIFT0 22
87#define WINED3D_SM4_ADDRESSING_MASK0 (0x3u << WINED3D_SM4_ADDRESSING_SHIFT0)
88
89#define WINED3D_SM4_REGISTER_ORDER_SHIFT 20
90#define WINED3D_SM4_REGISTER_ORDER_MASK (0x3u << WINED3D_SM4_REGISTER_ORDER_SHIFT)
91
92#define WINED3D_SM4_REGISTER_TYPE_SHIFT 12
93#define WINED3D_SM4_REGISTER_TYPE_MASK (0xffu << WINED3D_SM4_REGISTER_TYPE_SHIFT)
94
95#define WINED3D_SM4_SWIZZLE_TYPE_SHIFT 2
96#define WINED3D_SM4_SWIZZLE_TYPE_MASK (0x3u << WINED3D_SM4_SWIZZLE_TYPE_SHIFT)
97
98#define WINED3D_SM4_IMMCONST_TYPE_SHIFT 0
99#define WINED3D_SM4_IMMCONST_TYPE_MASK (0x3u << WINED3D_SM4_IMMCONST_TYPE_SHIFT)
100
101#define WINED3D_SM4_WRITEMASK_SHIFT 4
102#define WINED3D_SM4_WRITEMASK_MASK (0xfu << WINED3D_SM4_WRITEMASK_SHIFT)
103
104#define WINED3D_SM4_SWIZZLE_SHIFT 4
105#define WINED3D_SM4_SWIZZLE_MASK (0xffu << WINED3D_SM4_SWIZZLE_SHIFT)
106
107#define WINED3D_SM4_VERSION_MAJOR(version) (((version) >> 4) & 0xf)
108#define WINED3D_SM4_VERSION_MINOR(version) (((version) >> 0) & 0xf)
109
110#define WINED3D_SM4_ADDRESSING_RELATIVE 0x2
111#define WINED3D_SM4_ADDRESSING_OFFSET 0x1
112
113#define WINED3D_SM4_INSTRUCTION_FLAG_SATURATE 0x4
114
115#define WINED3D_SM4_CONDITIONAL_NZ (0x1u << 18)
116
118{
302};
303
305{
339};
340
342{
346};
347
349{
387};
388
390{
394};
395
397{
400};
401
403{
414};
415
417{
423};
424
426{
429};
430
432{
435};
436
438{
439 struct list entry;
441};
442
444{
446 const DWORD *start, *end;
447
449
453 struct list src;
455};
456
458{
461 const char *dst_info;
462 const char *src_info;
464 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
465 struct wined3d_sm4_data *priv);
466};
467
469{
470 /* UNKNOWN */ WINED3D_PT_UNDEFINED,
471 /* WINED3D_SM4_OUTPUT_PT_POINTLIST */ WINED3D_PT_POINTLIST,
472 /* UNKNOWN */ WINED3D_PT_UNDEFINED,
473 /* WINED3D_SM4_OUTPUT_PT_LINESTRIP */ WINED3D_PT_LINESTRIP,
474 /* UNKNOWN */ WINED3D_PT_UNDEFINED,
475 /* WINED3D_SM4_OUTPUT_PT_TRIANGLESTRIP */ WINED3D_PT_TRIANGLESTRIP,
476};
477
479{
480 /* UNKNOWN */ WINED3D_PT_UNDEFINED,
481 /* WINED3D_SM4_INPUT_PT_POINT */ WINED3D_PT_POINTLIST,
482 /* WINED3D_SM4_INPUT_PT_LINE */ WINED3D_PT_LINELIST,
483 /* WINED3D_SM4_INPUT_PT_TRIANGLE */ WINED3D_PT_TRIANGLELIST,
484 /* UNKNOWN */ WINED3D_PT_UNDEFINED,
485 /* UNKNOWN */ WINED3D_PT_UNDEFINED,
486 /* WINED3D_SM4_INPUT_PT_LINEADJ */ WINED3D_PT_LINELIST_ADJ,
487 /* WINED3D_SM4_INPUT_PT_TRIANGLEADJ */ WINED3D_PT_TRIANGLELIST_ADJ,
488};
489
491{
493 /* WINED3D_SM4_RESOURCE_BUFFER */ WINED3D_SHADER_RESOURCE_BUFFER,
494 /* WINED3D_SM4_RESOURCE_TEXTURE_1D */ WINED3D_SHADER_RESOURCE_TEXTURE_1D,
495 /* WINED3D_SM4_RESOURCE_TEXTURE_2D */ WINED3D_SHADER_RESOURCE_TEXTURE_2D,
496 /* WINED3D_SM4_RESOURCE_TEXTURE_2DMS */ WINED3D_SHADER_RESOURCE_TEXTURE_2DMS,
497 /* WINED3D_SM4_RESOURCE_TEXTURE_3D */ WINED3D_SHADER_RESOURCE_TEXTURE_3D,
498 /* WINED3D_SM4_RESOURCE_TEXTURE_CUBE */ WINED3D_SHADER_RESOURCE_TEXTURE_CUBE,
499 /* WINED3D_SM4_RESOURCE_TEXTURE_1DARRAY */ WINED3D_SHADER_RESOURCE_TEXTURE_1DARRAY,
500 /* WINED3D_SM4_RESOURCE_TEXTURE_2DARRAY */ WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY,
501 /* WINED3D_SM4_RESOURCE_TEXTURE_2DMSARRAY */ WINED3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY,
502 /* WINED3D_SM4_RESOURCE_TEXTURE_CUBEARRAY */ WINED3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY,
503};
504
506{
507 /* 0 */ WINED3D_DATA_FLOAT,
508 /* WINED3D_SM4_DATA_UNORM */ WINED3D_DATA_UNORM,
509 /* WINED3D_SM4_DATA_SNORM */ WINED3D_DATA_SNORM,
510 /* WINED3D_SM4_DATA_INT */ WINED3D_DATA_INT,
511 /* WINED3D_SM4_DATA_UINT */ WINED3D_DATA_UINT,
512 /* WINED3D_SM4_DATA_FLOAT */ WINED3D_DATA_FLOAT,
513};
514
515static BOOL shader_sm4_read_src_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end,
517static BOOL shader_sm4_read_dst_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end,
519
521 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
522 struct wined3d_sm4_data *priv)
523{
524 shader_sm4_read_src_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_UINT, &priv->src_param[0]);
525 ins->flags = (opcode_token & WINED3D_SM4_CONDITIONAL_NZ) ?
527}
528
530 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
531 struct wined3d_sm4_data *priv)
532{
534 unsigned int icb_size;
535
538 {
539 FIXME("Ignoring shader data type %#x.\n", type);
541 return;
542 }
543
544 ++tokens;
545 icb_size = token_count - 1;
546 if (icb_size % 4 || icb_size > MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE)
547 {
548 FIXME("Unexpected immediate constant buffer size %u.\n", icb_size);
550 return;
551 }
552
553 priv->icb.vec4_count = icb_size / 4;
554 memcpy(priv->icb.data, tokens, sizeof(*tokens) * icb_size);
555 ins->declaration.icb = &priv->icb;
556}
557
559 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
560 struct wined3d_sm4_data *priv)
561{
562 enum wined3d_sm4_resource_type resource_type;
563 enum wined3d_sm4_data_type data_type;
564 enum wined3d_data_type reg_data_type;
566
567 resource_type = (opcode_token & WINED3D_SM4_RESOURCE_TYPE_MASK) >> WINED3D_SM4_RESOURCE_TYPE_SHIFT;
568 if (!resource_type || (resource_type >= ARRAY_SIZE(resource_type_table)))
569 {
570 FIXME("Unhandled resource type %#x.\n", resource_type);
572 }
573 else
574 {
575 ins->declaration.semantic.resource_type = resource_type_table[resource_type];
576 }
578 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], reg_data_type, &ins->declaration.semantic.reg);
579
580 components = *tokens++;
581 if ((components & 0xfff0) != (components & 0xf) * 0x1110)
582 FIXME("Components (%#x) have different data types.\n", components);
583 data_type = components & 0xf;
584
585 if (!data_type || (data_type >= ARRAY_SIZE(data_type_table)))
586 {
587 FIXME("Unhandled data type %#x.\n", data_type);
588 ins->declaration.semantic.resource_data_type = WINED3D_DATA_FLOAT;
589 }
590 else
591 {
592 ins->declaration.semantic.resource_data_type = data_type_table[data_type];
593 }
594
595 if (reg_data_type == WINED3D_DATA_UAV)
597}
598
600 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
601 struct wined3d_sm4_data *priv)
602{
603 shader_sm4_read_src_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT, &ins->declaration.src);
604 if (opcode_token & WINED3D_SM4_INDEX_TYPE_MASK)
606}
607
609 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
610 struct wined3d_sm4_data *priv)
611{
614 FIXME("Unhandled sampler mode %#x.\n", ins->flags);
615 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_SAMPLER, &ins->declaration.dst);
616}
617
619 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
620 struct wined3d_sm4_data *priv)
621{
622 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_OPAQUE,
623 &ins->declaration.index_range.first_register);
624 ins->declaration.index_range.last_register = *tokens;
625}
626
628 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
629 struct wined3d_sm4_data *priv)
630{
631 enum wined3d_sm4_output_primitive_type primitive_type;
632
633 primitive_type = (opcode_token & WINED3D_SM4_PRIMITIVE_TYPE_MASK) >> WINED3D_SM4_PRIMITIVE_TYPE_SHIFT;
634 if (primitive_type >= ARRAY_SIZE(output_primitive_type_table))
636 else
637 ins->declaration.primitive_type.type = output_primitive_type_table[primitive_type];
638
640 FIXME("Unhandled output primitive type %#x.\n", primitive_type);
641}
642
644 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
645 struct wined3d_sm4_data *priv)
646{
647 enum wined3d_sm4_input_primitive_type primitive_type;
648
649 primitive_type = (opcode_token & WINED3D_SM4_PRIMITIVE_TYPE_MASK) >> WINED3D_SM4_PRIMITIVE_TYPE_SHIFT;
650 if (WINED3D_SM5_INPUT_PT_PATCH1 <= primitive_type && primitive_type <= WINED3D_SM5_INPUT_PT_PATCH32)
651 {
653 ins->declaration.primitive_type.patch_vertex_count = primitive_type - WINED3D_SM5_INPUT_PT_PATCH1 + 1;
654 }
655 else if (primitive_type >= ARRAY_SIZE(input_primitive_type_table))
656 {
658 }
659 else
660 {
661 ins->declaration.primitive_type.type = input_primitive_type_table[primitive_type];
662 }
663
665 FIXME("Unhandled input primitive type %#x.\n", primitive_type);
666}
667
669 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
670 struct wined3d_sm4_data *priv)
671{
672 ins->declaration.count = *tokens;
673}
674
676 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
677 struct wined3d_sm4_data *priv)
678{
679 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT, &ins->declaration.dst);
680}
681
683 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
684 struct wined3d_sm4_data *priv)
685{
686 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT,
688 ins->declaration.register_semantic.sysval_semantic = *tokens;
689}
690
692 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
693 struct wined3d_sm4_data *priv)
694{
696 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT, &ins->declaration.dst);
697}
698
700 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
701 struct wined3d_sm4_data *priv)
702{
704 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT,
706 ins->declaration.register_semantic.sysval_semantic = *tokens;
707}
708
710 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
711 struct wined3d_sm4_data *priv)
712{
713 ins->declaration.indexable_temp.register_idx = *tokens++;
714 ins->declaration.indexable_temp.register_size = *tokens++;
715 ins->declaration.indexable_temp.component_count = *tokens;
716}
717
719 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
720 struct wined3d_sm4_data *priv)
721{
723}
724
726 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
727 struct wined3d_sm4_data *priv)
728{
729 priv->src_param[0].reg.u.fp_body_idx = *tokens++;
730 shader_sm4_read_src_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_OPAQUE, &priv->src_param[0]);
731}
732
734 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
735 struct wined3d_sm4_data *priv)
736{
737 ins->declaration.index = *tokens;
738}
739
741 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
742 struct wined3d_sm4_data *priv)
743{
744 ins->declaration.index = *tokens++;
745 FIXME("Ignoring set of function bodies (count %u).\n", *tokens);
746}
747
749 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
750 struct wined3d_sm4_data *priv)
751{
752 ins->declaration.fp.index = *tokens++;
753 ins->declaration.fp.body_count = *tokens++;
754 ins->declaration.fp.array_size = *tokens >> WINED3D_SM5_FP_ARRAY_SIZE_SHIFT;
755 ins->declaration.fp.table_count = *tokens++ & WINED3D_SM5_FP_TABLE_COUNT_MASK;
756 FIXME("Ignoring set of function tables (count %u).\n", ins->declaration.fp.table_count);
757}
758
760 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
761 struct wined3d_sm4_data *priv)
762{
765}
766
768 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
769 struct wined3d_sm4_data *priv)
770{
773}
774
776 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
777 struct wined3d_sm4_data *priv)
778{
781}
782
784 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
785 struct wined3d_sm4_data *priv)
786{
789}
790
792 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
793 struct wined3d_sm4_data *priv)
794{
795 ins->declaration.max_tessellation_factor = *(float *)tokens;
796}
797
799 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
800 struct wined3d_sm4_data *priv)
801{
802 ins->declaration.thread_group_size.x = *tokens++;
803 ins->declaration.thread_group_size.y = *tokens++;
804 ins->declaration.thread_group_size.z = *tokens++;
805}
806
808 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
809 struct wined3d_sm4_data *priv)
810{
811 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_UAV, &ins->declaration.dst);
813}
814
816 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
817 struct wined3d_sm4_data *priv)
818{
819 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_UAV,
822 ins->declaration.structured_resource.byte_stride = *tokens;
823 if (ins->declaration.structured_resource.byte_stride % 4)
824 FIXME("Byte stride %u is not multiple of 4.\n", ins->declaration.structured_resource.byte_stride);
825}
826
828 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
829 struct wined3d_sm4_data *priv)
830{
831 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT, &ins->declaration.tgsm_raw.reg);
832 ins->declaration.tgsm_raw.byte_count = *tokens;
833 if (ins->declaration.tgsm_raw.byte_count % 4)
834 FIXME("Byte count %u is not multiple of 4.\n", ins->declaration.tgsm_raw.byte_count);
835}
836
838 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
839 struct wined3d_sm4_data *priv)
840{
841 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT,
842 &ins->declaration.tgsm_structured.reg);
843 ins->declaration.tgsm_structured.byte_stride = *tokens++;
844 ins->declaration.tgsm_structured.structure_count = *tokens;
845 if (ins->declaration.tgsm_structured.byte_stride % 4)
846 FIXME("Byte stride %u is not multiple of 4.\n", ins->declaration.tgsm_structured.byte_stride);
847}
848
850 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
851 struct wined3d_sm4_data *priv)
852{
853 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_RESOURCE,
855 ins->declaration.structured_resource.byte_stride = *tokens;
856 if (ins->declaration.structured_resource.byte_stride % 4)
857 FIXME("Byte stride %u is not multiple of 4.\n", ins->declaration.structured_resource.byte_stride);
858}
859
861 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
862 struct wined3d_sm4_data *priv)
863{
864 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_RESOURCE, &ins->declaration.dst);
865}
866
868 DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count,
869 struct wined3d_sm4_data *priv)
870{
872}
873
874/*
875 * f -> WINED3D_DATA_FLOAT
876 * i -> WINED3D_DATA_INT
877 * u -> WINED3D_DATA_UINT
878 * O -> WINED3D_DATA_OPAQUE
879 * R -> WINED3D_DATA_RESOURCE
880 * S -> WINED3D_DATA_SAMPLER
881 * U -> WINED3D_DATA_UAV
882 */
884{
909 {WINED3D_SM4_OP_EQ, WINED3DSIH_EQ, "u", "ff"},
914 {WINED3D_SM4_OP_GE, WINED3DSIH_GE, "u", "ff"},
931 {WINED3D_SM4_OP_LD, WINED3DSIH_LD, "u", "iR"},
935 {WINED3D_SM4_OP_LT, WINED3DSIH_LT, "u", "ff"},
936 {WINED3D_SM4_OP_MAD, WINED3DSIH_MAD, "f", "fff"},
944 {WINED3D_SM4_OP_NE, WINED3DSIH_NE, "u", "ff"},
947 {WINED3D_SM4_OP_OR, WINED3DSIH_OR, "u", "uu"},
1011 {WINED3D_SM4_OP_LOD, WINED3DSIH_LOD, "f", "fRS"},
1038 {WINED3D_SM5_OP_UBFE, WINED3DSIH_UBFE, "u", "iiu"},
1039 {WINED3D_SM5_OP_IBFE, WINED3DSIH_IBFE, "i", "iii"},
1040 {WINED3D_SM5_OP_BFI, WINED3DSIH_BFI, "u", "iiuu"},
1042 {WINED3D_SM5_OP_SWAPC, WINED3DSIH_SWAPC, "ff", "uff"},
1114};
1115
1117{
1118 /* WINED3D_SM4_RT_TEMP */ WINED3DSPR_TEMP,
1119 /* WINED3D_SM4_RT_INPUT */ WINED3DSPR_INPUT,
1120 /* WINED3D_SM4_RT_OUTPUT */ WINED3DSPR_OUTPUT,
1121 /* WINED3D_SM4_RT_INDEXABLE_TEMP */ WINED3DSPR_IDXTEMP,
1122 /* WINED3D_SM4_RT_IMMCONST */ WINED3DSPR_IMMCONST,
1123 /* UNKNOWN */ ~0u,
1124 /* WINED3D_SM4_RT_SAMPLER */ WINED3DSPR_SAMPLER,
1125 /* WINED3D_SM4_RT_RESOURCE */ WINED3DSPR_RESOURCE,
1126 /* WINED3D_SM4_RT_CONSTBUFFER */ WINED3DSPR_CONSTBUFFER,
1127 /* WINED3D_SM4_RT_IMMCONSTBUFFER */ WINED3DSPR_IMMCONSTBUFFER,
1128 /* UNKNOWN */ ~0u,
1129 /* WINED3D_SM4_RT_PRIMID */ WINED3DSPR_PRIMID,
1130 /* WINED3D_SM4_RT_DEPTHOUT */ WINED3DSPR_DEPTHOUT,
1131 /* WINED3D_SM4_RT_NULL */ WINED3DSPR_NULL,
1132 /* UNKNOWN */ ~0u,
1133 /* WINED3D_SM4_RT_OMASK */ WINED3DSPR_SAMPLEMASK,
1134 /* WINED3D_SM5_RT_STREAM */ WINED3DSPR_STREAM,
1135 /* WINED3D_SM5_RT_FUNCTION_BODY */ WINED3DSPR_FUNCTIONBODY,
1136 /* UNKNOWN */ ~0u,
1137 /* WINED3D_SM5_RT_FUNCTION_POINTER */ WINED3DSPR_FUNCTIONPOINTER,
1138 /* UNKNOWN */ ~0u,
1139 /* UNKNOWN */ ~0u,
1140 /* WINED3D_SM5_RT_OUTPUT_CONTROL_POINT_ID */ WINED3DSPR_OUTPOINTID,
1141 /* WINED3D_SM5_RT_FORK_INSTANCE_ID */ WINED3DSPR_FORKINSTID,
1142 /* WINED3D_SM5_RT_JOIN_INSTANCE_ID */ WINED3DSPR_JOININSTID,
1143 /* WINED3D_SM5_RT_INPUT_CONTROL_POINT */ WINED3DSPR_INCONTROLPOINT,
1144 /* WINED3D_SM5_RT_OUTPUT_CONTROL_POINT */ WINED3DSPR_OUTCONTROLPOINT,
1145 /* WINED3D_SM5_RT_PATCH_CONSTANT_DATA */ WINED3DSPR_PATCHCONST,
1146 /* WINED3D_SM5_RT_DOMAIN_LOCATION */ WINED3DSPR_TESSCOORD,
1147 /* UNKNOWN */ ~0u,
1148 /* WINED3D_SM5_RT_UAV */ WINED3DSPR_UAV,
1149 /* WINED3D_SM5_RT_SHARED_MEMORY */ WINED3DSPR_GROUPSHAREDMEM,
1150 /* WINED3D_SM5_RT_THREAD_ID */ WINED3DSPR_THREADID,
1151 /* WINED3D_SM5_RT_THREAD_GROUP_ID */ WINED3DSPR_THREADGROUPID,
1152 /* WINED3D_SM5_RT_LOCAL_THREAD_ID */ WINED3DSPR_LOCALTHREADID,
1153 /* WINED3D_SM5_RT_COVERAGE */ WINED3DSPR_COVERAGE,
1154 /* WINED3D_SM5_RT_LOCAL_THREAD_INDEX */ WINED3DSPR_LOCALTHREADINDEX,
1155 /* WINED3D_SM5_RT_GS_INSTANCE_ID */ WINED3DSPR_GSINSTID,
1156 /* WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL */ WINED3DSPR_DEPTHOUTGE,
1157 /* WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL */ WINED3DSPR_DEPTHOUTLE,
1158};
1159
1161{
1162 unsigned int i;
1163
1164 for (i = 0; i < ARRAY_SIZE(opcode_table); ++i)
1165 {
1166 if (opcode == opcode_table[i].opcode) return &opcode_table[i];
1167 }
1168
1169 return NULL;
1170}
1171
1172static void map_register(const struct wined3d_sm4_data *priv, struct wined3d_shader_register *reg)
1173{
1174 switch (priv->shader_version.type)
1175 {
1177 if (reg->type == WINED3DSPR_OUTPUT)
1178 {
1179 unsigned int reg_idx = reg->idx[0].offset;
1180
1181 if (reg_idx >= ARRAY_SIZE(priv->output_map))
1182 {
1183 ERR("Invalid output index %u.\n", reg_idx);
1184 break;
1185 }
1186
1187 reg->type = WINED3DSPR_COLOROUT;
1188 reg->idx[0].offset = priv->output_map[reg_idx];
1189 }
1190 break;
1191
1192 default:
1193 break;
1194 }
1195}
1196
1198{
1199 switch (t)
1200 {
1201 case 'f':
1202 return WINED3D_DATA_FLOAT;
1203 case 'i':
1204 return WINED3D_DATA_INT;
1205 case 'u':
1206 return WINED3D_DATA_UINT;
1207 case 'O':
1208 return WINED3D_DATA_OPAQUE;
1209 case 'R':
1210 return WINED3D_DATA_RESOURCE;
1211 case 'S':
1212 return WINED3D_DATA_SAMPLER;
1213 case 'U':
1214 return WINED3D_DATA_UAV;
1215 default:
1216 ERR("Invalid data type '%c'.\n", t);
1217 return WINED3D_DATA_FLOAT;
1218 }
1219}
1220
1221static void *shader_sm4_init(const DWORD *byte_code, size_t byte_code_size,
1222 const struct wined3d_shader_signature *output_signature)
1223{
1224 DWORD version_token, token_count;
1225 struct wined3d_sm4_data *priv;
1226 unsigned int i;
1227
1228 if (byte_code_size / sizeof(*byte_code) < 2)
1229 {
1230 WARN("Invalid byte code size %lu.\n", (long)byte_code_size);
1231 return NULL;
1232 }
1233
1234 version_token = byte_code[0];
1235 TRACE("Version: 0x%08x.\n", version_token);
1236 token_count = byte_code[1];
1237 TRACE("Token count: %u.\n", token_count);
1238
1239 if (token_count < 2 || byte_code_size / sizeof(*byte_code) < token_count)
1240 {
1241 WARN("Invalid token count %u.\n", token_count);
1242 return NULL;
1243 }
1244
1245 if (!(priv = heap_alloc(sizeof(*priv))))
1246 {
1247 ERR("Failed to allocate private data\n");
1248 return NULL;
1249 }
1250
1251 priv->start = &byte_code[2];
1252 priv->end = &byte_code[token_count];
1253
1254 switch (version_token >> 16)
1255 {
1256 case WINED3D_SM4_PS:
1258 break;
1259
1260 case WINED3D_SM4_VS:
1262 break;
1263
1264 case WINED3D_SM4_GS:
1266 break;
1267
1268 case WINED3D_SM5_HS:
1270 break;
1271
1272 case WINED3D_SM5_DS:
1274 break;
1275
1276 case WINED3D_SM5_CS:
1278 break;
1279
1280 default:
1281 FIXME("Unrecognised shader type %#x.\n", version_token >> 16);
1282 }
1283 priv->shader_version.major = WINED3D_SM4_VERSION_MAJOR(version_token);
1284 priv->shader_version.minor = WINED3D_SM4_VERSION_MINOR(version_token);
1285
1286 memset(priv->output_map, 0xff, sizeof(priv->output_map));
1287 for (i = 0; i < output_signature->element_count; ++i)
1288 {
1289 struct wined3d_shader_signature_element *e = &output_signature->elements[i];
1290
1291 if (e->register_idx >= ARRAY_SIZE(priv->output_map))
1292 {
1293 WARN("Invalid output index %u.\n", e->register_idx);
1294 continue;
1295 }
1296
1297 priv->output_map[e->register_idx] = e->semantic_idx;
1298 }
1299
1300 list_init(&priv->src_free);
1301 list_init(&priv->src);
1302
1303 return priv;
1304}
1305
1306static void shader_sm4_free(void *data)
1307{
1308 struct wined3d_shader_src_param_entry *e1, *e2;
1309 struct wined3d_sm4_data *priv = data;
1310
1311 list_move_head(&priv->src_free, &priv->src);
1313 {
1314 heap_free(e1);
1315 }
1316 heap_free(priv);
1317}
1318
1320{
1322 struct list *elem;
1323
1324 if (!list_empty(&priv->src_free))
1325 {
1326 elem = list_head(&priv->src_free);
1328 }
1329 else
1330 {
1331 if (!(e = heap_alloc(sizeof(*e))))
1332 return NULL;
1333 elem = &e->entry;
1334 }
1335
1336 list_add_tail(&priv->src, elem);
1338 return &e->param;
1339}
1340
1341static void shader_sm4_read_header(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
1342{
1343 struct wined3d_sm4_data *priv = data;
1344
1345 *ptr = priv->start;
1347}
1348
1349static BOOL shader_sm4_read_reg_idx(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end,
1350 DWORD addressing, struct wined3d_shader_register_index *reg_idx)
1351{
1352 if (addressing & WINED3D_SM4_ADDRESSING_RELATIVE)
1353 {
1354 struct wined3d_shader_src_param *rel_addr = get_src_param(priv);
1355
1356 if (!(reg_idx->rel_addr = rel_addr))
1357 {
1358 ERR("Failed to get src param for relative addressing.\n");
1359 return FALSE;
1360 }
1361
1362 if (addressing & WINED3D_SM4_ADDRESSING_OFFSET)
1363 reg_idx->offset = *(*ptr)++;
1364 else
1365 reg_idx->offset = 0;
1367 }
1368 else
1369 {
1370 reg_idx->rel_addr = NULL;
1371 reg_idx->offset = *(*ptr)++;
1372 }
1373
1374 return TRUE;
1375}
1376
1377static BOOL shader_sm4_read_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end,
1378 enum wined3d_data_type data_type, struct wined3d_shader_register *param,
1379 enum wined3d_shader_src_modifier *modifier)
1380{
1381 enum wined3d_sm4_register_type register_type;
1382 DWORD token, order;
1383
1384 if (*ptr >= end)
1385 {
1386 WARN("Invalid ptr %p >= end %p.\n", *ptr, end);
1387 return FALSE;
1388 }
1389 token = *(*ptr)++;
1390
1392 if (register_type >= ARRAY_SIZE(register_type_table)
1393 || register_type_table[register_type] == ~0u)
1394 {
1395 FIXME("Unhandled register type %#x.\n", register_type);
1396 param->type = WINED3DSPR_TEMP;
1397 }
1398 else
1399 {
1400 param->type = register_type_table[register_type];
1401 }
1402 param->data_type = data_type;
1403
1405 {
1406 DWORD m;
1407
1408 if (*ptr >= end)
1409 {
1410 WARN("Invalid ptr %p >= end %p.\n", *ptr, end);
1411 return FALSE;
1412 }
1413 m = *(*ptr)++;
1414
1415 switch (m)
1416 {
1417 case 0x41:
1418 *modifier = WINED3DSPSM_NEG;
1419 break;
1420
1421 case 0x81:
1422 *modifier = WINED3DSPSM_ABS;
1423 break;
1424
1425 case 0xc1:
1426 *modifier = WINED3DSPSM_ABSNEG;
1427 break;
1428
1429 default:
1430 FIXME("Skipping modifier 0x%08x.\n", m);
1431 *modifier = WINED3DSPSM_NONE;
1432 break;
1433 }
1434 }
1435 else
1436 {
1437 *modifier = WINED3DSPSM_NONE;
1438 }
1439
1441
1442 if (order < 1)
1443 param->idx[0].offset = ~0U;
1444 else
1445 {
1447 if (!(shader_sm4_read_reg_idx(priv, ptr, end, addressing, &param->idx[0])))
1448 {
1449 ERR("Failed to read register index.\n");
1450 return FALSE;
1451 }
1452 }
1453
1454 if (order < 2)
1455 param->idx[1].offset = ~0U;
1456 else
1457 {
1459 if (!(shader_sm4_read_reg_idx(priv, ptr, end, addressing, &param->idx[1])))
1460 {
1461 ERR("Failed to read register index.\n");
1462 return FALSE;
1463 }
1464 }
1465
1466 if (order > 2)
1467 FIXME("Unhandled order %u.\n", order);
1468
1469 if (register_type == WINED3D_SM4_RT_IMMCONST)
1470 {
1471 enum wined3d_sm4_immconst_type immconst_type =
1473
1474 switch (immconst_type)
1475 {
1477 param->immconst_type = WINED3D_IMMCONST_SCALAR;
1478 if (end - *ptr < 1)
1479 {
1480 WARN("Invalid ptr %p, end %p.\n", *ptr, end);
1481 return FALSE;
1482 }
1483 memcpy(param->u.immconst_data, *ptr, 1 * sizeof(DWORD));
1484 *ptr += 1;
1485 break;
1486
1488 param->immconst_type = WINED3D_IMMCONST_VEC4;
1489 if (end - *ptr < 4)
1490 {
1491 WARN("Invalid ptr %p, end %p.\n", *ptr, end);
1492 return FALSE;
1493 }
1494 memcpy(param->u.immconst_data, *ptr, 4 * sizeof(DWORD));
1495 *ptr += 4;
1496 break;
1497
1498 default:
1499 FIXME("Unhandled immediate constant type %#x.\n", immconst_type);
1500 break;
1501 }
1502 }
1503
1504 map_register(priv, param);
1505
1506 return TRUE;
1507}
1508
1509static BOOL shader_sm4_read_src_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end,
1510 enum wined3d_data_type data_type, struct wined3d_shader_src_param *src_param)
1511{
1512 DWORD token;
1513
1514 if (*ptr >= end)
1515 {
1516 WARN("Invalid ptr %p >= end %p.\n", *ptr, end);
1517 return FALSE;
1518 }
1519 token = **ptr;
1520
1521 if (!shader_sm4_read_param(priv, ptr, end, data_type, &src_param->reg, &src_param->modifiers))
1522 {
1523 ERR("Failed to read parameter.\n");
1524 return FALSE;
1525 }
1526
1527 if (src_param->reg.type == WINED3DSPR_IMMCONST)
1528 {
1529 src_param->swizzle = WINED3DSP_NOSWIZZLE;
1530 }
1531 else
1532 {
1533 enum wined3d_sm4_swizzle_type swizzle_type =
1535
1536 switch (swizzle_type)
1537 {
1539 src_param->swizzle = WINED3DSP_NOSWIZZLE;
1540 break;
1541
1544 src_param->swizzle = (src_param->swizzle & 0x3) * 0x55;
1545 break;
1546
1549 break;
1550
1551 default:
1552 FIXME("Unhandled swizzle type %#x.\n", swizzle_type);
1553 break;
1554 }
1555 }
1556
1557 return TRUE;
1558}
1559
1560static BOOL shader_sm4_read_dst_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end,
1561 enum wined3d_data_type data_type, struct wined3d_shader_dst_param *dst_param)
1562{
1563 enum wined3d_shader_src_modifier modifier;
1564 DWORD token;
1565
1566 if (*ptr >= end)
1567 {
1568 WARN("Invalid ptr %p >= end %p.\n", *ptr, end);
1569 return FALSE;
1570 }
1571 token = **ptr;
1572
1573 if (!shader_sm4_read_param(priv, ptr, end, data_type, &dst_param->reg, &modifier))
1574 {
1575 ERR("Failed to read parameter.\n");
1576 return FALSE;
1577 }
1578
1579 if (modifier != WINED3DSPSM_NONE)
1580 {
1581 ERR("Invalid source modifier %#x on destination register.\n", modifier);
1582 return FALSE;
1583 }
1584
1586 dst_param->modifiers = 0;
1587 dst_param->shift = 0;
1588
1589 return TRUE;
1590}
1591
1593{
1594 static const DWORD recognized_bits = WINED3D_SM4_INSTRUCTION_MODIFIER
1599
1600 if (modifier & ~recognized_bits)
1601 {
1602 FIXME("Unhandled modifier 0x%08x.\n", modifier);
1603 }
1604 else
1605 {
1606 /* Bit fields are used for sign extension */
1607 struct
1608 {
1609 int u : 4;
1610 int v : 4;
1611 int w : 4;
1612 }
1613 aoffimmi;
1614 aoffimmi.u = (modifier & WINED3D_SM4_AOFFIMMI_U_MASK) >> WINED3D_SM4_AOFFIMMI_U_SHIFT;
1615 aoffimmi.v = (modifier & WINED3D_SM4_AOFFIMMI_V_MASK) >> WINED3D_SM4_AOFFIMMI_V_SHIFT;
1616 aoffimmi.w = (modifier & WINED3D_SM4_AOFFIMMI_W_MASK) >> WINED3D_SM4_AOFFIMMI_W_SHIFT;
1617 ins->texel_offset.u = aoffimmi.u;
1618 ins->texel_offset.v = aoffimmi.v;
1619 ins->texel_offset.w = aoffimmi.w;
1620 }
1621}
1622
1624{
1625 const struct wined3d_sm4_opcode_info *opcode_info;
1626 DWORD opcode_token, opcode, previous_token;
1627 struct wined3d_sm4_data *priv = data;
1628 unsigned int i, len;
1629 SIZE_T remaining;
1630 const DWORD *p;
1631
1632 list_move_head(&priv->src_free, &priv->src);
1633
1634 if (*ptr >= priv->end)
1635 {
1636 WARN("End of byte-code, failed to read opcode.\n");
1637 goto fail;
1638 }
1639 remaining = priv->end - *ptr;
1640
1641 opcode_token = *(*ptr)++;
1642 opcode = opcode_token & WINED3D_SM4_OPCODE_MASK;
1643
1645 if (!len)
1646 {
1647 if (remaining < 2)
1648 {
1649 WARN("End of byte-code, failed to read length token.\n");
1650 goto fail;
1651 }
1652 len = **ptr;
1653 }
1654 if (!len || remaining < len)
1655 {
1656 WARN("Read invalid length %u (remaining %lu).\n", len, remaining);
1657 goto fail;
1658 }
1659 --len;
1660
1661 if (TRACE_ON(d3d_bytecode))
1662 {
1663 TRACE_(d3d_bytecode)("[ %08x ", opcode_token);
1664 for (i = 0; i < len; ++i)
1665 {
1666 TRACE_(d3d_bytecode)("%08x ", (*ptr)[i]);
1667 }
1668 TRACE_(d3d_bytecode)("]\n");
1669 }
1670
1671 if (!(opcode_info = get_opcode_info(opcode)))
1672 {
1673 FIXME("Unrecognized opcode %#x, opcode_token 0x%08x.\n", opcode, opcode_token);
1675 *ptr += len;
1676 return;
1677 }
1678
1679 ins->handler_idx = opcode_info->handler_idx;
1680 ins->flags = 0;
1681 ins->coissue = 0;
1682 ins->predicate = NULL;
1683 ins->dst_count = strlen(opcode_info->dst_info);
1684 ins->dst = priv->dst_param;
1685 ins->src_count = strlen(opcode_info->src_info);
1686 ins->src = priv->src_param;
1687 memset(&ins->texel_offset, 0, sizeof(ins->texel_offset));
1688
1689 p = *ptr;
1690 *ptr += len;
1691
1692 if (opcode_info->read_opcode_func)
1693 {
1694 opcode_info->read_opcode_func(ins, opcode, opcode_token, p, len, priv);
1695 }
1696 else
1697 {
1698 enum wined3d_shader_dst_modifier instruction_dst_modifier = WINED3DSPDM_NONE;
1699
1700 previous_token = opcode_token;
1701 while (previous_token & WINED3D_SM4_INSTRUCTION_MODIFIER && p != *ptr)
1702 shader_sm4_read_instruction_modifier(previous_token = *p++, ins);
1703
1705
1707 {
1708 ins->flags &= ~WINED3D_SM4_INSTRUCTION_FLAG_SATURATE;
1709 instruction_dst_modifier = WINED3DSPDM_SATURATE;
1710 }
1711
1712 for (i = 0; i < ins->dst_count; ++i)
1713 {
1714 if (!(shader_sm4_read_dst_param(priv, &p, *ptr, map_data_type(opcode_info->dst_info[i]),
1715 &priv->dst_param[i])))
1716 {
1718 return;
1719 }
1720 priv->dst_param[i].modifiers |= instruction_dst_modifier;
1721 }
1722
1723 for (i = 0; i < ins->src_count; ++i)
1724 {
1725 if (!(shader_sm4_read_src_param(priv, &p, *ptr, map_data_type(opcode_info->src_info[i]),
1726 &priv->src_param[i])))
1727 {
1729 return;
1730 }
1731 }
1732 }
1733
1734 return;
1735
1736fail:
1737 *ptr = priv->end;
1739 return;
1740}
1741
1742static BOOL shader_sm4_is_end(void *data, const DWORD **ptr)
1743{
1744 struct wined3d_sm4_data *priv = data;
1745 return *ptr == priv->end;
1746}
1747
1749{
1755};
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define U(x)
Definition: wordpad.c:45
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
Definition: list.h:37
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define TRACE_(x)
Definition: compat.h:76
#define TRACE_ON(x)
Definition: compat.h:75
#define WINE_DECLARE_DEBUG_CHANNEL(x)
Definition: compat.h:45
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble t
Definition: gl.h:2047
GLenum src
Definition: glext.h:6340
GLenum GLenum GLuint components
Definition: glext.h:9620
GLfloat GLfloat p
Definition: glext.h:8902
GLfloat param
Definition: glext.h:5796
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLenum GLsizei len
Definition: glext.h:6722
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
const GLfloat * m
Definition: glext.h:10848
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
Definition: glfuncs.h:248
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
Definition: glfuncs.h:240
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 token
Definition: glfuncs.h:210
static int reg
Definition: i386-dis.c:1290
uint32_t entry
Definition: isohybrid.c:63
#define e
Definition: ke_i.h:82
if(dx< 0)
Definition: linetemp.h:194
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
static size_t elem
Definition: string.c:68
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
__WINE_SERVER_LIST_INLINE void list_move_head(struct list *dst, struct list *src)
Definition: list.h:176
#define memset(x, y, z)
Definition: compat.h:39
static void shader_sm5_read_sync(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:867
static void shader_sm4_read_header(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
Definition: shader_sm4.c:1341
#define WINED3D_SM5_UAV_FLAGS_MASK
Definition: shader_sm4.c:71
static void shader_sm4_read_dcl_indexable_temp(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:709
#define WINED3D_SM4_SAMPLER_MODE_MASK
Definition: shader_sm4.c:53
static void shader_sm5_read_dcl_hs_max_tessfactor(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:791
static void shader_sm5_read_dcl_uav_structured(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:815
#define WINED3D_SM4_SHADER_DATA_TYPE_SHIFT
Definition: shader_sm4.c:55
static BOOL shader_sm4_read_src_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end, enum wined3d_data_type data_type, struct wined3d_shader_src_param *src_param)
Definition: shader_sm4.c:1509
#define WINED3D_SM4_SWIZZLE_MASK
Definition: shader_sm4.c:105
static void shader_sm5_read_dcl_tgsm_structured(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:837
#define WINED3D_SM4_INDEX_TYPE_MASK
Definition: shader_sm4.c:50
wined3d_sm4_sampler_mode
Definition: shader_sm4.c:426
@ WINED3D_SM4_SAMPLER_COMPARISON
Definition: shader_sm4.c:428
@ WINED3D_SM4_SAMPLER_DEFAULT
Definition: shader_sm4.c:427
wined3d_sm4_resource_type
Definition: shader_sm4.c:403
@ WINED3D_SM4_RESOURCE_TEXTURE_1DARRAY
Definition: shader_sm4.c:410
@ WINED3D_SM4_RESOURCE_TEXTURE_2DMS
Definition: shader_sm4.c:407
@ WINED3D_SM4_RESOURCE_TEXTURE_2DMSARRAY
Definition: shader_sm4.c:412
@ WINED3D_SM4_RESOURCE_TEXTURE_1D
Definition: shader_sm4.c:405
@ WINED3D_SM4_RESOURCE_TEXTURE_CUBE
Definition: shader_sm4.c:409
@ WINED3D_SM4_RESOURCE_TEXTURE_CUBEARRAY
Definition: shader_sm4.c:413
@ WINED3D_SM4_RESOURCE_TEXTURE_2DARRAY
Definition: shader_sm4.c:411
@ WINED3D_SM4_RESOURCE_BUFFER
Definition: shader_sm4.c:404
@ WINED3D_SM4_RESOURCE_TEXTURE_2D
Definition: shader_sm4.c:406
@ WINED3D_SM4_RESOURCE_TEXTURE_3D
Definition: shader_sm4.c:408
wined3d_sm4_input_primitive_type
Definition: shader_sm4.c:349
@ WINED3D_SM5_INPUT_PT_PATCH23
Definition: shader_sm4.c:377
@ WINED3D_SM5_INPUT_PT_PATCH25
Definition: shader_sm4.c:379
@ WINED3D_SM5_INPUT_PT_PATCH3
Definition: shader_sm4.c:357
@ WINED3D_SM4_INPUT_PT_POINT
Definition: shader_sm4.c:350
@ WINED3D_SM4_INPUT_PT_TRIANGLEADJ
Definition: shader_sm4.c:354
@ WINED3D_SM5_INPUT_PT_PATCH32
Definition: shader_sm4.c:386
@ WINED3D_SM4_INPUT_PT_TRIANGLE
Definition: shader_sm4.c:352
@ WINED3D_SM5_INPUT_PT_PATCH7
Definition: shader_sm4.c:361
@ WINED3D_SM5_INPUT_PT_PATCH21
Definition: shader_sm4.c:375
@ WINED3D_SM5_INPUT_PT_PATCH6
Definition: shader_sm4.c:360
@ WINED3D_SM5_INPUT_PT_PATCH29
Definition: shader_sm4.c:383
@ WINED3D_SM5_INPUT_PT_PATCH10
Definition: shader_sm4.c:364
@ WINED3D_SM5_INPUT_PT_PATCH22
Definition: shader_sm4.c:376
@ WINED3D_SM5_INPUT_PT_PATCH14
Definition: shader_sm4.c:368
@ WINED3D_SM5_INPUT_PT_PATCH18
Definition: shader_sm4.c:372
@ WINED3D_SM5_INPUT_PT_PATCH11
Definition: shader_sm4.c:365
@ WINED3D_SM5_INPUT_PT_PATCH8
Definition: shader_sm4.c:362
@ WINED3D_SM5_INPUT_PT_PATCH30
Definition: shader_sm4.c:384
@ WINED3D_SM5_INPUT_PT_PATCH20
Definition: shader_sm4.c:374
@ WINED3D_SM5_INPUT_PT_PATCH31
Definition: shader_sm4.c:385
@ WINED3D_SM4_INPUT_PT_LINE
Definition: shader_sm4.c:351
@ WINED3D_SM5_INPUT_PT_PATCH24
Definition: shader_sm4.c:378
@ WINED3D_SM5_INPUT_PT_PATCH4
Definition: shader_sm4.c:358
@ WINED3D_SM5_INPUT_PT_PATCH9
Definition: shader_sm4.c:363
@ WINED3D_SM5_INPUT_PT_PATCH5
Definition: shader_sm4.c:359
@ WINED3D_SM5_INPUT_PT_PATCH2
Definition: shader_sm4.c:356
@ WINED3D_SM4_INPUT_PT_LINEADJ
Definition: shader_sm4.c:353
@ WINED3D_SM5_INPUT_PT_PATCH19
Definition: shader_sm4.c:373
@ WINED3D_SM5_INPUT_PT_PATCH12
Definition: shader_sm4.c:366
@ WINED3D_SM5_INPUT_PT_PATCH27
Definition: shader_sm4.c:381
@ WINED3D_SM5_INPUT_PT_PATCH13
Definition: shader_sm4.c:367
@ WINED3D_SM5_INPUT_PT_PATCH17
Definition: shader_sm4.c:371
@ WINED3D_SM5_INPUT_PT_PATCH16
Definition: shader_sm4.c:370
@ WINED3D_SM5_INPUT_PT_PATCH15
Definition: shader_sm4.c:369
@ WINED3D_SM5_INPUT_PT_PATCH1
Definition: shader_sm4.c:355
@ WINED3D_SM5_INPUT_PT_PATCH26
Definition: shader_sm4.c:380
@ WINED3D_SM5_INPUT_PT_PATCH28
Definition: shader_sm4.c:382
#define WINED3D_SM4_ADDRESSING_RELATIVE
Definition: shader_sm4.c:110
const struct wined3d_shader_frontend sm4_shader_frontend
Definition: shader_sm4.c:1748
static void shader_sm4_read_dcl_sampler(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:608
#define WINED3D_SM4_IMMCONST_TYPE_SHIFT
Definition: shader_sm4.c:98
#define WINED3D_SM4_REGISTER_TYPE_MASK
Definition: shader_sm4.c:93
wined3d_sm4_output_primitive_type
Definition: shader_sm4.c:342
@ WINED3D_SM4_OUTPUT_PT_LINESTRIP
Definition: shader_sm4.c:344
@ WINED3D_SM4_OUTPUT_PT_TRIANGLESTRIP
Definition: shader_sm4.c:345
@ WINED3D_SM4_OUTPUT_PT_POINTLIST
Definition: shader_sm4.c:343
static const struct wined3d_sm4_opcode_info * get_opcode_info(enum wined3d_sm4_opcode opcode)
Definition: shader_sm4.c:1160
wined3d_sm4_shader_data_type
Definition: shader_sm4.c:432
@ WINED3D_SM4_SHADER_DATA_MESSAGE
Definition: shader_sm4.c:434
@ WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER
Definition: shader_sm4.c:433
static void map_register(const struct wined3d_sm4_data *priv, struct wined3d_shader_register *reg)
Definition: shader_sm4.c:1172
#define WINED3D_SM4_ADDRESSING_SHIFT1
Definition: shader_sm4.c:83
wined3d_sm4_opcode
Definition: shader_sm4.c:118
@ WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
Definition: shader_sm4.c:208
@ WINED3D_SM5_OP_RCP
Definition: shader_sm4.c:240
@ WINED3D_SM5_OP_DCL_UAV_STRUCTURED
Definition: shader_sm4.c:267
@ WINED3D_SM4_OP_ITOF
Definition: shader_sm4.c:159
@ WINED3D_SM4_OP_DCL_CONSTANT_BUFFER
Definition: shader_sm4.c:204
@ WINED3D_SM4_OP_BREAK
Definition: shader_sm4.c:121
@ WINED3D_SM5_OP_IMM_ATOMIC_EXCH
Definition: shader_sm4.c:293
@ WINED3D_SM4_OP_SAMPLE_C_LZ
Definition: shader_sm4.c:187
@ WINED3D_SM5_OP_HS_JOIN_PHASE
Definition: shader_sm4.c:228
@ WINED3D_SM4_OP_LT
Definition: shader_sm4.c:165
@ WINED3D_SM5_OP_DCL_OUTPUT_CONTROL_POINT_COUNT
Definition: shader_sm4.c:257
@ WINED3D_SM4_OP_MAX
Definition: shader_sm4.c:168
@ WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT
Definition: shader_sm4.c:262
@ WINED3D_SM4_OP_UMUL
Definition: shader_sm4.c:197
@ WINED3D_SM5_OP_DCL_RESOURCE_RAW
Definition: shader_sm4.c:270
@ WINED3D_SM5_OP_SWAPC
Definition: shader_sm4.c:251
@ WINED3D_SM4_OP_EQ
Definition: shader_sm4.c:140
@ WINED3D_SM5_OP_DCL_TGSM_RAW
Definition: shader_sm4.c:268
@ WINED3D_SM4_OP_SAMPLE_B
Definition: shader_sm4.c:190
@ WINED3D_SM5_OP_EMIT_STREAM
Definition: shader_sm4.c:229
@ WINED3D_SM4_OP_LD
Definition: shader_sm4.c:161
@ WINED3D_SM4_OP_CONTINUE
Definition: shader_sm4.c:124
@ WINED3D_SM5_OP_BFI
Definition: shader_sm4.c:249
@ WINED3D_SM5_OP_IMM_ATOMIC_UMAX
Definition: shader_sm4.c:297
@ WINED3D_SM5_OP_ATOMIC_UMIN
Definition: shader_sm4.c:286
@ WINED3D_SM4_OP_SAMPLE_LOD
Definition: shader_sm4.c:188
@ WINED3D_SM4_OP_DERIV_RTY
Definition: shader_sm4.c:129
@ WINED3D_SM4_OP_ROUND_PI
Definition: shader_sm4.c:182
@ WINED3D_SM5_OP_DCL_INTERFACE
Definition: shader_sm4.c:255
@ WINED3D_SM5_OP_STORE_UAV_TYPED
Definition: shader_sm4.c:273
@ WINED3D_SM4_OP_SAMPLE_INFO
Definition: shader_sm4.c:224
@ WINED3D_SM5_OP_LD_RAW
Definition: shader_sm4.c:274
@ WINED3D_SM4_OP_IF
Definition: shader_sm4.c:147
@ WINED3D_SM4_OP_NOP
Definition: shader_sm4.c:174
@ WINED3D_SM4_OP_LD2DMS
Definition: shader_sm4.c:162
@ WINED3D_SM5_OP_F16TOF32
Definition: shader_sm4.c:242
@ WINED3D_SM4_OP_CUT
Definition: shader_sm4.c:126
@ WINED3D_SM4_OP_CASE
Definition: shader_sm4.c:123
@ WINED3D_SM5_OP_ATOMIC_UMAX
Definition: shader_sm4.c:285
@ WINED3D_SM4_OP_SINCOS
Definition: shader_sm4.c:193
@ WINED3D_SM5_OP_ATOMIC_XOR
Definition: shader_sm4.c:280
@ WINED3D_SM4_OP_RET
Definition: shader_sm4.c:178
@ WINED3D_SM5_OP_DCL_FUNCTION_TABLE
Definition: shader_sm4.c:254
@ WINED3D_SM5_OP_SYNC
Definition: shader_sm4.c:299
@ WINED3D_SM5_OP_EVAL_SAMPLE_INDEX
Definition: shader_sm4.c:300
@ WINED3D_SM4_OP_ISHR
Definition: shader_sm4.c:158
@ WINED3D_SM4_OP_DCL_INPUT_PS_SIV
Definition: shader_sm4.c:215
@ WINED3D_SM4_OP_IGE
Definition: shader_sm4.c:149
@ WINED3D_SM4_OP_DP3
Definition: shader_sm4.c:133
@ WINED3D_SM5_OP_UBFE
Definition: shader_sm4.c:247
@ WINED3D_SM4_OP_UMAX
Definition: shader_sm4.c:198
@ WINED3D_SM4_OP_SAMPLE_GRAD
Definition: shader_sm4.c:189
@ WINED3D_SM4_OP_INE
Definition: shader_sm4.c:155
@ WINED3D_SM5_OP_ATOMIC_OR
Definition: shader_sm4.c:279
@ WINED3D_SM4_OP_AND
Definition: shader_sm4.c:120
@ WINED3D_SM5_OP_GATHER4_PO
Definition: shader_sm4.c:238
@ WINED3D_SM4_OP_NE
Definition: shader_sm4.c:173
@ WINED3D_SM4_OP_INEG
Definition: shader_sm4.c:156
@ WINED3D_SM5_OP_GATHER4_PO_C
Definition: shader_sm4.c:239
@ WINED3D_SM5_OP_DERIV_RTX_FINE
Definition: shader_sm4.c:234
@ WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED
Definition: shader_sm4.c:271
@ WINED3D_SM5_OP_DERIV_RTX_COARSE
Definition: shader_sm4.c:233
@ WINED3D_SM4_OP_SAMPLE_C
Definition: shader_sm4.c:186
@ WINED3D_SM4_OP_ISHL
Definition: shader_sm4.c:157
@ WINED3D_SM4_OP_DERIV_RTX
Definition: shader_sm4.c:128
@ WINED3D_SM4_OP_FTOI
Definition: shader_sm4.c:143
@ WINED3D_SM5_OP_BUFINFO
Definition: shader_sm4.c:232
@ WINED3D_SM5_OP_IMM_ATOMIC_ALLOC
Definition: shader_sm4.c:287
@ WINED3D_SM4_OP_LOOP
Definition: shader_sm4.c:164
@ WINED3D_SM4_OP_RSQ
Definition: shader_sm4.c:184
@ WINED3D_SM4_OP_RESINFO
Definition: shader_sm4.c:177
@ WINED3D_SM5_OP_FIRSTBIT_SHI
Definition: shader_sm4.c:246
@ WINED3D_SM4_OP_SAMPLE
Definition: shader_sm4.c:185
@ WINED3D_SM5_OP_DCL_HS_JOIN_PHASE_INSTANCE_COUNT
Definition: shader_sm4.c:263
@ WINED3D_SM5_OP_IMM_ATOMIC_CONSUME
Definition: shader_sm4.c:288
@ WINED3D_SM4_OP_IADD
Definition: shader_sm4.c:146
@ WINED3D_SM5_OP_DCL_STREAM
Definition: shader_sm4.c:252
@ WINED3D_SM5_OP_STORE_STRUCTURED
Definition: shader_sm4.c:277
@ WINED3D_SM5_OP_STORE_RAW
Definition: shader_sm4.c:275
@ WINED3D_SM4_OP_FRC
Definition: shader_sm4.c:142
@ WINED3D_SM5_OP_F32TOF16
Definition: shader_sm4.c:241
@ WINED3D_SM4_OP_IMUL
Definition: shader_sm4.c:154
@ WINED3D_SM5_OP_IMM_ATOMIC_UMIN
Definition: shader_sm4.c:298
@ WINED3D_SM4_OP_ULT
Definition: shader_sm4.c:195
@ WINED3D_SM5_OP_GATHER4_C
Definition: shader_sm4.c:237
@ WINED3D_SM4_OP_DCL_INPUT
Definition: shader_sm4.c:210
@ WINED3D_SM4_OP_LOD
Definition: shader_sm4.c:221
@ WINED3D_SM4_OP_DCL_OUTPUT
Definition: shader_sm4.c:216
@ WINED3D_SM5_OP_ATOMIC_CMP_STORE
Definition: shader_sm4.c:281
@ WINED3D_SM4_OP_MOVC
Definition: shader_sm4.c:171
@ WINED3D_SM4_OP_ROUND_NE
Definition: shader_sm4.c:180
@ WINED3D_SM4_OP_MOV
Definition: shader_sm4.c:170
@ WINED3D_SM4_OP_DIV
Definition: shader_sm4.c:131
@ WINED3D_SM4_OP_MUL
Definition: shader_sm4.c:172
@ WINED3D_SM4_OP_RETC
Definition: shader_sm4.c:179
@ WINED3D_SM5_OP_FIRSTBIT_HI
Definition: shader_sm4.c:244
@ WINED3D_SM4_OP_DCL_INPUT_SIV
Definition: shader_sm4.c:212
@ WINED3D_SM5_OP_HS_CONTROL_POINT_PHASE
Definition: shader_sm4.c:226
@ WINED3D_SM5_OP_ATOMIC_IMIN
Definition: shader_sm4.c:284
@ WINED3D_SM5_OP_IMM_ATOMIC_AND
Definition: shader_sm4.c:290
@ WINED3D_SM4_OP_DCL_INDEX_RANGE
Definition: shader_sm4.c:206
@ WINED3D_SM4_OP_GATHER4
Definition: shader_sm4.c:222
@ WINED3D_SM4_OP_GE
Definition: shader_sm4.c:145
@ WINED3D_SM4_OP_DCL_VERTICES_OUT
Definition: shader_sm4.c:209
@ WINED3D_SM5_OP_BFREV
Definition: shader_sm4.c:250
@ WINED3D_SM4_OP_SAMPLE_POS
Definition: shader_sm4.c:223
@ WINED3D_SM5_OP_DCL_TGSM_STRUCTURED
Definition: shader_sm4.c:269
@ WINED3D_SM4_OP_ENDLOOP
Definition: shader_sm4.c:138
@ WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
Definition: shader_sm4.c:207
@ WINED3D_SM5_OP_LD_STRUCTURED
Definition: shader_sm4.c:276
@ WINED3D_SM4_OP_UGE
Definition: shader_sm4.c:196
@ WINED3D_SM5_OP_DCL_UAV_RAW
Definition: shader_sm4.c:266
@ WINED3D_SM4_OP_EMIT
Definition: shader_sm4.c:136
@ WINED3D_SM5_OP_HS_FORK_PHASE
Definition: shader_sm4.c:227
@ WINED3D_SM4_OP_DCL_OUTPUT_SIV
Definition: shader_sm4.c:217
@ WINED3D_SM5_OP_DERIV_RTY_FINE
Definition: shader_sm4.c:236
@ WINED3D_SM4_OP_LABEL
Definition: shader_sm4.c:160
@ WINED3D_SM5_OP_DCL_TESSELLATOR_PARTITIONING
Definition: shader_sm4.c:259
@ WINED3D_SM4_OP_IMAX
Definition: shader_sm4.c:152
@ WINED3D_SM4_OP_ENDSWITCH
Definition: shader_sm4.c:139
@ WINED3D_SM4_OP_ELSE
Definition: shader_sm4.c:135
@ WINED3D_SM5_OP_IMM_ATOMIC_IADD
Definition: shader_sm4.c:289
@ WINED3D_SM5_OP_HS_DECLS
Definition: shader_sm4.c:225
@ WINED3D_SM4_OP_MAD
Definition: shader_sm4.c:166
@ WINED3D_SM4_OP_LOG
Definition: shader_sm4.c:163
@ WINED3D_SM5_OP_DCL_TESSELLATOR_DOMAIN
Definition: shader_sm4.c:258
@ WINED3D_SM5_OP_DCL_FUNCTION_BODY
Definition: shader_sm4.c:253
@ WINED3D_SM5_OP_CUT_STREAM
Definition: shader_sm4.c:230
@ WINED3D_SM4_OP_DCL_SAMPLER
Definition: shader_sm4.c:205
@ WINED3D_SM4_OP_UDIV
Definition: shader_sm4.c:194
@ WINED3D_SM4_OP_UMIN
Definition: shader_sm4.c:199
@ WINED3D_SM5_OP_IMM_ATOMIC_IMAX
Definition: shader_sm4.c:295
@ WINED3D_SM4_OP_DISCARD
Definition: shader_sm4.c:130
@ WINED3D_SM4_OP_DCL_INPUT_PS_SGV
Definition: shader_sm4.c:214
@ WINED3D_SM5_OP_IMM_ATOMIC_OR
Definition: shader_sm4.c:291
@ WINED3D_SM5_OP_DCL_HS_MAX_TESSFACTOR
Definition: shader_sm4.c:261
@ WINED3D_SM5_OP_LD_UAV_TYPED
Definition: shader_sm4.c:272
@ WINED3D_SM5_OP_DERIV_RTY_COARSE
Definition: shader_sm4.c:235
@ WINED3D_SM5_OP_DCL_GS_INSTANCES
Definition: shader_sm4.c:301
@ WINED3D_SM5_OP_IMM_ATOMIC_CMP_EXCH
Definition: shader_sm4.c:294
@ WINED3D_SM4_OP_DEFAULT
Definition: shader_sm4.c:127
@ WINED3D_SM4_OP_DCL_GLOBAL_FLAGS
Definition: shader_sm4.c:220
@ WINED3D_SM5_OP_COUNTBITS
Definition: shader_sm4.c:243
@ WINED3D_SM5_OP_FIRSTBIT_LO
Definition: shader_sm4.c:245
@ WINED3D_SM4_OP_ROUND_NI
Definition: shader_sm4.c:181
@ WINED3D_SM4_OP_DCL_TEMPS
Definition: shader_sm4.c:218
@ WINED3D_SM4_OP_XOR
Definition: shader_sm4.c:202
@ WINED3D_SM5_OP_ATOMIC_IMAX
Definition: shader_sm4.c:283
@ WINED3D_SM4_OP_CONTINUEC
Definition: shader_sm4.c:125
@ WINED3D_SM4_OP_EXP
Definition: shader_sm4.c:141
@ WINED3D_SM5_OP_FCALL
Definition: shader_sm4.c:231
@ WINED3D_SM5_OP_DCL_THREAD_GROUP
Definition: shader_sm4.c:264
@ WINED3D_SM5_OP_DCL_TESSELLATOR_OUTPUT_PRIMITIVE
Definition: shader_sm4.c:260
@ WINED3D_SM4_OP_DP2
Definition: shader_sm4.c:132
@ WINED3D_SM4_OP_SWITCH
Definition: shader_sm4.c:192
@ WINED3D_SM4_OP_USHR
Definition: shader_sm4.c:200
@ WINED3D_SM4_OP_DCL_INPUT_PS
Definition: shader_sm4.c:213
@ WINED3D_SM4_OP_DP4
Definition: shader_sm4.c:134
@ WINED3D_SM4_OP_IMIN
Definition: shader_sm4.c:153
@ WINED3D_SM4_OP_DCL_RESOURCE
Definition: shader_sm4.c:203
@ WINED3D_SM4_OP_MIN
Definition: shader_sm4.c:167
@ WINED3D_SM4_OP_DCL_INPUT_SGV
Definition: shader_sm4.c:211
@ WINED3D_SM5_OP_IMM_ATOMIC_IMIN
Definition: shader_sm4.c:296
@ WINED3D_SM4_OP_DCL_INDEXABLE_TEMP
Definition: shader_sm4.c:219
@ WINED3D_SM5_OP_DCL_INPUT_CONTROL_POINT_COUNT
Definition: shader_sm4.c:256
@ WINED3D_SM4_OP_ILT
Definition: shader_sm4.c:150
@ WINED3D_SM4_OP_NOT
Definition: shader_sm4.c:175
@ WINED3D_SM5_OP_ATOMIC_AND
Definition: shader_sm4.c:278
@ WINED3D_SM4_OP_SHADER_DATA
Definition: shader_sm4.c:169
@ WINED3D_SM4_OP_IEQ
Definition: shader_sm4.c:148
@ WINED3D_SM4_OP_FTOU
Definition: shader_sm4.c:144
@ WINED3D_SM4_OP_IMAD
Definition: shader_sm4.c:151
@ WINED3D_SM4_OP_UTOF
Definition: shader_sm4.c:201
@ WINED3D_SM4_OP_ROUND_Z
Definition: shader_sm4.c:183
@ WINED3D_SM4_OP_ENDIF
Definition: shader_sm4.c:137
@ WINED3D_SM4_OP_SQRT
Definition: shader_sm4.c:191
@ WINED3D_SM4_OP_ADD
Definition: shader_sm4.c:119
@ WINED3D_SM4_OP_OR
Definition: shader_sm4.c:176
@ WINED3D_SM5_OP_DCL_UAV_TYPED
Definition: shader_sm4.c:265
@ WINED3D_SM5_OP_ATOMIC_IADD
Definition: shader_sm4.c:282
@ WINED3D_SM5_OP_IBFE
Definition: shader_sm4.c:248
@ WINED3D_SM4_OP_BREAKC
Definition: shader_sm4.c:122
@ WINED3D_SM5_OP_IMM_ATOMIC_XOR
Definition: shader_sm4.c:292
static const struct wined3d_sm4_opcode_info opcode_table[]
Definition: shader_sm4.c:883
static void shader_sm5_read_dcl_resource_raw(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:860
static struct wined3d_shader_src_param * get_src_param(struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:1319
#define WINED3D_SM5_SYNC_FLAGS_SHIFT
Definition: shader_sm4.c:73
#define WINED3D_SM4_REGISTER_ORDER_MASK
Definition: shader_sm4.c:90
#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT
Definition: shader_sm4.c:64
static void shader_sm4_read_dcl_index_range(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:618
static void shader_sm5_read_dcl_tessellator_output_primitive(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:783
#define WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT
Definition: shader_sm4.c:40
static void shader_sm5_read_fcall(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:725
#define WINED3D_SM4_GLOBAL_FLAGS_MASK
Definition: shader_sm4.c:62
static void shader_sm4_free(void *data)
Definition: shader_sm4.c:1306
#define WINED3D_SM4_REGISTER_ORDER_SHIFT
Definition: shader_sm4.c:89
#define WINED3D_SM4_PRIMITIVE_TYPE_MASK
Definition: shader_sm4.c:47
#define WINED3D_SM4_RESOURCE_TYPE_SHIFT
Definition: shader_sm4.c:43
static void shader_sm5_read_dcl_function_body(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:733
#define WINED3D_SM4_IMMCONST_TYPE_MASK
Definition: shader_sm4.c:99
static BOOL shader_sm4_read_dst_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end, enum wined3d_data_type data_type, struct wined3d_shader_dst_param *dst_param)
Definition: shader_sm4.c:1560
static void shader_sm4_read_instruction_modifier(DWORD modifier, struct wined3d_shader_instruction *ins)
Definition: shader_sm4.c:1592
static void shader_sm5_read_control_point_count(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:759
static void shader_sm4_read_declaration_count(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:668
static BOOL shader_sm4_is_end(void *data, const DWORD **ptr)
Definition: shader_sm4.c:1742
#define WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT
Definition: shader_sm4.c:37
static void * shader_sm4_init(const DWORD *byte_code, size_t byte_code_size, const struct wined3d_shader_signature *output_signature)
Definition: shader_sm4.c:1221
#define WINED3D_SM4_PRIMITIVE_TYPE_SHIFT
Definition: shader_sm4.c:46
#define WINED3D_SM4_INSTRUCTION_FLAGS_MASK
Definition: shader_sm4.c:41
#define WINED3D_SM5_TESSELLATOR_SHIFT
Definition: shader_sm4.c:76
#define WINED3D_SM4_SAMPLER_MODE_SHIFT
Definition: shader_sm4.c:52
static void shader_sm5_read_dcl_tgsm_raw(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:827
static BOOL shader_sm4_read_reg_idx(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end, DWORD addressing, struct wined3d_shader_register_index *reg_idx)
Definition: shader_sm4.c:1349
#define WINED3D_SM5_FP_TABLE_COUNT_MASK
Definition: shader_sm4.c:68
#define WINED3D_SM4_SWIZZLE_SHIFT
Definition: shader_sm4.c:104
#define WINED3D_SM4_OPCODE_MASK
Definition: shader_sm4.c:79
#define WINED3D_SM4_AOFFIMMI_V_SHIFT
Definition: shader_sm4.c:32
#define WINED3D_SM4_INSTRUCTION_FLAG_SATURATE
Definition: shader_sm4.c:113
#define WINED3D_SM4_WRITEMASK_SHIFT
Definition: shader_sm4.c:101
static void shader_sm5_read_dcl_thread_group(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:798
static enum wined3d_primitive_type output_primitive_type_table[]
Definition: shader_sm4.c:468
wined3d_sm4_immconst_type
Definition: shader_sm4.c:397
@ WINED3D_SM4_IMMCONST_VEC4
Definition: shader_sm4.c:399
@ WINED3D_SM4_IMMCONST_SCALAR
Definition: shader_sm4.c:398
static void shader_sm4_read_declaration_register_semantic(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:682
wined3d_sm4_register_type
Definition: shader_sm4.c:305
@ WINED3D_SM4_RT_TEMP
Definition: shader_sm4.c:306
@ WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL
Definition: shader_sm4.c:338
@ WINED3D_SM4_RT_INPUT
Definition: shader_sm4.c:307
@ WINED3D_SM5_RT_THREAD_ID
Definition: shader_sm4.c:331
@ WINED3D_SM5_RT_THREAD_GROUP_ID
Definition: shader_sm4.c:332
@ WINED3D_SM5_RT_FUNCTION_BODY
Definition: shader_sm4.c:320
@ WINED3D_SM4_RT_OMASK
Definition: shader_sm4.c:318
@ WINED3D_SM5_RT_PATCH_CONSTANT_DATA
Definition: shader_sm4.c:327
@ WINED3D_SM4_RT_SAMPLER
Definition: shader_sm4.c:311
@ WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL
Definition: shader_sm4.c:337
@ WINED3D_SM5_RT_GS_INSTANCE_ID
Definition: shader_sm4.c:336
@ WINED3D_SM4_RT_NULL
Definition: shader_sm4.c:317
@ WINED3D_SM5_RT_FORK_INSTANCE_ID
Definition: shader_sm4.c:323
@ WINED3D_SM4_RT_CONSTBUFFER
Definition: shader_sm4.c:313
@ WINED3D_SM5_RT_JOIN_INSTANCE_ID
Definition: shader_sm4.c:324
@ WINED3D_SM4_RT_IMMCONST
Definition: shader_sm4.c:310
@ WINED3D_SM4_RT_PRIMID
Definition: shader_sm4.c:315
@ WINED3D_SM5_RT_INPUT_CONTROL_POINT
Definition: shader_sm4.c:325
@ WINED3D_SM5_RT_LOCAL_THREAD_INDEX
Definition: shader_sm4.c:335
@ WINED3D_SM4_RT_INDEXABLE_TEMP
Definition: shader_sm4.c:309
@ WINED3D_SM4_RT_OUTPUT
Definition: shader_sm4.c:308
@ WINED3D_SM5_RT_SHARED_MEMORY
Definition: shader_sm4.c:330
@ WINED3D_SM5_RT_LOCAL_THREAD_ID
Definition: shader_sm4.c:333
@ WINED3D_SM5_RT_OUTPUT_CONTROL_POINT
Definition: shader_sm4.c:326
@ WINED3D_SM5_RT_DOMAIN_LOCATION
Definition: shader_sm4.c:328
@ WINED3D_SM5_RT_STREAM
Definition: shader_sm4.c:319
@ WINED3D_SM5_RT_FUNCTION_POINTER
Definition: shader_sm4.c:321
@ WINED3D_SM5_RT_OUTPUT_CONTROL_POINT_ID
Definition: shader_sm4.c:322
@ WINED3D_SM5_RT_COVERAGE
Definition: shader_sm4.c:334
@ WINED3D_SM5_RT_UAV
Definition: shader_sm4.c:329
@ WINED3D_SM4_RT_IMMCONSTBUFFER
Definition: shader_sm4.c:314
@ WINED3D_SM4_RT_DEPTHOUT
Definition: shader_sm4.c:316
@ WINED3D_SM4_RT_RESOURCE
Definition: shader_sm4.c:312
#define WINED3D_SM4_REGISTER_MODIFIER
Definition: shader_sm4.c:81
#define WINED3D_SM4_ADDRESSING_SHIFT0
Definition: shader_sm4.c:86
#define WINED3D_SM5_TESSELLATOR_MASK
Definition: shader_sm4.c:77
#define WINED3D_SM4_AOFFIMMI_U_SHIFT
Definition: shader_sm4.c:30
#define WINED3D_SM4_INSTRUCTION_LENGTH_MASK
Definition: shader_sm4.c:38
#define WINED3D_SM4_ADDRESSING_MASK0
Definition: shader_sm4.c:87
static void shader_sm4_read_dcl_output_topology(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:627
static void shader_sm4_read_dcl_global_flags(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:718
static void shader_sm5_read_dcl_tessellator_domain(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:767
#define WINED3D_SM4_CONDITIONAL_NZ
Definition: shader_sm4.c:115
wined3d_sm4_data_type
Definition: shader_sm4.c:417
@ WINED3D_SM4_DATA_INT
Definition: shader_sm4.c:420
@ WINED3D_SM4_DATA_SNORM
Definition: shader_sm4.c:419
@ WINED3D_SM4_DATA_FLOAT
Definition: shader_sm4.c:422
@ WINED3D_SM4_DATA_UNORM
Definition: shader_sm4.c:418
@ WINED3D_SM4_DATA_UINT
Definition: shader_sm4.c:421
static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins)
Definition: shader_sm4.c:1623
static enum wined3d_shader_resource_type resource_type_table[]
Definition: shader_sm4.c:490
static void shader_sm4_read_dcl_input_primitive(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:643
#define WINED3D_SM4_AOFFIMMI_V_MASK
Definition: shader_sm4.c:33
#define WINED3D_SM5_FP_ARRAY_SIZE_SHIFT
Definition: shader_sm4.c:67
#define WINED3D_SM4_INTERPOLATION_MODE_SHIFT
Definition: shader_sm4.c:58
#define WINED3D_SM4_ADDRESSING_OFFSET
Definition: shader_sm4.c:111
wined3d_sm4_swizzle_type
Definition: shader_sm4.c:390
@ WINED3D_SM4_SWIZZLE_NONE
Definition: shader_sm4.c:391
@ WINED3D_SM4_SWIZZLE_SCALAR
Definition: shader_sm4.c:393
@ WINED3D_SM4_SWIZZLE_VEC4
Definition: shader_sm4.c:392
#define WINED3D_SM5_UAV_FLAGS_SHIFT
Definition: shader_sm4.c:70
#define WINED3D_SM4_AOFFIMMI_U_MASK
Definition: shader_sm4.c:31
#define WINED3D_SM4_SHADER_DATA_TYPE_MASK
Definition: shader_sm4.c:56
#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK
Definition: shader_sm4.c:65
#define WINED3D_SM4_INTERPOLATION_MODE_MASK
Definition: shader_sm4.c:59
#define WINED3D_SM4_REGISTER_TYPE_SHIFT
Definition: shader_sm4.c:92
#define WINED3D_SM4_RESOURCE_TYPE_MASK
Definition: shader_sm4.c:44
#define WINED3D_SM5_SYNC_FLAGS_MASK
Definition: shader_sm4.c:74
#define WINED3D_SM4_VERSION_MINOR(version)
Definition: shader_sm4.c:108
static enum wined3d_data_type map_data_type(char t)
Definition: shader_sm4.c:1197
#define WINED3D_SM4_ADDRESSING_MASK1
Definition: shader_sm4.c:84
static void shader_sm4_read_dcl_input_ps(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:691
#define WINED3D_SM4_MODIFIER_AOFFIMMI
Definition: shader_sm4.c:29
static void shader_sm5_read_dcl_function_table(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:740
#define WINED3D_SM4_AOFFIMMI_W_MASK
Definition: shader_sm4.c:35
static void shader_sm4_read_conditional_op(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:520
static void shader_sm5_read_dcl_resource_structured(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:849
static enum wined3d_data_type data_type_table[]
Definition: shader_sm4.c:505
static void shader_sm4_read_dcl_constant_buffer(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:599
static enum wined3d_shader_register_type register_type_table[]
Definition: shader_sm4.c:1116
static BOOL shader_sm4_read_param(struct wined3d_sm4_data *priv, const DWORD **ptr, const DWORD *end, enum wined3d_data_type data_type, struct wined3d_shader_register *param, enum wined3d_shader_src_modifier *modifier)
Definition: shader_sm4.c:1377
static void shader_sm5_read_dcl_interface(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:748
#define WINED3D_SM4_VERSION_MAJOR(version)
Definition: shader_sm4.c:107
#define WINED3D_SM4_WRITEMASK_MASK
Definition: shader_sm4.c:102
#define WINED3D_SM4_INSTRUCTION_MODIFIER
Definition: shader_sm4.c:27
static void shader_sm5_read_dcl_uav_raw(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:807
#define WINED3D_SM4_SWIZZLE_TYPE_MASK
Definition: shader_sm4.c:96
static void shader_sm4_read_dcl_resource(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:558
static void shader_sm4_read_dcl_input_ps_siv(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:699
static void shader_sm5_read_dcl_tessellator_partitioning(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:775
#define WINED3D_SM4_AOFFIMMI_W_SHIFT
Definition: shader_sm4.c:34
static void shader_sm4_read_shader_data(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:529
static void shader_sm4_read_declaration_dst(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:675
#define WINED3D_SM4_SWIZZLE_TYPE_SHIFT
Definition: shader_sm4.c:95
static enum wined3d_primitive_type input_primitive_type_table[]
Definition: shader_sm4.c:478
#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT
Definition: shader_sm4.c:61
#define TRACE(s)
Definition: solgame.cpp:4
Definition: list.h:15
struct wined3d_shader_register reg
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
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_immediate_constant_buffer * icb
struct wined3d_shader_texel_offset texel_offset
union wined3d_shader_instruction::@275 declaration
struct wined3d_shader_thread_group_size thread_group_size
struct wined3d_shader_register_semantic register_semantic
const struct wined3d_shader_src_param * rel_addr
struct wined3d_shader_signature_element * elements
Definition: wined3d.h:2046
Definition: shader_sm4.c:438
struct list entry
Definition: shader_sm4.c:439
enum wined3d_shader_src_modifier modifiers
struct wined3d_shader_register reg
struct list src_free
Definition: shader_sm4.c:452
struct wined3d_shader_immediate_constant_buffer icb
Definition: shader_sm4.c:454
struct wined3d_shader_dst_param dst_param[2]
Definition: shader_sm4.c:451
struct wined3d_shader_src_param src_param[5]
Definition: shader_sm4.c:450
unsigned int output_map[MAX_REG_OUTPUT]
Definition: shader_sm4.c:448
struct wined3d_shader_version shader_version
Definition: shader_sm4.c:445
const DWORD * start
Definition: shader_sm4.c:446
struct list src
Definition: shader_sm4.c:453
const DWORD * end
Definition: shader_sm4.c:446
const char * dst_info
Definition: shader_sm4.c:461
const char * src_info
Definition: shader_sm4.c:462
enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx
Definition: shader_sm4.c:460
void(* read_opcode_func)(struct wined3d_shader_instruction *ins, DWORD opcode, DWORD opcode_token, const DWORD *tokens, unsigned int token_count, struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:463
enum wined3d_sm4_opcode opcode
Definition: shader_sm4.c:459
#define LIST_ENTRY(type)
Definition: queue.h:175
ULONG_PTR SIZE_T
Definition: typedefs.h:80
wined3d_primitive_type
Definition: wined3d.h:70
@ WINED3D_PT_LINELIST
Definition: wined3d.h:73
@ WINED3D_PT_UNDEFINED
Definition: wined3d.h:71
@ WINED3D_PT_PATCH
Definition: wined3d.h:82
@ WINED3D_PT_POINTLIST
Definition: wined3d.h:72
@ WINED3D_PT_TRIANGLELIST_ADJ
Definition: wined3d.h:80
@ WINED3D_PT_LINELIST_ADJ
Definition: wined3d.h:78
@ WINED3D_PT_TRIANGLESTRIP
Definition: wined3d.h:76
@ WINED3D_PT_LINESTRIP
Definition: wined3d.h:74
@ WINED3D_PT_TRIANGLELIST
Definition: wined3d.h:75
#define MAX_REG_OUTPUT
wined3d_data_type
@ WINED3D_DATA_UINT
@ WINED3D_DATA_INT
@ WINED3D_DATA_UAV
@ WINED3D_DATA_SAMPLER
@ WINED3D_DATA_SNORM
@ WINED3D_DATA_UNORM
@ WINED3D_DATA_RESOURCE
@ WINED3D_DATA_FLOAT
@ WINED3D_DATA_OPAQUE
WINED3D_SHADER_INSTRUCTION_HANDLER
@ WINED3DSIH_DSX_COARSE
@ WINED3DSIH_DCL_TESSELLATOR_PARTITIONING
@ WINED3DSIH_MOVC
@ WINED3DSIH_ULT
@ WINED3DSIH_SINCOS
@ WINED3DSIH_DCL_TEMPS
@ WINED3DSIH_DP4
@ WINED3DSIH_GATHER4_PO_C
@ WINED3DSIH_ATOMIC_XOR
@ WINED3DSIH_MUL
@ WINED3DSIH_DSX_FINE
@ WINED3DSIH_DCL_OUTPUT
@ WINED3DSIH_DCL_FUNCTION_TABLE
@ WINED3DSIH_DCL_INPUT_SIV
@ WINED3DSIH_IMM_ATOMIC_XOR
@ WINED3DSIH_IEQ
@ WINED3DSIH_DCL_INPUT
@ WINED3DSIH_CONTINUE
@ WINED3DSIH_CONTINUEP
@ WINED3DSIH_FIRSTBIT_HI
@ WINED3DSIH_IADD
@ WINED3DSIH_SAMPLE_B
@ WINED3DSIH_DCL_CONSTANT_BUFFER
@ WINED3DSIH_ROUND_Z
@ WINED3DSIH_DCL_INTERFACE
@ WINED3DSIH_IMM_ATOMIC_IADD
@ WINED3DSIH_LOOP
@ WINED3DSIH_DSY_COARSE
@ WINED3DSIH_SAMPLE_LOD
@ WINED3DSIH_SYNC
@ WINED3DSIH_ISHL
@ WINED3DSIH_SWITCH
@ WINED3DSIH_SWAPC
@ WINED3DSIH_RCP
@ WINED3DSIH_F16TOF32
@ WINED3DSIH_IMIN
@ WINED3DSIH_STORE_STRUCTURED
@ WINED3DSIH_NOP
@ WINED3DSIH_ENDIF
@ WINED3DSIH_IMM_ATOMIC_UMAX
@ WINED3DSIH_STORE_UAV_TYPED
@ WINED3DSIH_FTOI
@ WINED3DSIH_LD
@ WINED3DSIH_EXP
@ WINED3DSIH_ATOMIC_IMAX
@ WINED3DSIH_DEFAULT
@ WINED3DSIH_UMAX
@ WINED3DSIH_OR
@ WINED3DSIH_ROUND_PI
@ WINED3DSIH_SAMPLE_GRAD
@ WINED3DSIH_ATOMIC_AND
@ WINED3DSIH_DCL_INPUT_SGV
@ WINED3DSIH_IF
@ WINED3DSIH_ATOMIC_UMIN
@ WINED3DSIH_UMIN
@ WINED3DSIH_ATOMIC_OR
@ WINED3DSIH_DCL_INPUT_PS_SGV
@ WINED3DSIH_LD2DMS
@ WINED3DSIH_LOG
@ WINED3DSIH_SAMPLE
@ WINED3DSIH_MOV
@ WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER
@ WINED3DSIH_HS_DECLS
@ WINED3DSIH_AND
@ WINED3DSIH_DCL_THREAD_GROUP
@ WINED3DSIH_UMUL
@ WINED3DSIH_DCL_OUTPUT_SIV
@ WINED3DSIH_DCL_INDEX_RANGE
@ WINED3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE
@ WINED3DSIH_ATOMIC_CMP_STORE
@ WINED3DSIH_LD_RAW
@ WINED3DSIH_GATHER4
@ WINED3DSIH_UTOF
@ WINED3DSIH_ELSE
@ WINED3DSIH_HS_CONTROL_POINT_PHASE
@ WINED3DSIH_LD_STRUCTURED
@ WINED3DSIH_ENDSWITCH
@ WINED3DSIH_ATOMIC_IADD
@ WINED3DSIH_RSQ
@ WINED3DSIH_SQRT
@ WINED3DSIH_IMM_ATOMIC_AND
@ WINED3DSIH_IMM_ATOMIC_CONSUME
@ WINED3DSIH_EQ
@ WINED3DSIH_IMM_ATOMIC_UMIN
@ WINED3DSIH_ADD
@ WINED3DSIH_HS_FORK_PHASE
@ WINED3DSIH_BREAK
@ WINED3DSIH_NOT
@ WINED3DSIH_XOR
@ WINED3DSIH_BFREV
@ WINED3DSIH_FRC
@ WINED3DSIH_SAMPLE_INFO
@ WINED3DSIH_DSX
@ WINED3DSIH_DCL
@ WINED3DSIH_COUNTBITS
@ WINED3DSIH_IMM_ATOMIC_CMP_EXCH
@ WINED3DSIH_DCL_VERTICES_OUT
@ WINED3DSIH_HS_JOIN_PHASE
@ WINED3DSIH_USHR
@ WINED3DSIH_F32TOF16
@ WINED3DSIH_EMIT
@ WINED3DSIH_ILT
@ WINED3DSIH_DCL_OUTPUT_TOPOLOGY
@ WINED3DSIH_DCL_HS_MAX_TESSFACTOR
@ WINED3DSIH_UBFE
@ WINED3DSIH_ATOMIC_IMIN
@ WINED3DSIH_BREAKP
@ WINED3DSIH_BFI
@ WINED3DSIH_DCL_SAMPLER
@ WINED3DSIH_DCL_GS_INSTANCES
@ WINED3DSIH_DCL_TGSM_RAW
@ WINED3DSIH_DCL_UAV_TYPED
@ WINED3DSIH_MIN
@ WINED3DSIH_TABLE_SIZE
@ WINED3DSIH_GE
@ WINED3DSIH_DP3
@ WINED3DSIH_CUT
@ WINED3DSIH_EMIT_STREAM
@ WINED3DSIH_SAMPLE_POS
@ WINED3DSIH_FTOU
@ WINED3DSIH_RET
@ WINED3DSIH_IMAX
@ WINED3DSIH_ITOF
@ WINED3DSIH_IGE
@ WINED3DSIH_IMM_ATOMIC_IMAX
@ WINED3DSIH_SAMPLE_C_LZ
@ WINED3DSIH_LOD
@ WINED3DSIH_ENDLOOP
@ WINED3DSIH_DSY
@ WINED3DSIH_DCL_INPUT_PS
@ WINED3DSIH_GATHER4_C
@ WINED3DSIH_LD_UAV_TYPED
@ WINED3DSIH_INEG
@ WINED3DSIH_GATHER4_PO
@ WINED3DSIH_DCL_UAV_STRUCTURED
@ WINED3DSIH_LT
@ WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT
@ WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT
@ WINED3DSIH_DCL_GLOBAL_FLAGS
@ WINED3DSIH_TEXKILL
@ WINED3DSIH_UDIV
@ WINED3DSIH_EVAL_SAMPLE_INDEX
@ WINED3DSIH_ROUND_NI
@ WINED3DSIH_INE
@ WINED3DSIH_IBFE
@ WINED3DSIH_BUFINFO
@ WINED3DSIH_STORE_RAW
@ WINED3DSIH_IMM_ATOMIC_ALLOC
@ WINED3DSIH_IMM_ATOMIC_IMIN
@ WINED3DSIH_UGE
@ WINED3DSIH_MAD
@ WINED3DSIH_CUT_STREAM
@ WINED3DSIH_DCL_TESSELLATOR_DOMAIN
@ WINED3DSIH_LABEL
@ WINED3DSIH_IMM_ATOMIC_EXCH
@ WINED3DSIH_FCALL
@ WINED3DSIH_CASE
@ WINED3DSIH_IMUL
@ WINED3DSIH_IMAD
@ WINED3DSIH_NE
@ WINED3DSIH_FIRSTBIT_SHI
@ WINED3DSIH_RESINFO
@ WINED3DSIH_DCL_INPUT_PS_SIV
@ WINED3DSIH_DCL_TGSM_STRUCTURED
@ WINED3DSIH_FIRSTBIT_LO
@ WINED3DSIH_SAMPLE_C
@ WINED3DSIH_ROUND_NE
@ WINED3DSIH_DCL_UAV_RAW
@ WINED3DSIH_DCL_FUNCTION_BODY
@ WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT
@ WINED3DSIH_IMM_ATOMIC_OR
@ WINED3DSIH_DCL_STREAM
@ WINED3DSIH_DIV
@ WINED3DSIH_ATOMIC_UMAX
@ WINED3DSIH_DCL_INDEXABLE_TEMP
@ WINED3DSIH_DCL_RESOURCE_RAW
@ WINED3DSIH_MAX
@ WINED3DSIH_DCL_INPUT_PRIMITIVE
@ WINED3DSIH_RETP
@ WINED3DSIH_ISHR
@ WINED3DSIH_DCL_HS_JOIN_PHASE_INSTANCE_COUNT
@ WINED3DSIH_DP2
@ WINED3DSIH_DSY_FINE
@ WINED3DSIH_DCL_RESOURCE_STRUCTURED
#define WINED3D_SM5_DS
wined3d_shader_src_modifier
@ WINED3DSPSM_ABSNEG
@ WINED3DSPSM_ABS
@ WINED3DSPSM_NONE
@ WINED3DSPSM_NEG
#define WINED3D_SM4_PS
wined3d_shader_dst_modifier
@ WINED3DSPDM_SATURATE
@ WINED3DSPDM_NONE
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_NONE
@ 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 MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE
#define WINED3DSI_INDEXED_DYNAMIC
wined3d_shader_register_type
@ WINED3DSPR_RESOURCE
@ WINED3DSPR_COLOROUT
@ WINED3DSPR_PRIMID
@ WINED3DSPR_LOCALTHREADID
@ WINED3DSPR_FUNCTIONPOINTER
@ WINED3DSPR_IMMCONST
@ WINED3DSPR_OUTPOINTID
@ WINED3DSPR_OUTCONTROLPOINT
@ WINED3DSPR_INCONTROLPOINT
@ WINED3DSPR_TESSCOORD
@ WINED3DSPR_NULL
@ WINED3DSPR_GSINSTID
@ WINED3DSPR_THREADGROUPID
@ WINED3DSPR_JOININSTID
@ WINED3DSPR_DEPTHOUTGE
@ WINED3DSPR_UAV
@ WINED3DSPR_SAMPLER
@ WINED3DSPR_CONSTBUFFER
@ WINED3DSPR_FUNCTIONBODY
@ WINED3DSPR_IDXTEMP
@ WINED3DSPR_STREAM
@ WINED3DSPR_PATCHCONST
@ WINED3DSPR_OUTPUT
@ WINED3DSPR_INPUT
@ WINED3DSPR_GROUPSHAREDMEM
@ WINED3DSPR_SAMPLEMASK
@ WINED3DSPR_TEMP
@ WINED3DSPR_DEPTHOUT
@ WINED3DSPR_THREADID
@ WINED3DSPR_COVERAGE
@ WINED3DSPR_LOCALTHREADINDEX
@ WINED3DSPR_FORKINSTID
@ WINED3DSPR_DEPTHOUTLE
@ WINED3DSPR_IMMCONSTBUFFER
#define WINED3DSP_NOSWIZZLE
@ WINED3D_IMMCONST_VEC4
@ WINED3D_IMMCONST_SCALAR
@ 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 WINED3D_SM5_HS
#define WINED3D_SM4_GS
#define WINED3D_SM4_VS
#define WINED3D_SM5_CS
@ WINED3D_SHADER_CONDITIONAL_OP_NZ
@ WINED3D_SHADER_CONDITIONAL_OP_Z