mshtml: Use IActiveScriptSiteDebug64 instead of IActiveScriptSiteDebug32 on win64.
[wine] / dlls / d3dcompiler_43 / d3dcompiler_private.h
1 /*
2  * Copyright 2008 Stefan Dösinger
3  * Copyright 2009 Matteo Bruni
4  * Copyright 2010 Rico Schüller
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #ifndef __WINE_D3DCOMPILER_PRIVATE_H
22 #define __WINE_D3DCOMPILER_PRIVATE_H
23
24 #include <stdarg.h>
25
26 #define COBJMACROS
27 #include "windef.h"
28 #include "winbase.h"
29 #include "objbase.h"
30
31 #include "d3dcompiler.h"
32
33 /*
34  * This doesn't belong here, but for some functions it is possible to return that value,
35  * see http://msdn.microsoft.com/en-us/library/bb205278%28v=VS.85%29.aspx
36  * The original definition is in D3DX10core.h.
37  */
38 #define D3DERR_INVALIDCALL 0x8876086c
39
40 /* ID3DBlob */
41 struct d3dcompiler_blob
42 {
43     const struct ID3D10BlobVtbl *vtbl;
44     LONG refcount;
45
46     SIZE_T size;
47     void *data;
48 };
49
50 HRESULT d3dcompiler_blob_init(struct d3dcompiler_blob *blob, SIZE_T data_size) DECLSPEC_HIDDEN;
51
52 /* Shader assembler definitions */
53 typedef enum _shader_type {
54     ST_VERTEX,
55     ST_PIXEL,
56 } shader_type;
57
58 typedef enum BWRITER_COMPARISON_TYPE {
59     BWRITER_COMPARISON_NONE,
60     BWRITER_COMPARISON_GT,
61     BWRITER_COMPARISON_EQ,
62     BWRITER_COMPARISON_GE,
63     BWRITER_COMPARISON_LT,
64     BWRITER_COMPARISON_NE,
65     BWRITER_COMPARISON_LE
66 } BWRITER_COMPARISON_TYPE;
67
68 struct constant {
69     DWORD                   regnum;
70     union {
71         float               f;
72         INT                 i;
73         BOOL                b;
74         DWORD               d;
75     }                       value[4];
76 };
77
78 struct shader_reg {
79     DWORD                   type;
80     DWORD                   regnum;
81     struct shader_reg       *rel_reg;
82     DWORD                   srcmod;
83     union {
84         DWORD               swizzle;
85         DWORD               writemask;
86     };
87 };
88
89 struct instruction {
90     DWORD                   opcode;
91     DWORD                   dstmod;
92     DWORD                   shift;
93     BWRITER_COMPARISON_TYPE comptype;
94     BOOL                    has_dst;
95     struct shader_reg       dst;
96     struct shader_reg       *src;
97     unsigned int            num_srcs; /* For freeing the rel_regs */
98     BOOL                    has_predicate;
99     struct shader_reg       predicate;
100     BOOL                    coissue;
101 };
102
103 struct declaration {
104     DWORD                   usage, usage_idx;
105     DWORD                   regnum;
106     DWORD                   mod;
107     DWORD                   writemask;
108     BOOL                    builtin;
109 };
110
111 struct samplerdecl {
112     DWORD                   type;
113     DWORD                   regnum;
114     DWORD                   mod;
115 };
116
117 #define INSTRARRAY_INITIAL_SIZE 8
118 struct bwriter_shader {
119     shader_type             type;
120
121     /* Shader version selected */
122     DWORD                   version;
123
124     /* Local constants. Every constant that is not defined below is loaded from
125      * the global constant set at shader runtime
126      */
127     struct constant         **constF;
128     struct constant         **constI;
129     struct constant         **constB;
130     unsigned int            num_cf, num_ci, num_cb;
131
132     /* Declared input and output varyings */
133     struct declaration      *inputs, *outputs;
134     unsigned int            num_inputs, num_outputs;
135     struct samplerdecl      *samplers;
136     unsigned int            num_samplers;
137
138     /* Are special pixel shader 3.0 registers declared? */
139     BOOL                    vPos, vFace;
140
141     /* Array of shader instructions - The shader code itself */
142     struct instruction      **instr;
143     unsigned int            num_instrs, instr_alloc_size;
144 };
145
146 static inline LPVOID asm_alloc(SIZE_T size) {
147     return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
148 }
149
150 static inline LPVOID asm_realloc(LPVOID ptr, SIZE_T size) {
151     return HeapReAlloc(GetProcessHeap(), 0, ptr, size);
152 }
153
154 static inline BOOL asm_free(LPVOID ptr) {
155     return HeapFree(GetProcessHeap(), 0, ptr);
156 }
157
158 struct asm_parser;
159
160 /* This structure is only used in asmshader.y, but since the .l file accesses the semantic types
161  * too it has to know it as well
162  */
163 struct rel_reg {
164     BOOL            has_rel_reg;
165     DWORD           type;
166     DWORD           additional_offset;
167     DWORD           rel_regnum;
168     DWORD           swizzle;
169 };
170
171 #define MAX_SRC_REGS 4
172
173 struct src_regs {
174     struct shader_reg reg[MAX_SRC_REGS];
175     unsigned int      count;
176 };
177
178 struct asmparser_backend {
179     void (*constF)(struct asm_parser *This, DWORD reg, float x, float y, float z, float w);
180     void (*constI)(struct asm_parser *This, DWORD reg, INT x, INT y, INT z, INT w);
181     void (*constB)(struct asm_parser *This, DWORD reg, BOOL x);
182
183     void (*dstreg)(struct asm_parser *This, struct instruction *instr,
184                    const struct shader_reg *dst);
185     void (*srcreg)(struct asm_parser *This, struct instruction *instr, int num,
186                    const struct shader_reg *src);
187
188     void (*predicate)(struct asm_parser *This,
189                       const struct shader_reg *predicate);
190     void (*coissue)(struct asm_parser *This);
191
192     void (*dcl_output)(struct asm_parser *This, DWORD usage, DWORD num,
193                        const struct shader_reg *reg);
194     void (*dcl_input)(struct asm_parser *This, DWORD usage, DWORD num,
195                       DWORD mod, const struct shader_reg *reg);
196     void (*dcl_sampler)(struct asm_parser *This, DWORD samptype, DWORD mod,
197                         DWORD regnum, unsigned int line_no);
198
199     void (*end)(struct asm_parser *This);
200
201     void (*instr)(struct asm_parser *This, DWORD opcode, DWORD mod, DWORD shift,
202                   BWRITER_COMPARISON_TYPE comp, const struct shader_reg *dst,
203                   const struct src_regs *srcs, int expectednsrcs);
204 };
205
206 struct instruction *alloc_instr(unsigned int srcs);
207 BOOL add_instruction(struct bwriter_shader *shader, struct instruction *instr);
208 BOOL add_constF(struct bwriter_shader *shader, DWORD reg, float x, float y, float z, float w);
209 BOOL add_constI(struct bwriter_shader *shader, DWORD reg, INT x, INT y, INT z, INT w);
210 BOOL add_constB(struct bwriter_shader *shader, DWORD reg, BOOL x);
211 BOOL record_declaration(struct bwriter_shader *shader, DWORD usage,
212                         DWORD usage_idx, DWORD mod, BOOL output,
213                         DWORD regnum, DWORD writemask, BOOL builtin);
214 BOOL record_sampler(struct bwriter_shader *shader, DWORD samptype,
215                     DWORD mod, DWORD regnum);
216
217 #define MESSAGEBUFFER_INITIAL_SIZE 256
218
219 struct asm_parser {
220     /* The function table of the parser implementation */
221     const struct asmparser_backend *funcs;
222
223     /* Private data follows */
224     struct bwriter_shader *shader;
225     unsigned int m3x3pad_count;
226
227     enum parse_status {
228         PARSE_SUCCESS = 0,
229         PARSE_WARN = 1,
230         PARSE_ERR = 2
231     } status;
232     char *messages;
233     unsigned int messagesize;
234     unsigned int messagecapacity;
235     unsigned int line_no;
236 };
237
238 extern struct asm_parser asm_ctx;
239
240 void create_vs10_parser(struct asm_parser *ret);
241 void create_vs11_parser(struct asm_parser *ret);
242 void create_vs20_parser(struct asm_parser *ret);
243 void create_vs2x_parser(struct asm_parser *ret);
244 void create_vs30_parser(struct asm_parser *ret);
245 void create_ps10_parser(struct asm_parser *ret);
246 void create_ps11_parser(struct asm_parser *ret);
247 void create_ps12_parser(struct asm_parser *ret);
248 void create_ps13_parser(struct asm_parser *ret);
249 void create_ps14_parser(struct asm_parser *ret);
250 void create_ps20_parser(struct asm_parser *ret);
251 void create_ps2x_parser(struct asm_parser *ret);
252 void create_ps30_parser(struct asm_parser *ret);
253
254 struct bwriter_shader *parse_asm_shader(char **messages);
255
256 #ifdef __GNUC__
257 #define PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
258 #else
259 #define PRINTF_ATTR(fmt,args)
260 #endif
261
262 void asmparser_message(struct asm_parser *ctx, const char *fmt, ...) PRINTF_ATTR(2,3);
263 void set_parse_status(struct asm_parser *ctx, enum parse_status status);
264
265 /* A reasonable value as initial size */
266 #define BYTECODEBUFFER_INITIAL_SIZE 32
267 struct bytecode_buffer {
268     DWORD *data;
269     DWORD size;
270     DWORD alloc_size;
271     /* For tracking rare out of memory situations without passing
272      * return values around everywhere
273      */
274     HRESULT state;
275 };
276
277 struct bc_writer; /* Predeclaration for use in vtable parameters */
278
279 typedef void (*instr_writer)(struct bc_writer *This,
280                              const struct instruction *instr,
281                              struct bytecode_buffer *buffer);
282
283 struct bytecode_backend {
284     void (*header)(struct bc_writer *This, const struct bwriter_shader *shader,
285                    struct bytecode_buffer *buffer);
286     void (*end)(struct bc_writer *This, const struct bwriter_shader *shader,
287                 struct bytecode_buffer *buffer);
288     void (*srcreg)(struct bc_writer *This, const struct shader_reg *reg,
289                    struct bytecode_buffer *buffer);
290     void (*dstreg)(struct bc_writer *This, const struct shader_reg *reg,
291                    struct bytecode_buffer *buffer, DWORD shift, DWORD mod);
292     void (*opcode)(struct bc_writer *This, const struct instruction *instr,
293                    DWORD token, struct bytecode_buffer *buffer);
294
295     const struct instr_handler_table {
296         DWORD opcode;
297         instr_writer func;
298     } *instructions;
299 };
300
301 /* Bytecode writing stuff */
302 struct bc_writer {
303     const struct bytecode_backend *funcs;
304
305     /* Avoid result checking */
306     HRESULT                       state;
307
308     DWORD                         version;
309
310     /* Vertex shader varying mapping */
311     DWORD                         oPos_regnum;
312     DWORD                         oD_regnum[2];
313     DWORD                         oT_regnum[8];
314     DWORD                         oFog_regnum;
315     DWORD                         oFog_mask;
316     DWORD                         oPts_regnum;
317     DWORD                         oPts_mask;
318
319     /* Pixel shader specific members */
320     DWORD                         t_regnum[8];
321     DWORD                         v_regnum[2];
322 };
323
324 /* Debug utility routines */
325 const char *debug_print_srcmod(DWORD mod);
326 const char *debug_print_dstmod(DWORD mod);
327 const char *debug_print_shift(DWORD shift);
328 const char *debug_print_dstreg(const struct shader_reg *reg);
329 const char *debug_print_srcreg(const struct shader_reg *reg);
330 const char *debug_print_swizzle(DWORD swizzle);
331 const char *debug_print_writemask(DWORD mask);
332 const char *debug_print_comp(DWORD comp);
333 const char *debug_print_opcode(DWORD opcode);
334
335 /* Utilities for internal->d3d constant mapping */
336 DWORD d3d9_swizzle(DWORD bwriter_swizzle);
337 DWORD d3d9_writemask(DWORD bwriter_writemask);
338 DWORD d3d9_srcmod(DWORD bwriter_srcmod);
339 DWORD d3d9_dstmod(DWORD bwriter_mod);
340 DWORD d3d9_comparetype(DWORD bwriter_comparetype);
341 DWORD d3d9_sampler(DWORD bwriter_sampler);
342 DWORD d3d9_register(DWORD bwriter_register);
343 DWORD d3d9_opcode(DWORD bwriter_opcode);
344
345 /* Used to signal an incorrect swizzle/writemask */
346 #define SWIZZLE_ERR ~0U
347
348 /*
349   Enumerations and defines used in the bytecode writer
350   intermediate representation
351 */
352 typedef enum _BWRITERSHADER_INSTRUCTION_OPCODE_TYPE {
353     BWRITERSIO_NOP,
354     BWRITERSIO_MOV,
355     BWRITERSIO_ADD,
356     BWRITERSIO_SUB,
357     BWRITERSIO_MAD,
358     BWRITERSIO_MUL,
359     BWRITERSIO_RCP,
360     BWRITERSIO_RSQ,
361     BWRITERSIO_DP3,
362     BWRITERSIO_DP4,
363     BWRITERSIO_MIN,
364     BWRITERSIO_MAX,
365     BWRITERSIO_SLT,
366     BWRITERSIO_SGE,
367     BWRITERSIO_EXP,
368     BWRITERSIO_LOG,
369     BWRITERSIO_LIT,
370     BWRITERSIO_DST,
371     BWRITERSIO_LRP,
372     BWRITERSIO_FRC,
373     BWRITERSIO_M4x4,
374     BWRITERSIO_M4x3,
375     BWRITERSIO_M3x4,
376     BWRITERSIO_M3x3,
377     BWRITERSIO_M3x2,
378     BWRITERSIO_CALL,
379     BWRITERSIO_CALLNZ,
380     BWRITERSIO_LOOP,
381     BWRITERSIO_RET,
382     BWRITERSIO_ENDLOOP,
383     BWRITERSIO_LABEL,
384     BWRITERSIO_DCL,
385     BWRITERSIO_POW,
386     BWRITERSIO_CRS,
387     BWRITERSIO_SGN,
388     BWRITERSIO_ABS,
389     BWRITERSIO_NRM,
390     BWRITERSIO_SINCOS,
391     BWRITERSIO_REP,
392     BWRITERSIO_ENDREP,
393     BWRITERSIO_IF,
394     BWRITERSIO_IFC,
395     BWRITERSIO_ELSE,
396     BWRITERSIO_ENDIF,
397     BWRITERSIO_BREAK,
398     BWRITERSIO_BREAKC,
399     BWRITERSIO_MOVA,
400     BWRITERSIO_DEFB,
401     BWRITERSIO_DEFI,
402
403     BWRITERSIO_TEXCOORD,
404     BWRITERSIO_TEXKILL,
405     BWRITERSIO_TEX,
406     BWRITERSIO_TEXBEM,
407     BWRITERSIO_TEXBEML,
408     BWRITERSIO_TEXREG2AR,
409     BWRITERSIO_TEXREG2GB,
410     BWRITERSIO_TEXM3x2PAD,
411     BWRITERSIO_TEXM3x2TEX,
412     BWRITERSIO_TEXM3x3PAD,
413     BWRITERSIO_TEXM3x3TEX,
414     BWRITERSIO_TEXM3x3SPEC,
415     BWRITERSIO_TEXM3x3VSPEC,
416     BWRITERSIO_EXPP,
417     BWRITERSIO_LOGP,
418     BWRITERSIO_CND,
419     BWRITERSIO_DEF,
420     BWRITERSIO_TEXREG2RGB,
421     BWRITERSIO_TEXDP3TEX,
422     BWRITERSIO_TEXM3x2DEPTH,
423     BWRITERSIO_TEXDP3,
424     BWRITERSIO_TEXM3x3,
425     BWRITERSIO_TEXDEPTH,
426     BWRITERSIO_CMP,
427     BWRITERSIO_BEM,
428     BWRITERSIO_DP2ADD,
429     BWRITERSIO_DSX,
430     BWRITERSIO_DSY,
431     BWRITERSIO_TEXLDD,
432     BWRITERSIO_SETP,
433     BWRITERSIO_TEXLDL,
434     BWRITERSIO_BREAKP,
435     BWRITERSIO_TEXLDP,
436     BWRITERSIO_TEXLDB,
437
438     BWRITERSIO_PHASE,
439     BWRITERSIO_COMMENT,
440     BWRITERSIO_END,
441 } BWRITERSHADER_INSTRUCTION_OPCODE_TYPE;
442
443 typedef enum _BWRITERSHADER_PARAM_REGISTER_TYPE {
444     BWRITERSPR_TEMP,
445     BWRITERSPR_INPUT,
446     BWRITERSPR_CONST,
447     BWRITERSPR_ADDR,
448     BWRITERSPR_TEXTURE,
449     BWRITERSPR_RASTOUT,
450     BWRITERSPR_ATTROUT,
451     BWRITERSPR_TEXCRDOUT,
452     BWRITERSPR_OUTPUT,
453     BWRITERSPR_CONSTINT,
454     BWRITERSPR_COLOROUT,
455     BWRITERSPR_DEPTHOUT,
456     BWRITERSPR_SAMPLER,
457     BWRITERSPR_CONSTBOOL,
458     BWRITERSPR_LOOP,
459     BWRITERSPR_MISCTYPE,
460     BWRITERSPR_LABEL,
461     BWRITERSPR_PREDICATE
462 } BWRITERSHADER_PARAM_REGISTER_TYPE;
463
464 typedef enum _BWRITERVS_RASTOUT_OFFSETS
465 {
466     BWRITERSRO_POSITION,
467     BWRITERSRO_FOG,
468     BWRITERSRO_POINT_SIZE
469 } BWRITERVS_RASTOUT_OFFSETS;
470
471 #define BWRITERSP_WRITEMASK_0   0x1 /* .x r */
472 #define BWRITERSP_WRITEMASK_1   0x2 /* .y g */
473 #define BWRITERSP_WRITEMASK_2   0x4 /* .z b */
474 #define BWRITERSP_WRITEMASK_3   0x8 /* .w a */
475 #define BWRITERSP_WRITEMASK_ALL 0xf /* all */
476
477 typedef enum _BWRITERSHADER_PARAM_DSTMOD_TYPE {
478     BWRITERSPDM_NONE = 0,
479     BWRITERSPDM_SATURATE = 1,
480     BWRITERSPDM_PARTIALPRECISION = 2,
481     BWRITERSPDM_MSAMPCENTROID = 4,
482 } BWRITERSHADER_PARAM_DSTMOD_TYPE;
483
484 typedef enum _BWRITERSAMPLER_TEXTURE_TYPE {
485     BWRITERSTT_UNKNOWN = 0,
486     BWRITERSTT_1D = 1,
487     BWRITERSTT_2D = 2,
488     BWRITERSTT_CUBE = 3,
489     BWRITERSTT_VOLUME = 4,
490 } BWRITERSAMPLER_TEXTURE_TYPE;
491
492 #define BWRITERSI_TEXLD_PROJECT 1
493 #define BWRITERSI_TEXLD_BIAS    2
494
495 typedef enum _BWRITERSHADER_PARAM_SRCMOD_TYPE {
496     BWRITERSPSM_NONE = 0,
497     BWRITERSPSM_NEG,
498     BWRITERSPSM_BIAS,
499     BWRITERSPSM_BIASNEG,
500     BWRITERSPSM_SIGN,
501     BWRITERSPSM_SIGNNEG,
502     BWRITERSPSM_COMP,
503     BWRITERSPSM_X2,
504     BWRITERSPSM_X2NEG,
505     BWRITERSPSM_DZ,
506     BWRITERSPSM_DW,
507     BWRITERSPSM_ABS,
508     BWRITERSPSM_ABSNEG,
509     BWRITERSPSM_NOT,
510 } BWRITERSHADER_PARAM_SRCMOD_TYPE;
511
512 #define BWRITER_SM1_VS  0xfffe
513 #define BWRITER_SM1_PS  0xffff
514
515 #define BWRITERPS_VERSION(major, minor) ((BWRITER_SM1_PS << 16) | ((major) << 8) | (minor))
516 #define BWRITERVS_VERSION(major, minor) ((BWRITER_SM1_VS << 16) | ((major) << 8) | (minor))
517
518 #define BWRITERVS_SWIZZLE_SHIFT      16
519 #define BWRITERVS_SWIZZLE_MASK       (0xFF << BWRITERVS_SWIZZLE_SHIFT)
520
521 #define BWRITERVS_X_X       (0 << BWRITERVS_SWIZZLE_SHIFT)
522 #define BWRITERVS_X_Y       (1 << BWRITERVS_SWIZZLE_SHIFT)
523 #define BWRITERVS_X_Z       (2 << BWRITERVS_SWIZZLE_SHIFT)
524 #define BWRITERVS_X_W       (3 << BWRITERVS_SWIZZLE_SHIFT)
525
526 #define BWRITERVS_Y_X       (0 << (BWRITERVS_SWIZZLE_SHIFT + 2))
527 #define BWRITERVS_Y_Y       (1 << (BWRITERVS_SWIZZLE_SHIFT + 2))
528 #define BWRITERVS_Y_Z       (2 << (BWRITERVS_SWIZZLE_SHIFT + 2))
529 #define BWRITERVS_Y_W       (3 << (BWRITERVS_SWIZZLE_SHIFT + 2))
530
531 #define BWRITERVS_Z_X       (0 << (BWRITERVS_SWIZZLE_SHIFT + 4))
532 #define BWRITERVS_Z_Y       (1 << (BWRITERVS_SWIZZLE_SHIFT + 4))
533 #define BWRITERVS_Z_Z       (2 << (BWRITERVS_SWIZZLE_SHIFT + 4))
534 #define BWRITERVS_Z_W       (3 << (BWRITERVS_SWIZZLE_SHIFT + 4))
535
536 #define BWRITERVS_W_X       (0 << (BWRITERVS_SWIZZLE_SHIFT + 6))
537 #define BWRITERVS_W_Y       (1 << (BWRITERVS_SWIZZLE_SHIFT + 6))
538 #define BWRITERVS_W_Z       (2 << (BWRITERVS_SWIZZLE_SHIFT + 6))
539 #define BWRITERVS_W_W       (3 << (BWRITERVS_SWIZZLE_SHIFT + 6))
540
541 #define BWRITERVS_NOSWIZZLE (BWRITERVS_X_X | BWRITERVS_Y_Y | BWRITERVS_Z_Z | BWRITERVS_W_W)
542
543 #define BWRITERVS_SWIZZLE_X (BWRITERVS_X_X | BWRITERVS_Y_X | BWRITERVS_Z_X | BWRITERVS_W_X)
544 #define BWRITERVS_SWIZZLE_Y (BWRITERVS_X_Y | BWRITERVS_Y_Y | BWRITERVS_Z_Y | BWRITERVS_W_Y)
545 #define BWRITERVS_SWIZZLE_Z (BWRITERVS_X_Z | BWRITERVS_Y_Z | BWRITERVS_Z_Z | BWRITERVS_W_Z)
546 #define BWRITERVS_SWIZZLE_W (BWRITERVS_X_W | BWRITERVS_Y_W | BWRITERVS_Z_W | BWRITERVS_W_W)
547
548 typedef enum _BWRITERDECLUSAGE {
549     BWRITERDECLUSAGE_POSITION,
550     BWRITERDECLUSAGE_BLENDWEIGHT,
551     BWRITERDECLUSAGE_BLENDINDICES,
552     BWRITERDECLUSAGE_NORMAL,
553     BWRITERDECLUSAGE_PSIZE,
554     BWRITERDECLUSAGE_TEXCOORD,
555     BWRITERDECLUSAGE_TANGENT,
556     BWRITERDECLUSAGE_BINORMAL,
557     BWRITERDECLUSAGE_TESSFACTOR,
558     BWRITERDECLUSAGE_POSITIONT,
559     BWRITERDECLUSAGE_COLOR,
560     BWRITERDECLUSAGE_FOG,
561     BWRITERDECLUSAGE_DEPTH,
562     BWRITERDECLUSAGE_SAMPLE
563 } BWRITERDECLUSAGE;
564
565 /* ps 1.x texture registers mappings */
566 #define T0_REG          2
567 #define T1_REG          3
568 #define T2_REG          4
569 #define T3_REG          5
570
571 struct bwriter_shader *SlAssembleShader(const char *text, char **messages);
572 DWORD SlWriteBytecode(const struct bwriter_shader *shader, int dxversion, DWORD **result);
573 void SlDeleteShader(struct bwriter_shader *shader);
574
575 #endif /* __WINE_D3DCOMPILER_PRIVATE_H */