ReactOS 0.4.16-dev-329-g9223134
shader_sm4.c File Reference
#include "config.h"
#include "wine/port.h"
#include "wined3d_private.h"
Include dependency graph for shader_sm4.c:

Go to the source code of this file.

Classes

struct  wined3d_shader_src_param_entry
 
struct  wined3d_sm4_data
 
struct  wined3d_sm4_opcode_info
 

Macros

#define WINED3D_SM4_INSTRUCTION_MODIFIER   (0x1u << 31)
 
#define WINED3D_SM4_MODIFIER_AOFFIMMI   0x1
 
#define WINED3D_SM4_AOFFIMMI_U_SHIFT   9
 
#define WINED3D_SM4_AOFFIMMI_U_MASK   (0xfu << WINED3D_SM4_AOFFIMMI_U_SHIFT)
 
#define WINED3D_SM4_AOFFIMMI_V_SHIFT   13
 
#define WINED3D_SM4_AOFFIMMI_V_MASK   (0xfu << WINED3D_SM4_AOFFIMMI_V_SHIFT)
 
#define WINED3D_SM4_AOFFIMMI_W_SHIFT   17
 
#define WINED3D_SM4_AOFFIMMI_W_MASK   (0xfu << WINED3D_SM4_AOFFIMMI_W_SHIFT)
 
#define WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT   24
 
#define WINED3D_SM4_INSTRUCTION_LENGTH_MASK   (0x1fu << WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT)
 
#define WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT   11
 
#define WINED3D_SM4_INSTRUCTION_FLAGS_MASK   (0x7u << WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT)
 
#define WINED3D_SM4_RESOURCE_TYPE_SHIFT   11
 
#define WINED3D_SM4_RESOURCE_TYPE_MASK   (0xfu << WINED3D_SM4_RESOURCE_TYPE_SHIFT)
 
#define WINED3D_SM4_PRIMITIVE_TYPE_SHIFT   11
 
#define WINED3D_SM4_PRIMITIVE_TYPE_MASK   (0x3fu << WINED3D_SM4_PRIMITIVE_TYPE_SHIFT)
 
#define WINED3D_SM4_INDEX_TYPE_SHIFT   11
 
#define WINED3D_SM4_INDEX_TYPE_MASK   (0x1u << WINED3D_SM4_INDEX_TYPE_SHIFT)
 
#define WINED3D_SM4_SAMPLER_MODE_SHIFT   11
 
#define WINED3D_SM4_SAMPLER_MODE_MASK   (0xfu << WINED3D_SM4_SAMPLER_MODE_SHIFT)
 
#define WINED3D_SM4_SHADER_DATA_TYPE_SHIFT   11
 
#define WINED3D_SM4_SHADER_DATA_TYPE_MASK   (0xfu << WINED3D_SM4_SHADER_DATA_TYPE_SHIFT)
 
#define WINED3D_SM4_INTERPOLATION_MODE_SHIFT   11
 
#define WINED3D_SM4_INTERPOLATION_MODE_MASK   (0xfu << WINED3D_SM4_INTERPOLATION_MODE_SHIFT)
 
#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT   11
 
#define WINED3D_SM4_GLOBAL_FLAGS_MASK   (0xffu << WINED3D_SM4_GLOBAL_FLAGS_SHIFT)
 
#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT   11
 
#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK   (0xffu << WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT)
 
#define WINED3D_SM5_FP_ARRAY_SIZE_SHIFT   16
 
#define WINED3D_SM5_FP_TABLE_COUNT_MASK   0xffffu
 
#define WINED3D_SM5_UAV_FLAGS_SHIFT   15
 
#define WINED3D_SM5_UAV_FLAGS_MASK   (0x1ffu << WINED3D_SM5_UAV_FLAGS_SHIFT)
 
#define WINED3D_SM5_SYNC_FLAGS_SHIFT   11
 
#define WINED3D_SM5_SYNC_FLAGS_MASK   (0xffu << WINED3D_SM5_SYNC_FLAGS_SHIFT)
 
#define WINED3D_SM5_TESSELLATOR_SHIFT   11
 
#define WINED3D_SM5_TESSELLATOR_MASK   (0xfu << WINED3D_SM5_TESSELLATOR_SHIFT)
 
#define WINED3D_SM4_OPCODE_MASK   0xff
 
#define WINED3D_SM4_REGISTER_MODIFIER   (0x1u << 31)
 
#define WINED3D_SM4_ADDRESSING_SHIFT1   25
 
#define WINED3D_SM4_ADDRESSING_MASK1   (0x3u << WINED3D_SM4_ADDRESSING_SHIFT1)
 
#define WINED3D_SM4_ADDRESSING_SHIFT0   22
 
#define WINED3D_SM4_ADDRESSING_MASK0   (0x3u << WINED3D_SM4_ADDRESSING_SHIFT0)
 
#define WINED3D_SM4_REGISTER_ORDER_SHIFT   20
 
#define WINED3D_SM4_REGISTER_ORDER_MASK   (0x3u << WINED3D_SM4_REGISTER_ORDER_SHIFT)
 
#define WINED3D_SM4_REGISTER_TYPE_SHIFT   12
 
#define WINED3D_SM4_REGISTER_TYPE_MASK   (0xffu << WINED3D_SM4_REGISTER_TYPE_SHIFT)
 
#define WINED3D_SM4_SWIZZLE_TYPE_SHIFT   2
 
#define WINED3D_SM4_SWIZZLE_TYPE_MASK   (0x3u << WINED3D_SM4_SWIZZLE_TYPE_SHIFT)
 
#define WINED3D_SM4_IMMCONST_TYPE_SHIFT   0
 
#define WINED3D_SM4_IMMCONST_TYPE_MASK   (0x3u << WINED3D_SM4_IMMCONST_TYPE_SHIFT)
 
#define WINED3D_SM4_WRITEMASK_SHIFT   4
 
#define WINED3D_SM4_WRITEMASK_MASK   (0xfu << WINED3D_SM4_WRITEMASK_SHIFT)
 
#define WINED3D_SM4_SWIZZLE_SHIFT   4
 
#define WINED3D_SM4_SWIZZLE_MASK   (0xffu << WINED3D_SM4_SWIZZLE_SHIFT)
 
#define WINED3D_SM4_VERSION_MAJOR(version)   (((version) >> 4) & 0xf)
 
#define WINED3D_SM4_VERSION_MINOR(version)   (((version) >> 0) & 0xf)
 
#define WINED3D_SM4_ADDRESSING_RELATIVE   0x2
 
#define WINED3D_SM4_ADDRESSING_OFFSET   0x1
 
#define WINED3D_SM4_INSTRUCTION_FLAG_SATURATE   0x4
 
#define WINED3D_SM4_CONDITIONAL_NZ   (0x1u << 18)
 

Enumerations

enum  wined3d_sm4_opcode {
  WINED3D_SM4_OP_ADD = 0x00 , WINED3D_SM4_OP_AND = 0x01 , WINED3D_SM4_OP_BREAK = 0x02 , WINED3D_SM4_OP_BREAKC = 0x03 ,
  WINED3D_SM4_OP_CASE = 0x06 , WINED3D_SM4_OP_CONTINUE = 0x07 , WINED3D_SM4_OP_CONTINUEC = 0x08 , WINED3D_SM4_OP_CUT = 0x09 ,
  WINED3D_SM4_OP_DEFAULT = 0x0a , WINED3D_SM4_OP_DERIV_RTX = 0x0b , WINED3D_SM4_OP_DERIV_RTY = 0x0c , WINED3D_SM4_OP_DISCARD = 0x0d ,
  WINED3D_SM4_OP_DIV = 0x0e , WINED3D_SM4_OP_DP2 = 0x0f , WINED3D_SM4_OP_DP3 = 0x10 , WINED3D_SM4_OP_DP4 = 0x11 ,
  WINED3D_SM4_OP_ELSE = 0x12 , WINED3D_SM4_OP_EMIT = 0x13 , WINED3D_SM4_OP_ENDIF = 0x15 , WINED3D_SM4_OP_ENDLOOP = 0x16 ,
  WINED3D_SM4_OP_ENDSWITCH = 0x17 , WINED3D_SM4_OP_EQ = 0x18 , WINED3D_SM4_OP_EXP = 0x19 , WINED3D_SM4_OP_FRC = 0x1a ,
  WINED3D_SM4_OP_FTOI = 0x1b , WINED3D_SM4_OP_FTOU = 0x1c , WINED3D_SM4_OP_GE = 0x1d , WINED3D_SM4_OP_IADD = 0x1e ,
  WINED3D_SM4_OP_IF = 0x1f , WINED3D_SM4_OP_IEQ = 0x20 , WINED3D_SM4_OP_IGE = 0x21 , WINED3D_SM4_OP_ILT = 0x22 ,
  WINED3D_SM4_OP_IMAD = 0x23 , WINED3D_SM4_OP_IMAX = 0x24 , WINED3D_SM4_OP_IMIN = 0x25 , WINED3D_SM4_OP_IMUL = 0x26 ,
  WINED3D_SM4_OP_INE = 0x27 , WINED3D_SM4_OP_INEG = 0x28 , WINED3D_SM4_OP_ISHL = 0x29 , WINED3D_SM4_OP_ISHR = 0x2a ,
  WINED3D_SM4_OP_ITOF = 0x2b , WINED3D_SM4_OP_LABEL = 0x2c , WINED3D_SM4_OP_LD = 0x2d , WINED3D_SM4_OP_LD2DMS = 0x2e ,
  WINED3D_SM4_OP_LOG = 0x2f , WINED3D_SM4_OP_LOOP = 0x30 , WINED3D_SM4_OP_LT = 0x31 , WINED3D_SM4_OP_MAD = 0x32 ,
  WINED3D_SM4_OP_MIN = 0x33 , WINED3D_SM4_OP_MAX = 0x34 , WINED3D_SM4_OP_SHADER_DATA = 0x35 , WINED3D_SM4_OP_MOV = 0x36 ,
  WINED3D_SM4_OP_MOVC = 0x37 , WINED3D_SM4_OP_MUL = 0x38 , WINED3D_SM4_OP_NE = 0x39 , WINED3D_SM4_OP_NOP = 0x3a ,
  WINED3D_SM4_OP_NOT = 0x3b , WINED3D_SM4_OP_OR = 0x3c , WINED3D_SM4_OP_RESINFO = 0x3d , WINED3D_SM4_OP_RET = 0x3e ,
  WINED3D_SM4_OP_RETC = 0x3f , WINED3D_SM4_OP_ROUND_NE = 0x40 , WINED3D_SM4_OP_ROUND_NI = 0x41 , WINED3D_SM4_OP_ROUND_PI = 0x42 ,
  WINED3D_SM4_OP_ROUND_Z = 0x43 , WINED3D_SM4_OP_RSQ = 0x44 , WINED3D_SM4_OP_SAMPLE = 0x45 , WINED3D_SM4_OP_SAMPLE_C = 0x46 ,
  WINED3D_SM4_OP_SAMPLE_C_LZ = 0x47 , WINED3D_SM4_OP_SAMPLE_LOD = 0x48 , WINED3D_SM4_OP_SAMPLE_GRAD = 0x49 , WINED3D_SM4_OP_SAMPLE_B = 0x4a ,
  WINED3D_SM4_OP_SQRT = 0x4b , WINED3D_SM4_OP_SWITCH = 0x4c , WINED3D_SM4_OP_SINCOS = 0x4d , WINED3D_SM4_OP_UDIV = 0x4e ,
  WINED3D_SM4_OP_ULT = 0x4f , WINED3D_SM4_OP_UGE = 0x50 , WINED3D_SM4_OP_UMUL = 0x51 , WINED3D_SM4_OP_UMAX = 0x53 ,
  WINED3D_SM4_OP_UMIN = 0x54 , WINED3D_SM4_OP_USHR = 0x55 , WINED3D_SM4_OP_UTOF = 0x56 , WINED3D_SM4_OP_XOR = 0x57 ,
  WINED3D_SM4_OP_DCL_RESOURCE = 0x58 , WINED3D_SM4_OP_DCL_CONSTANT_BUFFER = 0x59 , WINED3D_SM4_OP_DCL_SAMPLER = 0x5a , WINED3D_SM4_OP_DCL_INDEX_RANGE = 0x5b ,
  WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY = 0x5c , WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE = 0x5d , WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e , WINED3D_SM4_OP_DCL_INPUT = 0x5f ,
  WINED3D_SM4_OP_DCL_INPUT_SGV = 0x60 , WINED3D_SM4_OP_DCL_INPUT_SIV = 0x61 , WINED3D_SM4_OP_DCL_INPUT_PS = 0x62 , WINED3D_SM4_OP_DCL_INPUT_PS_SGV = 0x63 ,
  WINED3D_SM4_OP_DCL_INPUT_PS_SIV = 0x64 , WINED3D_SM4_OP_DCL_OUTPUT = 0x65 , WINED3D_SM4_OP_DCL_OUTPUT_SIV = 0x67 , WINED3D_SM4_OP_DCL_TEMPS = 0x68 ,
  WINED3D_SM4_OP_DCL_INDEXABLE_TEMP = 0x69 , WINED3D_SM4_OP_DCL_GLOBAL_FLAGS = 0x6a , WINED3D_SM4_OP_LOD = 0x6c , WINED3D_SM4_OP_GATHER4 = 0x6d ,
  WINED3D_SM4_OP_SAMPLE_POS = 0x6e , WINED3D_SM4_OP_SAMPLE_INFO = 0x6f , WINED3D_SM5_OP_HS_DECLS = 0x71 , WINED3D_SM5_OP_HS_CONTROL_POINT_PHASE = 0x72 ,
  WINED3D_SM5_OP_HS_FORK_PHASE = 0x73 , WINED3D_SM5_OP_HS_JOIN_PHASE = 0x74 , WINED3D_SM5_OP_EMIT_STREAM = 0x75 , WINED3D_SM5_OP_CUT_STREAM = 0x76 ,
  WINED3D_SM5_OP_FCALL = 0x78 , WINED3D_SM5_OP_BUFINFO = 0x79 , WINED3D_SM5_OP_DERIV_RTX_COARSE = 0x7a , WINED3D_SM5_OP_DERIV_RTX_FINE = 0x7b ,
  WINED3D_SM5_OP_DERIV_RTY_COARSE = 0x7c , WINED3D_SM5_OP_DERIV_RTY_FINE = 0x7d , WINED3D_SM5_OP_GATHER4_C = 0x7e , WINED3D_SM5_OP_GATHER4_PO = 0x7f ,
  WINED3D_SM5_OP_GATHER4_PO_C = 0x80 , WINED3D_SM5_OP_RCP = 0x81 , WINED3D_SM5_OP_F32TOF16 = 0x82 , WINED3D_SM5_OP_F16TOF32 = 0x83 ,
  WINED3D_SM5_OP_COUNTBITS = 0x86 , WINED3D_SM5_OP_FIRSTBIT_HI = 0x87 , WINED3D_SM5_OP_FIRSTBIT_LO = 0x88 , WINED3D_SM5_OP_FIRSTBIT_SHI = 0x89 ,
  WINED3D_SM5_OP_UBFE = 0x8a , WINED3D_SM5_OP_IBFE = 0x8b , WINED3D_SM5_OP_BFI = 0x8c , WINED3D_SM5_OP_BFREV = 0x8d ,
  WINED3D_SM5_OP_SWAPC = 0x8e , WINED3D_SM5_OP_DCL_STREAM = 0x8f , WINED3D_SM5_OP_DCL_FUNCTION_BODY = 0x90 , WINED3D_SM5_OP_DCL_FUNCTION_TABLE = 0x91 ,
  WINED3D_SM5_OP_DCL_INTERFACE = 0x92 , WINED3D_SM5_OP_DCL_INPUT_CONTROL_POINT_COUNT = 0x93 , WINED3D_SM5_OP_DCL_OUTPUT_CONTROL_POINT_COUNT = 0x94 , WINED3D_SM5_OP_DCL_TESSELLATOR_DOMAIN = 0x95 ,
  WINED3D_SM5_OP_DCL_TESSELLATOR_PARTITIONING = 0x96 , WINED3D_SM5_OP_DCL_TESSELLATOR_OUTPUT_PRIMITIVE = 0x97 , WINED3D_SM5_OP_DCL_HS_MAX_TESSFACTOR = 0x98 , WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT = 0x99 ,
  WINED3D_SM5_OP_DCL_HS_JOIN_PHASE_INSTANCE_COUNT = 0x9a , WINED3D_SM5_OP_DCL_THREAD_GROUP = 0x9b , WINED3D_SM5_OP_DCL_UAV_TYPED = 0x9c , WINED3D_SM5_OP_DCL_UAV_RAW = 0x9d ,
  WINED3D_SM5_OP_DCL_UAV_STRUCTURED = 0x9e , WINED3D_SM5_OP_DCL_TGSM_RAW = 0x9f , WINED3D_SM5_OP_DCL_TGSM_STRUCTURED = 0xa0 , WINED3D_SM5_OP_DCL_RESOURCE_RAW = 0xa1 ,
  WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED = 0xa2 , WINED3D_SM5_OP_LD_UAV_TYPED = 0xa3 , WINED3D_SM5_OP_STORE_UAV_TYPED = 0xa4 , WINED3D_SM5_OP_LD_RAW = 0xa5 ,
  WINED3D_SM5_OP_STORE_RAW = 0xa6 , WINED3D_SM5_OP_LD_STRUCTURED = 0xa7 , WINED3D_SM5_OP_STORE_STRUCTURED = 0xa8 , WINED3D_SM5_OP_ATOMIC_AND = 0xa9 ,
  WINED3D_SM5_OP_ATOMIC_OR = 0xaa , WINED3D_SM5_OP_ATOMIC_XOR = 0xab , WINED3D_SM5_OP_ATOMIC_CMP_STORE = 0xac , WINED3D_SM5_OP_ATOMIC_IADD = 0xad ,
  WINED3D_SM5_OP_ATOMIC_IMAX = 0xae , WINED3D_SM5_OP_ATOMIC_IMIN = 0xaf , WINED3D_SM5_OP_ATOMIC_UMAX = 0xb0 , WINED3D_SM5_OP_ATOMIC_UMIN = 0xb1 ,
  WINED3D_SM5_OP_IMM_ATOMIC_ALLOC = 0xb2 , WINED3D_SM5_OP_IMM_ATOMIC_CONSUME = 0xb3 , WINED3D_SM5_OP_IMM_ATOMIC_IADD = 0xb4 , WINED3D_SM5_OP_IMM_ATOMIC_AND = 0xb5 ,
  WINED3D_SM5_OP_IMM_ATOMIC_OR = 0xb6 , WINED3D_SM5_OP_IMM_ATOMIC_XOR = 0xb7 , WINED3D_SM5_OP_IMM_ATOMIC_EXCH = 0xb8 , WINED3D_SM5_OP_IMM_ATOMIC_CMP_EXCH = 0xb9 ,
  WINED3D_SM5_OP_IMM_ATOMIC_IMAX = 0xba , WINED3D_SM5_OP_IMM_ATOMIC_IMIN = 0xbb , WINED3D_SM5_OP_IMM_ATOMIC_UMAX = 0xbc , WINED3D_SM5_OP_IMM_ATOMIC_UMIN = 0xbd ,
  WINED3D_SM5_OP_SYNC = 0xbe , WINED3D_SM5_OP_EVAL_SAMPLE_INDEX = 0xcc , WINED3D_SM5_OP_DCL_GS_INSTANCES = 0xce
}
 
enum  wined3d_sm4_register_type {
  WINED3D_SM4_RT_TEMP = 0x00 , WINED3D_SM4_RT_INPUT = 0x01 , WINED3D_SM4_RT_OUTPUT = 0x02 , WINED3D_SM4_RT_INDEXABLE_TEMP = 0x03 ,
  WINED3D_SM4_RT_IMMCONST = 0x04 , WINED3D_SM4_RT_SAMPLER = 0x06 , WINED3D_SM4_RT_RESOURCE = 0x07 , WINED3D_SM4_RT_CONSTBUFFER = 0x08 ,
  WINED3D_SM4_RT_IMMCONSTBUFFER = 0x09 , WINED3D_SM4_RT_PRIMID = 0x0b , WINED3D_SM4_RT_DEPTHOUT = 0x0c , WINED3D_SM4_RT_NULL = 0x0d ,
  WINED3D_SM4_RT_OMASK = 0x0f , WINED3D_SM5_RT_STREAM = 0x10 , WINED3D_SM5_RT_FUNCTION_BODY = 0x11 , WINED3D_SM5_RT_FUNCTION_POINTER = 0x13 ,
  WINED3D_SM5_RT_OUTPUT_CONTROL_POINT_ID = 0x16 , WINED3D_SM5_RT_FORK_INSTANCE_ID = 0x17 , WINED3D_SM5_RT_JOIN_INSTANCE_ID = 0x18 , WINED3D_SM5_RT_INPUT_CONTROL_POINT = 0x19 ,
  WINED3D_SM5_RT_OUTPUT_CONTROL_POINT = 0x1a , WINED3D_SM5_RT_PATCH_CONSTANT_DATA = 0x1b , WINED3D_SM5_RT_DOMAIN_LOCATION = 0x1c , WINED3D_SM5_RT_UAV = 0x1e ,
  WINED3D_SM5_RT_SHARED_MEMORY = 0x1f , WINED3D_SM5_RT_THREAD_ID = 0x20 , WINED3D_SM5_RT_THREAD_GROUP_ID = 0x21 , WINED3D_SM5_RT_LOCAL_THREAD_ID = 0x22 ,
  WINED3D_SM5_RT_COVERAGE = 0x23 , WINED3D_SM5_RT_LOCAL_THREAD_INDEX = 0x24 , WINED3D_SM5_RT_GS_INSTANCE_ID = 0x25 , WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL = 0x26 ,
  WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL = 0x27
}
 
enum  wined3d_sm4_output_primitive_type { WINED3D_SM4_OUTPUT_PT_POINTLIST = 0x1 , WINED3D_SM4_OUTPUT_PT_LINESTRIP = 0x3 , WINED3D_SM4_OUTPUT_PT_TRIANGLESTRIP = 0x5 }
 
enum  wined3d_sm4_input_primitive_type {
  WINED3D_SM4_INPUT_PT_POINT = 0x01 , WINED3D_SM4_INPUT_PT_LINE = 0x02 , WINED3D_SM4_INPUT_PT_TRIANGLE = 0x03 , WINED3D_SM4_INPUT_PT_LINEADJ = 0x06 ,
  WINED3D_SM4_INPUT_PT_TRIANGLEADJ = 0x07 , WINED3D_SM5_INPUT_PT_PATCH1 = 0x08 , WINED3D_SM5_INPUT_PT_PATCH2 = 0x09 , WINED3D_SM5_INPUT_PT_PATCH3 = 0x0a ,
  WINED3D_SM5_INPUT_PT_PATCH4 = 0x0b , WINED3D_SM5_INPUT_PT_PATCH5 = 0x0c , WINED3D_SM5_INPUT_PT_PATCH6 = 0x0d , WINED3D_SM5_INPUT_PT_PATCH7 = 0x0e ,
  WINED3D_SM5_INPUT_PT_PATCH8 = 0x0f , WINED3D_SM5_INPUT_PT_PATCH9 = 0x10 , WINED3D_SM5_INPUT_PT_PATCH10 = 0x11 , WINED3D_SM5_INPUT_PT_PATCH11 = 0x12 ,
  WINED3D_SM5_INPUT_PT_PATCH12 = 0x13 , WINED3D_SM5_INPUT_PT_PATCH13 = 0x14 , WINED3D_SM5_INPUT_PT_PATCH14 = 0x15 , WINED3D_SM5_INPUT_PT_PATCH15 = 0x16 ,
  WINED3D_SM5_INPUT_PT_PATCH16 = 0x17 , WINED3D_SM5_INPUT_PT_PATCH17 = 0x18 , WINED3D_SM5_INPUT_PT_PATCH18 = 0x19 , WINED3D_SM5_INPUT_PT_PATCH19 = 0x1a ,
  WINED3D_SM5_INPUT_PT_PATCH20 = 0x1b , WINED3D_SM5_INPUT_PT_PATCH21 = 0x1c , WINED3D_SM5_INPUT_PT_PATCH22 = 0x1d , WINED3D_SM5_INPUT_PT_PATCH23 = 0x1e ,
  WINED3D_SM5_INPUT_PT_PATCH24 = 0x1f , WINED3D_SM5_INPUT_PT_PATCH25 = 0x20 , WINED3D_SM5_INPUT_PT_PATCH26 = 0x21 , WINED3D_SM5_INPUT_PT_PATCH27 = 0x22 ,
  WINED3D_SM5_INPUT_PT_PATCH28 = 0x23 , WINED3D_SM5_INPUT_PT_PATCH29 = 0x24 , WINED3D_SM5_INPUT_PT_PATCH30 = 0x25 , WINED3D_SM5_INPUT_PT_PATCH31 = 0x26 ,
  WINED3D_SM5_INPUT_PT_PATCH32 = 0x27
}
 
enum  wined3d_sm4_swizzle_type { WINED3D_SM4_SWIZZLE_NONE = 0x0 , WINED3D_SM4_SWIZZLE_VEC4 = 0x1 , WINED3D_SM4_SWIZZLE_SCALAR = 0x2 }
 
enum  wined3d_sm4_immconst_type { WINED3D_SM4_IMMCONST_SCALAR = 0x1 , WINED3D_SM4_IMMCONST_VEC4 = 0x2 }
 
enum  wined3d_sm4_resource_type {
  WINED3D_SM4_RESOURCE_BUFFER = 0x1 , WINED3D_SM4_RESOURCE_TEXTURE_1D = 0x2 , WINED3D_SM4_RESOURCE_TEXTURE_2D = 0x3 , WINED3D_SM4_RESOURCE_TEXTURE_2DMS = 0x4 ,
  WINED3D_SM4_RESOURCE_TEXTURE_3D = 0x5 , WINED3D_SM4_RESOURCE_TEXTURE_CUBE = 0x6 , WINED3D_SM4_RESOURCE_TEXTURE_1DARRAY = 0x7 , WINED3D_SM4_RESOURCE_TEXTURE_2DARRAY = 0x8 ,
  WINED3D_SM4_RESOURCE_TEXTURE_2DMSARRAY = 0x9 , WINED3D_SM4_RESOURCE_TEXTURE_CUBEARRAY = 0xa
}
 
enum  wined3d_sm4_data_type {
  WINED3D_SM4_DATA_UNORM = 0x1 , WINED3D_SM4_DATA_SNORM = 0x2 , WINED3D_SM4_DATA_INT = 0x3 , WINED3D_SM4_DATA_UINT = 0x4 ,
  WINED3D_SM4_DATA_FLOAT = 0x5
}
 
enum  wined3d_sm4_sampler_mode { WINED3D_SM4_SAMPLER_DEFAULT = 0x0 , WINED3D_SM4_SAMPLER_COMPARISON = 0x1 }
 
enum  wined3d_sm4_shader_data_type { WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER = 0x3 , WINED3D_SM4_SHADER_DATA_MESSAGE = 0x4 }
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3d_shader)
 
 WINE_DECLARE_DEBUG_CHANNEL (d3d_bytecode)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
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)
 
static const struct wined3d_sm4_opcode_infoget_opcode_info (enum wined3d_sm4_opcode opcode)
 
static void map_register (const struct wined3d_sm4_data *priv, struct wined3d_shader_register *reg)
 
static enum wined3d_data_type map_data_type (char t)
 
static voidshader_sm4_init (const DWORD *byte_code, size_t byte_code_size, const struct wined3d_shader_signature *output_signature)
 
static void shader_sm4_free (void *data)
 
static struct wined3d_shader_src_paramget_src_param (struct wined3d_sm4_data *priv)
 
static void shader_sm4_read_header (void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
 
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)
 
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)
 
static void shader_sm4_read_instruction_modifier (DWORD modifier, struct wined3d_shader_instruction *ins)
 
static void shader_sm4_read_instruction (void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins)
 
static BOOL shader_sm4_is_end (void *data, const DWORD **ptr)
 

Variables

static enum wined3d_primitive_type output_primitive_type_table []
 
static enum wined3d_primitive_type input_primitive_type_table []
 
static enum wined3d_shader_resource_type resource_type_table []
 
static enum wined3d_data_type data_type_table []
 
static const struct wined3d_sm4_opcode_info opcode_table []
 
static enum wined3d_shader_register_type register_type_table []
 
const struct wined3d_shader_frontend sm4_shader_frontend
 

Macro Definition Documentation

◆ WINED3D_SM4_ADDRESSING_MASK0

#define WINED3D_SM4_ADDRESSING_MASK0   (0x3u << WINED3D_SM4_ADDRESSING_SHIFT0)

Definition at line 87 of file shader_sm4.c.

◆ WINED3D_SM4_ADDRESSING_MASK1

#define WINED3D_SM4_ADDRESSING_MASK1   (0x3u << WINED3D_SM4_ADDRESSING_SHIFT1)

Definition at line 84 of file shader_sm4.c.

◆ WINED3D_SM4_ADDRESSING_OFFSET

#define WINED3D_SM4_ADDRESSING_OFFSET   0x1

Definition at line 111 of file shader_sm4.c.

◆ WINED3D_SM4_ADDRESSING_RELATIVE

#define WINED3D_SM4_ADDRESSING_RELATIVE   0x2

Definition at line 110 of file shader_sm4.c.

◆ WINED3D_SM4_ADDRESSING_SHIFT0

#define WINED3D_SM4_ADDRESSING_SHIFT0   22

Definition at line 86 of file shader_sm4.c.

◆ WINED3D_SM4_ADDRESSING_SHIFT1

#define WINED3D_SM4_ADDRESSING_SHIFT1   25

Definition at line 83 of file shader_sm4.c.

◆ WINED3D_SM4_AOFFIMMI_U_MASK

#define WINED3D_SM4_AOFFIMMI_U_MASK   (0xfu << WINED3D_SM4_AOFFIMMI_U_SHIFT)

Definition at line 31 of file shader_sm4.c.

◆ WINED3D_SM4_AOFFIMMI_U_SHIFT

#define WINED3D_SM4_AOFFIMMI_U_SHIFT   9

Definition at line 30 of file shader_sm4.c.

◆ WINED3D_SM4_AOFFIMMI_V_MASK

#define WINED3D_SM4_AOFFIMMI_V_MASK   (0xfu << WINED3D_SM4_AOFFIMMI_V_SHIFT)

Definition at line 33 of file shader_sm4.c.

◆ WINED3D_SM4_AOFFIMMI_V_SHIFT

#define WINED3D_SM4_AOFFIMMI_V_SHIFT   13

Definition at line 32 of file shader_sm4.c.

◆ WINED3D_SM4_AOFFIMMI_W_MASK

#define WINED3D_SM4_AOFFIMMI_W_MASK   (0xfu << WINED3D_SM4_AOFFIMMI_W_SHIFT)

Definition at line 35 of file shader_sm4.c.

◆ WINED3D_SM4_AOFFIMMI_W_SHIFT

#define WINED3D_SM4_AOFFIMMI_W_SHIFT   17

Definition at line 34 of file shader_sm4.c.

◆ WINED3D_SM4_CONDITIONAL_NZ

#define WINED3D_SM4_CONDITIONAL_NZ   (0x1u << 18)

Definition at line 115 of file shader_sm4.c.

◆ WINED3D_SM4_GLOBAL_FLAGS_MASK

#define WINED3D_SM4_GLOBAL_FLAGS_MASK   (0xffu << WINED3D_SM4_GLOBAL_FLAGS_SHIFT)

Definition at line 62 of file shader_sm4.c.

◆ WINED3D_SM4_GLOBAL_FLAGS_SHIFT

#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT   11

Definition at line 61 of file shader_sm4.c.

◆ WINED3D_SM4_IMMCONST_TYPE_MASK

#define WINED3D_SM4_IMMCONST_TYPE_MASK   (0x3u << WINED3D_SM4_IMMCONST_TYPE_SHIFT)

Definition at line 99 of file shader_sm4.c.

◆ WINED3D_SM4_IMMCONST_TYPE_SHIFT

#define WINED3D_SM4_IMMCONST_TYPE_SHIFT   0

Definition at line 98 of file shader_sm4.c.

◆ WINED3D_SM4_INDEX_TYPE_MASK

#define WINED3D_SM4_INDEX_TYPE_MASK   (0x1u << WINED3D_SM4_INDEX_TYPE_SHIFT)

Definition at line 50 of file shader_sm4.c.

◆ WINED3D_SM4_INDEX_TYPE_SHIFT

#define WINED3D_SM4_INDEX_TYPE_SHIFT   11

Definition at line 49 of file shader_sm4.c.

◆ WINED3D_SM4_INSTRUCTION_FLAG_SATURATE

#define WINED3D_SM4_INSTRUCTION_FLAG_SATURATE   0x4

Definition at line 113 of file shader_sm4.c.

◆ WINED3D_SM4_INSTRUCTION_FLAGS_MASK

#define WINED3D_SM4_INSTRUCTION_FLAGS_MASK   (0x7u << WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT)

Definition at line 41 of file shader_sm4.c.

◆ WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT

#define WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT   11

Definition at line 40 of file shader_sm4.c.

◆ WINED3D_SM4_INSTRUCTION_LENGTH_MASK

#define WINED3D_SM4_INSTRUCTION_LENGTH_MASK   (0x1fu << WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT)

Definition at line 38 of file shader_sm4.c.

◆ WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT

#define WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT   24

Definition at line 37 of file shader_sm4.c.

◆ WINED3D_SM4_INSTRUCTION_MODIFIER

#define WINED3D_SM4_INSTRUCTION_MODIFIER   (0x1u << 31)

Definition at line 27 of file shader_sm4.c.

◆ WINED3D_SM4_INTERPOLATION_MODE_MASK

#define WINED3D_SM4_INTERPOLATION_MODE_MASK   (0xfu << WINED3D_SM4_INTERPOLATION_MODE_SHIFT)

Definition at line 59 of file shader_sm4.c.

◆ WINED3D_SM4_INTERPOLATION_MODE_SHIFT

#define WINED3D_SM4_INTERPOLATION_MODE_SHIFT   11

Definition at line 58 of file shader_sm4.c.

◆ WINED3D_SM4_MODIFIER_AOFFIMMI

#define WINED3D_SM4_MODIFIER_AOFFIMMI   0x1

Definition at line 29 of file shader_sm4.c.

◆ WINED3D_SM4_OPCODE_MASK

#define WINED3D_SM4_OPCODE_MASK   0xff

Definition at line 79 of file shader_sm4.c.

◆ WINED3D_SM4_PRIMITIVE_TYPE_MASK

#define WINED3D_SM4_PRIMITIVE_TYPE_MASK   (0x3fu << WINED3D_SM4_PRIMITIVE_TYPE_SHIFT)

Definition at line 47 of file shader_sm4.c.

◆ WINED3D_SM4_PRIMITIVE_TYPE_SHIFT

#define WINED3D_SM4_PRIMITIVE_TYPE_SHIFT   11

Definition at line 46 of file shader_sm4.c.

◆ WINED3D_SM4_REGISTER_MODIFIER

#define WINED3D_SM4_REGISTER_MODIFIER   (0x1u << 31)

Definition at line 81 of file shader_sm4.c.

◆ WINED3D_SM4_REGISTER_ORDER_MASK

#define WINED3D_SM4_REGISTER_ORDER_MASK   (0x3u << WINED3D_SM4_REGISTER_ORDER_SHIFT)

Definition at line 90 of file shader_sm4.c.

◆ WINED3D_SM4_REGISTER_ORDER_SHIFT

#define WINED3D_SM4_REGISTER_ORDER_SHIFT   20

Definition at line 89 of file shader_sm4.c.

◆ WINED3D_SM4_REGISTER_TYPE_MASK

#define WINED3D_SM4_REGISTER_TYPE_MASK   (0xffu << WINED3D_SM4_REGISTER_TYPE_SHIFT)

Definition at line 93 of file shader_sm4.c.

◆ WINED3D_SM4_REGISTER_TYPE_SHIFT

#define WINED3D_SM4_REGISTER_TYPE_SHIFT   12

Definition at line 92 of file shader_sm4.c.

◆ WINED3D_SM4_RESOURCE_TYPE_MASK

#define WINED3D_SM4_RESOURCE_TYPE_MASK   (0xfu << WINED3D_SM4_RESOURCE_TYPE_SHIFT)

Definition at line 44 of file shader_sm4.c.

◆ WINED3D_SM4_RESOURCE_TYPE_SHIFT

#define WINED3D_SM4_RESOURCE_TYPE_SHIFT   11

Definition at line 43 of file shader_sm4.c.

◆ WINED3D_SM4_SAMPLER_MODE_MASK

#define WINED3D_SM4_SAMPLER_MODE_MASK   (0xfu << WINED3D_SM4_SAMPLER_MODE_SHIFT)

Definition at line 53 of file shader_sm4.c.

◆ WINED3D_SM4_SAMPLER_MODE_SHIFT

#define WINED3D_SM4_SAMPLER_MODE_SHIFT   11

Definition at line 52 of file shader_sm4.c.

◆ WINED3D_SM4_SHADER_DATA_TYPE_MASK

#define WINED3D_SM4_SHADER_DATA_TYPE_MASK   (0xfu << WINED3D_SM4_SHADER_DATA_TYPE_SHIFT)

Definition at line 56 of file shader_sm4.c.

◆ WINED3D_SM4_SHADER_DATA_TYPE_SHIFT

#define WINED3D_SM4_SHADER_DATA_TYPE_SHIFT   11

Definition at line 55 of file shader_sm4.c.

◆ WINED3D_SM4_SWIZZLE_MASK

#define WINED3D_SM4_SWIZZLE_MASK   (0xffu << WINED3D_SM4_SWIZZLE_SHIFT)

Definition at line 105 of file shader_sm4.c.

◆ WINED3D_SM4_SWIZZLE_SHIFT

#define WINED3D_SM4_SWIZZLE_SHIFT   4

Definition at line 104 of file shader_sm4.c.

◆ WINED3D_SM4_SWIZZLE_TYPE_MASK

#define WINED3D_SM4_SWIZZLE_TYPE_MASK   (0x3u << WINED3D_SM4_SWIZZLE_TYPE_SHIFT)

Definition at line 96 of file shader_sm4.c.

◆ WINED3D_SM4_SWIZZLE_TYPE_SHIFT

#define WINED3D_SM4_SWIZZLE_TYPE_SHIFT   2

Definition at line 95 of file shader_sm4.c.

◆ WINED3D_SM4_VERSION_MAJOR

#define WINED3D_SM4_VERSION_MAJOR (   version)    (((version) >> 4) & 0xf)

Definition at line 107 of file shader_sm4.c.

◆ WINED3D_SM4_VERSION_MINOR

#define WINED3D_SM4_VERSION_MINOR (   version)    (((version) >> 0) & 0xf)

Definition at line 108 of file shader_sm4.c.

◆ WINED3D_SM4_WRITEMASK_MASK

#define WINED3D_SM4_WRITEMASK_MASK   (0xfu << WINED3D_SM4_WRITEMASK_SHIFT)

Definition at line 102 of file shader_sm4.c.

◆ WINED3D_SM4_WRITEMASK_SHIFT

#define WINED3D_SM4_WRITEMASK_SHIFT   4

Definition at line 101 of file shader_sm4.c.

◆ WINED3D_SM5_CONTROL_POINT_COUNT_MASK

#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK   (0xffu << WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT)

Definition at line 65 of file shader_sm4.c.

◆ WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT

#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT   11

Definition at line 64 of file shader_sm4.c.

◆ WINED3D_SM5_FP_ARRAY_SIZE_SHIFT

#define WINED3D_SM5_FP_ARRAY_SIZE_SHIFT   16

Definition at line 67 of file shader_sm4.c.

◆ WINED3D_SM5_FP_TABLE_COUNT_MASK

#define WINED3D_SM5_FP_TABLE_COUNT_MASK   0xffffu

Definition at line 68 of file shader_sm4.c.

◆ WINED3D_SM5_SYNC_FLAGS_MASK

#define WINED3D_SM5_SYNC_FLAGS_MASK   (0xffu << WINED3D_SM5_SYNC_FLAGS_SHIFT)

Definition at line 74 of file shader_sm4.c.

◆ WINED3D_SM5_SYNC_FLAGS_SHIFT

#define WINED3D_SM5_SYNC_FLAGS_SHIFT   11

Definition at line 73 of file shader_sm4.c.

◆ WINED3D_SM5_TESSELLATOR_MASK

#define WINED3D_SM5_TESSELLATOR_MASK   (0xfu << WINED3D_SM5_TESSELLATOR_SHIFT)

Definition at line 77 of file shader_sm4.c.

◆ WINED3D_SM5_TESSELLATOR_SHIFT

#define WINED3D_SM5_TESSELLATOR_SHIFT   11

Definition at line 76 of file shader_sm4.c.

◆ WINED3D_SM5_UAV_FLAGS_MASK

#define WINED3D_SM5_UAV_FLAGS_MASK   (0x1ffu << WINED3D_SM5_UAV_FLAGS_SHIFT)

Definition at line 71 of file shader_sm4.c.

◆ WINED3D_SM5_UAV_FLAGS_SHIFT

#define WINED3D_SM5_UAV_FLAGS_SHIFT   15

Definition at line 70 of file shader_sm4.c.

Enumeration Type Documentation

◆ wined3d_sm4_data_type

Enumerator
WINED3D_SM4_DATA_UNORM 
WINED3D_SM4_DATA_SNORM 
WINED3D_SM4_DATA_INT 
WINED3D_SM4_DATA_UINT 
WINED3D_SM4_DATA_FLOAT 

Definition at line 416 of file shader_sm4.c.

417{
423};
@ 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

◆ wined3d_sm4_immconst_type

Enumerator
WINED3D_SM4_IMMCONST_SCALAR 
WINED3D_SM4_IMMCONST_VEC4 

Definition at line 396 of file shader_sm4.c.

397{
400};
@ WINED3D_SM4_IMMCONST_VEC4
Definition: shader_sm4.c:399
@ WINED3D_SM4_IMMCONST_SCALAR
Definition: shader_sm4.c:398

◆ wined3d_sm4_input_primitive_type

Enumerator
WINED3D_SM4_INPUT_PT_POINT 
WINED3D_SM4_INPUT_PT_LINE 
WINED3D_SM4_INPUT_PT_TRIANGLE 
WINED3D_SM4_INPUT_PT_LINEADJ 
WINED3D_SM4_INPUT_PT_TRIANGLEADJ 
WINED3D_SM5_INPUT_PT_PATCH1 
WINED3D_SM5_INPUT_PT_PATCH2 
WINED3D_SM5_INPUT_PT_PATCH3 
WINED3D_SM5_INPUT_PT_PATCH4 
WINED3D_SM5_INPUT_PT_PATCH5 
WINED3D_SM5_INPUT_PT_PATCH6 
WINED3D_SM5_INPUT_PT_PATCH7 
WINED3D_SM5_INPUT_PT_PATCH8 
WINED3D_SM5_INPUT_PT_PATCH9 
WINED3D_SM5_INPUT_PT_PATCH10 
WINED3D_SM5_INPUT_PT_PATCH11 
WINED3D_SM5_INPUT_PT_PATCH12 
WINED3D_SM5_INPUT_PT_PATCH13 
WINED3D_SM5_INPUT_PT_PATCH14 
WINED3D_SM5_INPUT_PT_PATCH15 
WINED3D_SM5_INPUT_PT_PATCH16 
WINED3D_SM5_INPUT_PT_PATCH17 
WINED3D_SM5_INPUT_PT_PATCH18 
WINED3D_SM5_INPUT_PT_PATCH19 
WINED3D_SM5_INPUT_PT_PATCH20 
WINED3D_SM5_INPUT_PT_PATCH21 
WINED3D_SM5_INPUT_PT_PATCH22 
WINED3D_SM5_INPUT_PT_PATCH23 
WINED3D_SM5_INPUT_PT_PATCH24 
WINED3D_SM5_INPUT_PT_PATCH25 
WINED3D_SM5_INPUT_PT_PATCH26 
WINED3D_SM5_INPUT_PT_PATCH27 
WINED3D_SM5_INPUT_PT_PATCH28 
WINED3D_SM5_INPUT_PT_PATCH29 
WINED3D_SM5_INPUT_PT_PATCH30 
WINED3D_SM5_INPUT_PT_PATCH31 
WINED3D_SM5_INPUT_PT_PATCH32 

Definition at line 348 of file shader_sm4.c.

349{
387};
@ 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

◆ wined3d_sm4_opcode

Enumerator
WINED3D_SM4_OP_ADD 
WINED3D_SM4_OP_AND 
WINED3D_SM4_OP_BREAK 
WINED3D_SM4_OP_BREAKC 
WINED3D_SM4_OP_CASE 
WINED3D_SM4_OP_CONTINUE 
WINED3D_SM4_OP_CONTINUEC 
WINED3D_SM4_OP_CUT 
WINED3D_SM4_OP_DEFAULT 
WINED3D_SM4_OP_DERIV_RTX 
WINED3D_SM4_OP_DERIV_RTY 
WINED3D_SM4_OP_DISCARD 
WINED3D_SM4_OP_DIV 
WINED3D_SM4_OP_DP2 
WINED3D_SM4_OP_DP3 
WINED3D_SM4_OP_DP4 
WINED3D_SM4_OP_ELSE 
WINED3D_SM4_OP_EMIT 
WINED3D_SM4_OP_ENDIF 
WINED3D_SM4_OP_ENDLOOP 
WINED3D_SM4_OP_ENDSWITCH 
WINED3D_SM4_OP_EQ 
WINED3D_SM4_OP_EXP 
WINED3D_SM4_OP_FRC 
WINED3D_SM4_OP_FTOI 
WINED3D_SM4_OP_FTOU 
WINED3D_SM4_OP_GE 
WINED3D_SM4_OP_IADD 
WINED3D_SM4_OP_IF 
WINED3D_SM4_OP_IEQ 
WINED3D_SM4_OP_IGE 
WINED3D_SM4_OP_ILT 
WINED3D_SM4_OP_IMAD 
WINED3D_SM4_OP_IMAX 
WINED3D_SM4_OP_IMIN 
WINED3D_SM4_OP_IMUL 
WINED3D_SM4_OP_INE 
WINED3D_SM4_OP_INEG 
WINED3D_SM4_OP_ISHL 
WINED3D_SM4_OP_ISHR 
WINED3D_SM4_OP_ITOF 
WINED3D_SM4_OP_LABEL 
WINED3D_SM4_OP_LD 
WINED3D_SM4_OP_LD2DMS 
WINED3D_SM4_OP_LOG 
WINED3D_SM4_OP_LOOP 
WINED3D_SM4_OP_LT 
WINED3D_SM4_OP_MAD 
WINED3D_SM4_OP_MIN 
WINED3D_SM4_OP_MAX 
WINED3D_SM4_OP_SHADER_DATA 
WINED3D_SM4_OP_MOV 
WINED3D_SM4_OP_MOVC 
WINED3D_SM4_OP_MUL 
WINED3D_SM4_OP_NE 
WINED3D_SM4_OP_NOP 
WINED3D_SM4_OP_NOT 
WINED3D_SM4_OP_OR 
WINED3D_SM4_OP_RESINFO 
WINED3D_SM4_OP_RET 
WINED3D_SM4_OP_RETC 
WINED3D_SM4_OP_ROUND_NE 
WINED3D_SM4_OP_ROUND_NI 
WINED3D_SM4_OP_ROUND_PI 
WINED3D_SM4_OP_ROUND_Z 
WINED3D_SM4_OP_RSQ 
WINED3D_SM4_OP_SAMPLE 
WINED3D_SM4_OP_SAMPLE_C 
WINED3D_SM4_OP_SAMPLE_C_LZ 
WINED3D_SM4_OP_SAMPLE_LOD 
WINED3D_SM4_OP_SAMPLE_GRAD 
WINED3D_SM4_OP_SAMPLE_B 
WINED3D_SM4_OP_SQRT 
WINED3D_SM4_OP_SWITCH 
WINED3D_SM4_OP_SINCOS 
WINED3D_SM4_OP_UDIV 
WINED3D_SM4_OP_ULT 
WINED3D_SM4_OP_UGE 
WINED3D_SM4_OP_UMUL 
WINED3D_SM4_OP_UMAX 
WINED3D_SM4_OP_UMIN 
WINED3D_SM4_OP_USHR 
WINED3D_SM4_OP_UTOF 
WINED3D_SM4_OP_XOR 
WINED3D_SM4_OP_DCL_RESOURCE 
WINED3D_SM4_OP_DCL_CONSTANT_BUFFER 
WINED3D_SM4_OP_DCL_SAMPLER 
WINED3D_SM4_OP_DCL_INDEX_RANGE 
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY 
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE 
WINED3D_SM4_OP_DCL_VERTICES_OUT 
WINED3D_SM4_OP_DCL_INPUT 
WINED3D_SM4_OP_DCL_INPUT_SGV 
WINED3D_SM4_OP_DCL_INPUT_SIV 
WINED3D_SM4_OP_DCL_INPUT_PS 
WINED3D_SM4_OP_DCL_INPUT_PS_SGV 
WINED3D_SM4_OP_DCL_INPUT_PS_SIV 
WINED3D_SM4_OP_DCL_OUTPUT 
WINED3D_SM4_OP_DCL_OUTPUT_SIV 
WINED3D_SM4_OP_DCL_TEMPS 
WINED3D_SM4_OP_DCL_INDEXABLE_TEMP 
WINED3D_SM4_OP_DCL_GLOBAL_FLAGS 
WINED3D_SM4_OP_LOD 
WINED3D_SM4_OP_GATHER4 
WINED3D_SM4_OP_SAMPLE_POS 
WINED3D_SM4_OP_SAMPLE_INFO 
WINED3D_SM5_OP_HS_DECLS 
WINED3D_SM5_OP_HS_CONTROL_POINT_PHASE 
WINED3D_SM5_OP_HS_FORK_PHASE 
WINED3D_SM5_OP_HS_JOIN_PHASE 
WINED3D_SM5_OP_EMIT_STREAM 
WINED3D_SM5_OP_CUT_STREAM 
WINED3D_SM5_OP_FCALL 
WINED3D_SM5_OP_BUFINFO 
WINED3D_SM5_OP_DERIV_RTX_COARSE 
WINED3D_SM5_OP_DERIV_RTX_FINE 
WINED3D_SM5_OP_DERIV_RTY_COARSE 
WINED3D_SM5_OP_DERIV_RTY_FINE 
WINED3D_SM5_OP_GATHER4_C 
WINED3D_SM5_OP_GATHER4_PO 
WINED3D_SM5_OP_GATHER4_PO_C 
WINED3D_SM5_OP_RCP 
WINED3D_SM5_OP_F32TOF16 
WINED3D_SM5_OP_F16TOF32 
WINED3D_SM5_OP_COUNTBITS 
WINED3D_SM5_OP_FIRSTBIT_HI 
WINED3D_SM5_OP_FIRSTBIT_LO 
WINED3D_SM5_OP_FIRSTBIT_SHI 
WINED3D_SM5_OP_UBFE 
WINED3D_SM5_OP_IBFE 
WINED3D_SM5_OP_BFI 
WINED3D_SM5_OP_BFREV 
WINED3D_SM5_OP_SWAPC 
WINED3D_SM5_OP_DCL_STREAM 
WINED3D_SM5_OP_DCL_FUNCTION_BODY 
WINED3D_SM5_OP_DCL_FUNCTION_TABLE 
WINED3D_SM5_OP_DCL_INTERFACE 
WINED3D_SM5_OP_DCL_INPUT_CONTROL_POINT_COUNT 
WINED3D_SM5_OP_DCL_OUTPUT_CONTROL_POINT_COUNT 
WINED3D_SM5_OP_DCL_TESSELLATOR_DOMAIN 
WINED3D_SM5_OP_DCL_TESSELLATOR_PARTITIONING 
WINED3D_SM5_OP_DCL_TESSELLATOR_OUTPUT_PRIMITIVE 
WINED3D_SM5_OP_DCL_HS_MAX_TESSFACTOR 
WINED3D_SM5_OP_DCL_HS_FORK_PHASE_INSTANCE_COUNT 
WINED3D_SM5_OP_DCL_HS_JOIN_PHASE_INSTANCE_COUNT 
WINED3D_SM5_OP_DCL_THREAD_GROUP 
WINED3D_SM5_OP_DCL_UAV_TYPED 
WINED3D_SM5_OP_DCL_UAV_RAW 
WINED3D_SM5_OP_DCL_UAV_STRUCTURED 
WINED3D_SM5_OP_DCL_TGSM_RAW 
WINED3D_SM5_OP_DCL_TGSM_STRUCTURED 
WINED3D_SM5_OP_DCL_RESOURCE_RAW 
WINED3D_SM5_OP_DCL_RESOURCE_STRUCTURED 
WINED3D_SM5_OP_LD_UAV_TYPED 
WINED3D_SM5_OP_STORE_UAV_TYPED 
WINED3D_SM5_OP_LD_RAW 
WINED3D_SM5_OP_STORE_RAW 
WINED3D_SM5_OP_LD_STRUCTURED 
WINED3D_SM5_OP_STORE_STRUCTURED 
WINED3D_SM5_OP_ATOMIC_AND 
WINED3D_SM5_OP_ATOMIC_OR 
WINED3D_SM5_OP_ATOMIC_XOR 
WINED3D_SM5_OP_ATOMIC_CMP_STORE 
WINED3D_SM5_OP_ATOMIC_IADD 
WINED3D_SM5_OP_ATOMIC_IMAX 
WINED3D_SM5_OP_ATOMIC_IMIN 
WINED3D_SM5_OP_ATOMIC_UMAX 
WINED3D_SM5_OP_ATOMIC_UMIN 
WINED3D_SM5_OP_IMM_ATOMIC_ALLOC 
WINED3D_SM5_OP_IMM_ATOMIC_CONSUME 
WINED3D_SM5_OP_IMM_ATOMIC_IADD 
WINED3D_SM5_OP_IMM_ATOMIC_AND 
WINED3D_SM5_OP_IMM_ATOMIC_OR 
WINED3D_SM5_OP_IMM_ATOMIC_XOR 
WINED3D_SM5_OP_IMM_ATOMIC_EXCH 
WINED3D_SM5_OP_IMM_ATOMIC_CMP_EXCH 
WINED3D_SM5_OP_IMM_ATOMIC_IMAX 
WINED3D_SM5_OP_IMM_ATOMIC_IMIN 
WINED3D_SM5_OP_IMM_ATOMIC_UMAX 
WINED3D_SM5_OP_IMM_ATOMIC_UMIN 
WINED3D_SM5_OP_SYNC 
WINED3D_SM5_OP_EVAL_SAMPLE_INDEX 
WINED3D_SM5_OP_DCL_GS_INSTANCES 

Definition at line 117 of file shader_sm4.c.

118{
119 WINED3D_SM4_OP_ADD = 0x00,
120 WINED3D_SM4_OP_AND = 0x01,
123 WINED3D_SM4_OP_CASE = 0x06,
126 WINED3D_SM4_OP_CUT = 0x09,
131 WINED3D_SM4_OP_DIV = 0x0e,
132 WINED3D_SM4_OP_DP2 = 0x0f,
133 WINED3D_SM4_OP_DP3 = 0x10,
134 WINED3D_SM4_OP_DP4 = 0x11,
135 WINED3D_SM4_OP_ELSE = 0x12,
136 WINED3D_SM4_OP_EMIT = 0x13,
140 WINED3D_SM4_OP_EQ = 0x18,
141 WINED3D_SM4_OP_EXP = 0x19,
142 WINED3D_SM4_OP_FRC = 0x1a,
143 WINED3D_SM4_OP_FTOI = 0x1b,
144 WINED3D_SM4_OP_FTOU = 0x1c,
145 WINED3D_SM4_OP_GE = 0x1d,
146 WINED3D_SM4_OP_IADD = 0x1e,
147 WINED3D_SM4_OP_IF = 0x1f,
148 WINED3D_SM4_OP_IEQ = 0x20,
149 WINED3D_SM4_OP_IGE = 0x21,
150 WINED3D_SM4_OP_ILT = 0x22,
151 WINED3D_SM4_OP_IMAD = 0x23,
152 WINED3D_SM4_OP_IMAX = 0x24,
153 WINED3D_SM4_OP_IMIN = 0x25,
154 WINED3D_SM4_OP_IMUL = 0x26,
155 WINED3D_SM4_OP_INE = 0x27,
156 WINED3D_SM4_OP_INEG = 0x28,
157 WINED3D_SM4_OP_ISHL = 0x29,
158 WINED3D_SM4_OP_ISHR = 0x2a,
159 WINED3D_SM4_OP_ITOF = 0x2b,
161 WINED3D_SM4_OP_LD = 0x2d,
163 WINED3D_SM4_OP_LOG = 0x2f,
164 WINED3D_SM4_OP_LOOP = 0x30,
165 WINED3D_SM4_OP_LT = 0x31,
166 WINED3D_SM4_OP_MAD = 0x32,
167 WINED3D_SM4_OP_MIN = 0x33,
168 WINED3D_SM4_OP_MAX = 0x34,
170 WINED3D_SM4_OP_MOV = 0x36,
171 WINED3D_SM4_OP_MOVC = 0x37,
172 WINED3D_SM4_OP_MUL = 0x38,
173 WINED3D_SM4_OP_NE = 0x39,
174 WINED3D_SM4_OP_NOP = 0x3a,
175 WINED3D_SM4_OP_NOT = 0x3b,
176 WINED3D_SM4_OP_OR = 0x3c,
178 WINED3D_SM4_OP_RET = 0x3e,
179 WINED3D_SM4_OP_RETC = 0x3f,
184 WINED3D_SM4_OP_RSQ = 0x44,
191 WINED3D_SM4_OP_SQRT = 0x4b,
194 WINED3D_SM4_OP_UDIV = 0x4e,
195 WINED3D_SM4_OP_ULT = 0x4f,
196 WINED3D_SM4_OP_UGE = 0x50,
197 WINED3D_SM4_OP_UMUL = 0x51,
198 WINED3D_SM4_OP_UMAX = 0x53,
199 WINED3D_SM4_OP_UMIN = 0x54,
200 WINED3D_SM4_OP_USHR = 0x55,
201 WINED3D_SM4_OP_UTOF = 0x56,
202 WINED3D_SM4_OP_XOR = 0x57,
221 WINED3D_SM4_OP_LOD = 0x6c,
240 WINED3D_SM5_OP_RCP = 0x81,
247 WINED3D_SM5_OP_UBFE = 0x8a,
248 WINED3D_SM5_OP_IBFE = 0x8b,
249 WINED3D_SM5_OP_BFI = 0x8c,
299 WINED3D_SM5_OP_SYNC = 0xbe,
302};
@ 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

◆ wined3d_sm4_output_primitive_type

Enumerator
WINED3D_SM4_OUTPUT_PT_POINTLIST 
WINED3D_SM4_OUTPUT_PT_LINESTRIP 
WINED3D_SM4_OUTPUT_PT_TRIANGLESTRIP 

Definition at line 341 of file shader_sm4.c.

342{
346};
@ 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

◆ wined3d_sm4_register_type

Enumerator
WINED3D_SM4_RT_TEMP 
WINED3D_SM4_RT_INPUT 
WINED3D_SM4_RT_OUTPUT 
WINED3D_SM4_RT_INDEXABLE_TEMP 
WINED3D_SM4_RT_IMMCONST 
WINED3D_SM4_RT_SAMPLER 
WINED3D_SM4_RT_RESOURCE 
WINED3D_SM4_RT_CONSTBUFFER 
WINED3D_SM4_RT_IMMCONSTBUFFER 
WINED3D_SM4_RT_PRIMID 
WINED3D_SM4_RT_DEPTHOUT 
WINED3D_SM4_RT_NULL 
WINED3D_SM4_RT_OMASK 
WINED3D_SM5_RT_STREAM 
WINED3D_SM5_RT_FUNCTION_BODY 
WINED3D_SM5_RT_FUNCTION_POINTER 
WINED3D_SM5_RT_OUTPUT_CONTROL_POINT_ID 
WINED3D_SM5_RT_FORK_INSTANCE_ID 
WINED3D_SM5_RT_JOIN_INSTANCE_ID 
WINED3D_SM5_RT_INPUT_CONTROL_POINT 
WINED3D_SM5_RT_OUTPUT_CONTROL_POINT 
WINED3D_SM5_RT_PATCH_CONSTANT_DATA 
WINED3D_SM5_RT_DOMAIN_LOCATION 
WINED3D_SM5_RT_UAV 
WINED3D_SM5_RT_SHARED_MEMORY 
WINED3D_SM5_RT_THREAD_ID 
WINED3D_SM5_RT_THREAD_GROUP_ID 
WINED3D_SM5_RT_LOCAL_THREAD_ID 
WINED3D_SM5_RT_COVERAGE 
WINED3D_SM5_RT_LOCAL_THREAD_INDEX 
WINED3D_SM5_RT_GS_INSTANCE_ID 
WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL 
WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL 

Definition at line 304 of file shader_sm4.c.

305{
306 WINED3D_SM4_RT_TEMP = 0x00,
317 WINED3D_SM4_RT_NULL = 0x0d,
329 WINED3D_SM5_RT_UAV = 0x1e,
339};
@ 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

◆ wined3d_sm4_resource_type

Enumerator
WINED3D_SM4_RESOURCE_BUFFER 
WINED3D_SM4_RESOURCE_TEXTURE_1D 
WINED3D_SM4_RESOURCE_TEXTURE_2D 
WINED3D_SM4_RESOURCE_TEXTURE_2DMS 
WINED3D_SM4_RESOURCE_TEXTURE_3D 
WINED3D_SM4_RESOURCE_TEXTURE_CUBE 
WINED3D_SM4_RESOURCE_TEXTURE_1DARRAY 
WINED3D_SM4_RESOURCE_TEXTURE_2DARRAY 
WINED3D_SM4_RESOURCE_TEXTURE_2DMSARRAY 
WINED3D_SM4_RESOURCE_TEXTURE_CUBEARRAY 

Definition at line 402 of file shader_sm4.c.

403{
414};
@ 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_sampler_mode

Enumerator
WINED3D_SM4_SAMPLER_DEFAULT 
WINED3D_SM4_SAMPLER_COMPARISON 

Definition at line 425 of file shader_sm4.c.

426{
429};
@ WINED3D_SM4_SAMPLER_COMPARISON
Definition: shader_sm4.c:428
@ WINED3D_SM4_SAMPLER_DEFAULT
Definition: shader_sm4.c:427

◆ wined3d_sm4_shader_data_type

Enumerator
WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER 
WINED3D_SM4_SHADER_DATA_MESSAGE 

Definition at line 431 of file shader_sm4.c.

432{
435};
@ WINED3D_SM4_SHADER_DATA_MESSAGE
Definition: shader_sm4.c:434
@ WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER
Definition: shader_sm4.c:433

◆ wined3d_sm4_swizzle_type

Enumerator
WINED3D_SM4_SWIZZLE_NONE 
WINED3D_SM4_SWIZZLE_VEC4 
WINED3D_SM4_SWIZZLE_SCALAR 

Definition at line 389 of file shader_sm4.c.

390{
394};
@ 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

Function Documentation

◆ get_opcode_info()

static const struct wined3d_sm4_opcode_info * get_opcode_info ( enum wined3d_sm4_opcode  opcode)
static

Definition at line 1160 of file shader_sm4.c.

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}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define NULL
Definition: types.h:112
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
static const struct wined3d_sm4_opcode_info opcode_table[]
Definition: shader_sm4.c:883

Referenced by shader_sm4_read_instruction().

◆ get_src_param()

static struct wined3d_shader_src_param * get_src_param ( struct wined3d_sm4_data priv)
static

Definition at line 1319 of file shader_sm4.c.

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}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
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
Definition: list.h:37
uint32_t entry
Definition: isohybrid.c:63
#define e
Definition: ke_i.h:82
static size_t elem
Definition: string.c:68
Definition: list.h:15
Definition: shader_sm4.c:438
struct list src_free
Definition: shader_sm4.c:452
struct list src
Definition: shader_sm4.c:453
#define LIST_ENTRY(type)
Definition: queue.h:175

Referenced by shader_sm4_read_reg_idx().

◆ map_data_type()

static enum wined3d_data_type map_data_type ( char  t)
static

Definition at line 1197 of file shader_sm4.c.

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}
#define ERR(fmt,...)
Definition: precomp.h:57
GLdouble GLdouble t
Definition: gl.h:2047
@ WINED3D_DATA_UINT
@ WINED3D_DATA_INT
@ WINED3D_DATA_UAV
@ WINED3D_DATA_SAMPLER
@ WINED3D_DATA_RESOURCE
@ WINED3D_DATA_FLOAT
@ WINED3D_DATA_OPAQUE

Referenced by shader_sm4_read_instruction().

◆ map_register()

static void map_register ( const struct wined3d_sm4_data priv,
struct wined3d_shader_register reg 
)
static

Definition at line 1172 of file shader_sm4.c.

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}
static int reg
Definition: i386-dis.c:1290
unsigned int output_map[MAX_REG_OUTPUT]
Definition: shader_sm4.c:448
struct wined3d_shader_version shader_version
Definition: shader_sm4.c:445
@ WINED3DSPR_COLOROUT
@ WINED3DSPR_OUTPUT
@ WINED3D_SHADER_TYPE_PIXEL

Referenced by shader_sm4_read_param().

◆ shader_sm4_free()

static void shader_sm4_free ( void data)
static

Definition at line 1306 of file shader_sm4.c.

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}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#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

◆ shader_sm4_init()

static void * shader_sm4_init ( const DWORD byte_code,
size_t  byte_code_size,
const struct wined3d_shader_signature output_signature 
)
static

Definition at line 1221 of file shader_sm4.c.

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}
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
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memset(x, y, z)
Definition: compat.h:39
#define WINED3D_SM4_VERSION_MINOR(version)
Definition: shader_sm4.c:108
#define WINED3D_SM4_VERSION_MAJOR(version)
Definition: shader_sm4.c:107
#define TRACE(s)
Definition: solgame.cpp:4
struct wined3d_shader_signature_element * elements
Definition: wined3d.h:2046
const DWORD * start
Definition: shader_sm4.c:446
const DWORD * end
Definition: shader_sm4.c:446
#define WINED3D_SM5_DS
#define WINED3D_SM4_PS
@ WINED3D_SHADER_TYPE_HULL
@ 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

◆ shader_sm4_is_end()

static BOOL shader_sm4_is_end ( void data,
const DWORD **  ptr 
)
static

Definition at line 1742 of file shader_sm4.c.

1743{
1744 struct wined3d_sm4_data *priv = data;
1745 return *ptr == priv->end;
1746}
static PVOID ptr
Definition: dispmode.c:27

◆ shader_sm4_read_conditional_op()

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 
)
static

Definition at line 520 of file shader_sm4.c.

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}
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_CONDITIONAL_NZ
Definition: shader_sm4.c:115
struct wined3d_shader_src_param src_param[5]
Definition: shader_sm4.c:450
@ WINED3D_SHADER_CONDITIONAL_OP_NZ
@ WINED3D_SHADER_CONDITIONAL_OP_Z

◆ shader_sm4_read_dcl_constant_buffer()

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 
)
static

Definition at line 599 of file shader_sm4.c.

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}
#define WINED3D_SM4_INDEX_TYPE_MASK
Definition: shader_sm4.c:50
const struct wined3d_shader_src_param * src
union wined3d_shader_instruction::@275 declaration
#define WINED3DSI_INDEXED_DYNAMIC

◆ shader_sm4_read_dcl_global_flags()

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 
)
static

Definition at line 718 of file shader_sm4.c.

721{
723}
#define WINED3D_SM4_GLOBAL_FLAGS_MASK
Definition: shader_sm4.c:62
#define WINED3D_SM4_GLOBAL_FLAGS_SHIFT
Definition: shader_sm4.c:61

◆ shader_sm4_read_dcl_index_range()

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 
)
static

Definition at line 618 of file shader_sm4.c.

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}
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
struct wined3d_shader_index_range index_range

◆ shader_sm4_read_dcl_indexable_temp()

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 
)
static

Definition at line 709 of file shader_sm4.c.

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}
struct wined3d_shader_indexable_temp indexable_temp

◆ shader_sm4_read_dcl_input_primitive()

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 
)
static

Definition at line 643 of file shader_sm4.c.

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}
wined3d_sm4_input_primitive_type
Definition: shader_sm4.c:349
#define WINED3D_SM4_PRIMITIVE_TYPE_MASK
Definition: shader_sm4.c:47
#define WINED3D_SM4_PRIMITIVE_TYPE_SHIFT
Definition: shader_sm4.c:46
static enum wined3d_primitive_type input_primitive_type_table[]
Definition: shader_sm4.c:478
struct wined3d_shader_primitive_type primitive_type
@ WINED3D_PT_UNDEFINED
Definition: wined3d.h:71
@ WINED3D_PT_PATCH
Definition: wined3d.h:82

◆ shader_sm4_read_dcl_input_ps()

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 
)
static

Definition at line 691 of file shader_sm4.c.

694{
696 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT, &ins->declaration.dst);
697}
#define WINED3D_SM4_INTERPOLATION_MODE_SHIFT
Definition: shader_sm4.c:58
#define WINED3D_SM4_INTERPOLATION_MODE_MASK
Definition: shader_sm4.c:59
const struct wined3d_shader_dst_param * dst

◆ shader_sm4_read_dcl_input_ps_siv()

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 
)
static

Definition at line 699 of file shader_sm4.c.

702{
704 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT,
706 ins->declaration.register_semantic.sysval_semantic = *tokens;
707}
struct wined3d_shader_register_semantic register_semantic

◆ shader_sm4_read_dcl_output_topology()

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 
)
static

Definition at line 627 of file shader_sm4.c.

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}
if(dx< 0)
Definition: linetemp.h:194
wined3d_sm4_output_primitive_type
Definition: shader_sm4.c:342
static enum wined3d_primitive_type output_primitive_type_table[]
Definition: shader_sm4.c:468

◆ shader_sm4_read_dcl_resource()

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 
)
static

Definition at line 558 of file shader_sm4.c.

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}
GLenum GLenum GLuint components
Definition: glext.h:9620
#define WINED3D_SM5_UAV_FLAGS_MASK
Definition: shader_sm4.c:71
wined3d_sm4_resource_type
Definition: shader_sm4.c:403
#define WINED3D_SM4_RESOURCE_TYPE_SHIFT
Definition: shader_sm4.c:43
wined3d_sm4_data_type
Definition: shader_sm4.c:417
static enum wined3d_shader_resource_type resource_type_table[]
Definition: shader_sm4.c:490
#define WINED3D_SM5_UAV_FLAGS_SHIFT
Definition: shader_sm4.c:70
#define WINED3D_SM4_RESOURCE_TYPE_MASK
Definition: shader_sm4.c:44
static enum wined3d_data_type data_type_table[]
Definition: shader_sm4.c:505
struct wined3d_shader_semantic semantic
wined3d_data_type
@ WINED3D_SHADER_RESOURCE_NONE

◆ shader_sm4_read_dcl_sampler()

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 
)
static

Definition at line 608 of file shader_sm4.c.

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}
#define WINED3D_SM4_SAMPLER_MODE_MASK
Definition: shader_sm4.c:53
#define WINED3D_SM4_SAMPLER_MODE_SHIFT
Definition: shader_sm4.c:52

◆ shader_sm4_read_declaration_count()

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 
)
static

Definition at line 668 of file shader_sm4.c.

671{
672 ins->declaration.count = *tokens;
673}

◆ shader_sm4_read_declaration_dst()

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 
)
static

Definition at line 675 of file shader_sm4.c.

678{
679 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT, &ins->declaration.dst);
680}

◆ shader_sm4_read_declaration_register_semantic()

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 
)
static

Definition at line 682 of file shader_sm4.c.

685{
686 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_FLOAT,
688 ins->declaration.register_semantic.sysval_semantic = *tokens;
689}

◆ shader_sm4_read_dst_param()

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 
)
static

Definition at line 1560 of file shader_sm4.c.

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}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
GLuint GLuint end
Definition: gl.h:1545
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
#define WINED3D_SM4_WRITEMASK_SHIFT
Definition: shader_sm4.c:101
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
#define WINED3D_SM4_WRITEMASK_MASK
Definition: shader_sm4.c:102
struct wined3d_shader_register reg
wined3d_shader_src_modifier
@ WINED3DSPSM_NONE

Referenced by shader_sm4_read_dcl_index_range(), shader_sm4_read_dcl_input_ps(), shader_sm4_read_dcl_input_ps_siv(), shader_sm4_read_dcl_resource(), shader_sm4_read_dcl_sampler(), shader_sm4_read_declaration_dst(), shader_sm4_read_declaration_register_semantic(), shader_sm4_read_instruction(), shader_sm5_read_dcl_resource_raw(), shader_sm5_read_dcl_resource_structured(), shader_sm5_read_dcl_tgsm_raw(), shader_sm5_read_dcl_tgsm_structured(), shader_sm5_read_dcl_uav_raw(), and shader_sm5_read_dcl_uav_structured().

◆ shader_sm4_read_header()

static void shader_sm4_read_header ( void data,
const DWORD **  ptr,
struct wined3d_shader_version shader_version 
)
static

Definition at line 1341 of file shader_sm4.c.

1342{
1343 struct wined3d_sm4_data *priv = data;
1344
1345 *ptr = priv->start;
1347}

◆ shader_sm4_read_instruction()

static void shader_sm4_read_instruction ( void data,
const DWORD **  ptr,
struct wined3d_shader_instruction ins 
)
static

Definition at line 1623 of file shader_sm4.c.

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}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define TRACE_(x)
Definition: compat.h:76
#define TRACE_ON(x)
Definition: compat.h:75
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
static const struct wined3d_sm4_opcode_info * get_opcode_info(enum wined3d_sm4_opcode opcode)
Definition: shader_sm4.c:1160
#define WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT
Definition: shader_sm4.c:40
static void shader_sm4_read_instruction_modifier(DWORD modifier, struct wined3d_shader_instruction *ins)
Definition: shader_sm4.c:1592
#define WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT
Definition: shader_sm4.c:37
#define WINED3D_SM4_INSTRUCTION_FLAGS_MASK
Definition: shader_sm4.c:41
#define WINED3D_SM4_OPCODE_MASK
Definition: shader_sm4.c:79
#define WINED3D_SM4_INSTRUCTION_FLAG_SATURATE
Definition: shader_sm4.c:113
#define WINED3D_SM4_INSTRUCTION_LENGTH_MASK
Definition: shader_sm4.c:38
static enum wined3d_data_type map_data_type(char t)
Definition: shader_sm4.c:1197
#define WINED3D_SM4_INSTRUCTION_MODIFIER
Definition: shader_sm4.c:27
const struct wined3d_shader_src_param * predicate
enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx
struct wined3d_shader_texel_offset texel_offset
struct wined3d_shader_dst_param dst_param[2]
Definition: shader_sm4.c:451
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
ULONG_PTR SIZE_T
Definition: typedefs.h:80
@ WINED3DSIH_TABLE_SIZE
wined3d_shader_dst_modifier
@ WINED3DSPDM_SATURATE
@ WINED3DSPDM_NONE

◆ shader_sm4_read_instruction_modifier()

static void shader_sm4_read_instruction_modifier ( DWORD  modifier,
struct wined3d_shader_instruction ins 
)
static

Definition at line 1592 of file shader_sm4.c.

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}
const GLdouble * v
Definition: gl.h:2040
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
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
#define WINED3D_SM4_AOFFIMMI_V_SHIFT
Definition: shader_sm4.c:32
#define WINED3D_SM4_AOFFIMMI_U_SHIFT
Definition: shader_sm4.c:30
#define WINED3D_SM4_AOFFIMMI_V_MASK
Definition: shader_sm4.c:33
#define WINED3D_SM4_AOFFIMMI_U_MASK
Definition: shader_sm4.c:31
#define WINED3D_SM4_MODIFIER_AOFFIMMI
Definition: shader_sm4.c:29
#define WINED3D_SM4_AOFFIMMI_W_MASK
Definition: shader_sm4.c:35
#define WINED3D_SM4_AOFFIMMI_W_SHIFT
Definition: shader_sm4.c:34

Referenced by shader_sm4_read_instruction().

◆ shader_sm4_read_param()

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 
)
static

Definition at line 1377 of file shader_sm4.c.

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}
#define U(x)
Definition: wordpad.c:45
GLfloat param
Definition: glext.h:5796
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
const GLfloat * m
Definition: glext.h:10848
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define WINED3D_SM4_IMMCONST_TYPE_SHIFT
Definition: shader_sm4.c:98
#define WINED3D_SM4_REGISTER_TYPE_MASK
Definition: shader_sm4.c:93
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
#define WINED3D_SM4_REGISTER_ORDER_MASK
Definition: shader_sm4.c:90
#define WINED3D_SM4_REGISTER_ORDER_SHIFT
Definition: shader_sm4.c:89
#define WINED3D_SM4_IMMCONST_TYPE_MASK
Definition: shader_sm4.c:99
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
wined3d_sm4_immconst_type
Definition: shader_sm4.c:397
wined3d_sm4_register_type
Definition: shader_sm4.c:305
#define WINED3D_SM4_REGISTER_MODIFIER
Definition: shader_sm4.c:81
#define WINED3D_SM4_ADDRESSING_SHIFT0
Definition: shader_sm4.c:86
#define WINED3D_SM4_ADDRESSING_MASK0
Definition: shader_sm4.c:87
#define WINED3D_SM4_REGISTER_TYPE_SHIFT
Definition: shader_sm4.c:92
#define WINED3D_SM4_ADDRESSING_MASK1
Definition: shader_sm4.c:84
static enum wined3d_shader_register_type register_type_table[]
Definition: shader_sm4.c:1116
@ WINED3DSPSM_ABSNEG
@ WINED3DSPSM_ABS
@ WINED3DSPSM_NEG
@ WINED3DSPR_TEMP
@ WINED3D_IMMCONST_VEC4
@ WINED3D_IMMCONST_SCALAR

Referenced by shader_sm4_read_dst_param(), and shader_sm4_read_src_param().

◆ shader_sm4_read_reg_idx()

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 
)
static

Definition at line 1349 of file shader_sm4.c.

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}
#define WINED3D_SM4_ADDRESSING_RELATIVE
Definition: shader_sm4.c:110
static struct wined3d_shader_src_param * get_src_param(struct wined3d_sm4_data *priv)
Definition: shader_sm4.c:1319
#define WINED3D_SM4_ADDRESSING_OFFSET
Definition: shader_sm4.c:111
const struct wined3d_shader_src_param * rel_addr

Referenced by shader_sm4_read_param().

◆ shader_sm4_read_shader_data()

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 
)
static

Definition at line 529 of file shader_sm4.c.

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}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define WINED3D_SM4_SHADER_DATA_TYPE_SHIFT
Definition: shader_sm4.c:55
wined3d_sm4_shader_data_type
Definition: shader_sm4.c:432
#define WINED3D_SM4_SHADER_DATA_TYPE_MASK
Definition: shader_sm4.c:56
const struct wined3d_shader_immediate_constant_buffer * icb
struct wined3d_shader_immediate_constant_buffer icb
Definition: shader_sm4.c:454
@ WINED3DSIH_NOP
#define MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE

◆ shader_sm4_read_src_param()

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 
)
static

Definition at line 1509 of file shader_sm4.c.

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}
#define WINED3D_SM4_SWIZZLE_MASK
Definition: shader_sm4.c:105
#define WINED3D_SM4_SWIZZLE_SHIFT
Definition: shader_sm4.c:104
wined3d_sm4_swizzle_type
Definition: shader_sm4.c:390
#define WINED3D_SM4_SWIZZLE_TYPE_MASK
Definition: shader_sm4.c:96
#define WINED3D_SM4_SWIZZLE_TYPE_SHIFT
Definition: shader_sm4.c:95
enum wined3d_shader_src_modifier modifiers
struct wined3d_shader_register reg
@ WINED3DSPR_IMMCONST
#define WINED3DSP_NOSWIZZLE

Referenced by shader_sm4_read_conditional_op(), shader_sm4_read_dcl_constant_buffer(), shader_sm4_read_instruction(), shader_sm4_read_reg_idx(), and shader_sm5_read_fcall().

◆ shader_sm5_read_control_point_count()

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 
)
static

Definition at line 759 of file shader_sm4.c.

762{
765}
#define WINED3D_SM5_CONTROL_POINT_COUNT_SHIFT
Definition: shader_sm4.c:64
#define WINED3D_SM5_CONTROL_POINT_COUNT_MASK
Definition: shader_sm4.c:65

◆ shader_sm5_read_dcl_function_body()

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 
)
static

Definition at line 733 of file shader_sm4.c.

736{
737 ins->declaration.index = *tokens;
738}

◆ shader_sm5_read_dcl_function_table()

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 
)
static

Definition at line 740 of file shader_sm4.c.

743{
744 ins->declaration.index = *tokens++;
745 FIXME("Ignoring set of function bodies (count %u).\n", *tokens);
746}

◆ shader_sm5_read_dcl_hs_max_tessfactor()

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 
)
static

Definition at line 791 of file shader_sm4.c.

794{
795 ins->declaration.max_tessellation_factor = *(float *)tokens;
796}

◆ shader_sm5_read_dcl_interface()

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 
)
static

Definition at line 748 of file shader_sm4.c.

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}
#define WINED3D_SM5_FP_TABLE_COUNT_MASK
Definition: shader_sm4.c:68
#define WINED3D_SM5_FP_ARRAY_SIZE_SHIFT
Definition: shader_sm4.c:67
struct wined3d_shader_function_table_pointer fp

◆ shader_sm5_read_dcl_resource_raw()

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 
)
static

Definition at line 860 of file shader_sm4.c.

863{
864 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_RESOURCE, &ins->declaration.dst);
865}

◆ shader_sm5_read_dcl_resource_structured()

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 
)
static

Definition at line 849 of file shader_sm4.c.

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}
struct wined3d_shader_structured_resource structured_resource

◆ shader_sm5_read_dcl_tessellator_domain()

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 
)
static

Definition at line 767 of file shader_sm4.c.

770{
773}
#define WINED3D_SM5_TESSELLATOR_SHIFT
Definition: shader_sm4.c:76
#define WINED3D_SM5_TESSELLATOR_MASK
Definition: shader_sm4.c:77
enum wined3d_tessellator_domain tessellator_domain

◆ shader_sm5_read_dcl_tessellator_output_primitive()

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 
)
static

Definition at line 783 of file shader_sm4.c.

786{
789}
enum wined3d_tessellator_output_primitive tessellator_output_primitive

◆ shader_sm5_read_dcl_tessellator_partitioning()

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 
)
static

Definition at line 775 of file shader_sm4.c.

778{
781}
enum wined3d_tessellator_partitioning tessellator_partitioning

◆ shader_sm5_read_dcl_tgsm_raw()

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 
)
static

Definition at line 827 of file shader_sm4.c.

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}
struct wined3d_shader_tgsm_raw tgsm_raw

◆ shader_sm5_read_dcl_tgsm_structured()

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 
)
static

Definition at line 837 of file shader_sm4.c.

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}
struct wined3d_shader_tgsm_structured tgsm_structured

◆ shader_sm5_read_dcl_thread_group()

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 
)
static

Definition at line 798 of file shader_sm4.c.

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}
struct wined3d_shader_thread_group_size thread_group_size

◆ shader_sm5_read_dcl_uav_raw()

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 
)
static

Definition at line 807 of file shader_sm4.c.

810{
811 shader_sm4_read_dst_param(priv, &tokens, &tokens[token_count], WINED3D_DATA_UAV, &ins->declaration.dst);
813}

◆ shader_sm5_read_dcl_uav_structured()

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 
)
static

Definition at line 815 of file shader_sm4.c.

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}

◆ shader_sm5_read_fcall()

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 
)
static

Definition at line 725 of file shader_sm4.c.

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}

◆ shader_sm5_read_sync()

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 
)
static

Definition at line 867 of file shader_sm4.c.

870{
872}
#define WINED3D_SM5_SYNC_FLAGS_SHIFT
Definition: shader_sm4.c:73
#define WINED3D_SM5_SYNC_FLAGS_MASK
Definition: shader_sm4.c:74

◆ WINE_DECLARE_DEBUG_CHANNEL()

WINE_DECLARE_DEBUG_CHANNEL ( d3d_bytecode  )

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d3d_shader  )

Variable Documentation

◆ data_type_table

enum wined3d_data_type data_type_table[]
static

◆ input_primitive_type_table

enum wined3d_primitive_type input_primitive_type_table[]
static
Initial value:

Definition at line 478 of file shader_sm4.c.

Referenced by shader_sm4_read_dcl_input_primitive().

◆ opcode_table

const struct wined3d_sm4_opcode_info opcode_table[]
static

Definition at line 883 of file shader_sm4.c.

Referenced by get_opcode_info(), and shader_get_opcode().

◆ output_primitive_type_table

enum wined3d_primitive_type output_primitive_type_table[]
static

◆ register_type_table

enum wined3d_shader_register_type register_type_table[]
static

Definition at line 1116 of file shader_sm4.c.

Referenced by shader_sm4_read_param().

◆ resource_type_table

enum wined3d_shader_resource_type resource_type_table[]
static
Initial value:
=
{
}
@ 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

Definition at line 490 of file shader_sm4.c.

Referenced by shader_sm4_read_dcl_resource().

◆ sm4_shader_frontend

const struct wined3d_shader_frontend sm4_shader_frontend
Initial value:
=
{
}
static void shader_sm4_read_header(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
Definition: shader_sm4.c:1341
static void shader_sm4_free(void *data)
Definition: shader_sm4.c:1306
static BOOL shader_sm4_is_end(void *data, const DWORD **ptr)
Definition: shader_sm4.c:1742
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
static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins)
Definition: shader_sm4.c:1623

Definition at line 1748 of file shader_sm4.c.

Referenced by shader_select_frontend().