1 /**************************************************************************
3 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
29 * Polygon stipple stage: implement polygon stipple with texture map and
30 * fragment program. The fragment program samples the texture and does
31 * a fragment kill for the stipple-failing fragments.
37 #include "pipe/p_util.h"
38 #include "pipe/p_inlines.h"
39 #include "pipe/p_context.h"
40 #include "pipe/p_defines.h"
41 #include "pipe/p_shader_tokens.h"
43 #include "tgsi/util/tgsi_transform.h"
44 #include "tgsi/util/tgsi_dump.h"
46 #include "draw_context.h"
47 #include "draw_private.h"
52 * Subclass of pipe_shader_state to carry extra fragment shader info.
54 struct pstip_fragment_shader
56 struct pipe_shader_state state
;
63 * Subclass of draw_stage
67 struct draw_stage stage
;
70 struct pipe_texture
*texture
;
74 * Currently bound state
76 struct pstip_fragment_shader
*fs
;
78 void *sampler
[PIPE_MAX_SAMPLERS
];
79 struct pipe_texture
*texture
[PIPE_MAX_SAMPLERS
];
80 const struct pipe_poly_stipple
*stipple
;
84 * Driver interface/override functions
86 void * (*driver_create_fs_state
)(struct pipe_context
*,
87 const struct pipe_shader_state
*);
88 void (*driver_bind_fs_state
)(struct pipe_context
*, void *);
89 void (*driver_delete_fs_state
)(struct pipe_context
*, void *);
91 void (*driver_bind_sampler_state
)(struct pipe_context
*, unsigned, void *);
93 void (*driver_set_sampler_texture
)(struct pipe_context
*,
95 struct pipe_texture
*);
97 void (*driver_set_polygon_stipple
)(struct pipe_context
*,
98 const struct pipe_poly_stipple
*);
100 struct pipe_context
*pipe
;
106 * Subclass of tgsi_transform_context, used for transforming the
107 * user's fragment shader to add the special AA instructions.
109 struct pstip_transform_context
{
110 struct tgsi_transform_context base
;
111 uint tempsUsed
; /**< bitmask */
114 int maxSampler
; /**< max sampler index found */
115 int texTemp
; /**< temp registers */
117 boolean firstInstruction
;
122 * TGSI declaration transform callback.
123 * Look for a free sampler, a free input attrib, and two free temp regs.
126 pstip_transform_decl(struct tgsi_transform_context
*ctx
,
127 struct tgsi_full_declaration
*decl
)
129 struct pstip_transform_context
*pctx
= (struct pstip_transform_context
*) ctx
;
131 if (decl
->Declaration
.File
== TGSI_FILE_SAMPLER
) {
132 if ((int) decl
->u
.DeclarationRange
.Last
> pctx
->maxSampler
)
133 pctx
->maxSampler
= (int) decl
->u
.DeclarationRange
.Last
;
135 else if (decl
->Declaration
.File
== TGSI_FILE_INPUT
) {
136 pctx
->maxInput
= MAX2(pctx
->maxInput
, decl
->u
.DeclarationRange
.Last
);
137 if (decl
->Semantic
.SemanticName
== TGSI_SEMANTIC_POSITION
)
138 pctx
->wincoordInput
= (int) decl
->u
.DeclarationRange
.First
;
140 else if (decl
->Declaration
.File
== TGSI_FILE_TEMPORARY
) {
142 for (i
= decl
->u
.DeclarationRange
.First
;
143 i
<= decl
->u
.DeclarationRange
.Last
; i
++) {
144 pctx
->tempsUsed
|= (1 << i
);
148 ctx
->emit_declaration(ctx
, decl
);
153 pstip_transform_immed(struct tgsi_transform_context
*ctx
,
154 struct tgsi_full_immediate
*immed
)
156 struct pstip_transform_context
*pctx
= (struct pstip_transform_context
*) ctx
;
162 * TGSI instruction transform callback.
163 * Replace writes to result.color w/ a temp reg.
164 * Upon END instruction, insert texture sampling code for antialiasing.
167 pstip_transform_inst(struct tgsi_transform_context
*ctx
,
168 struct tgsi_full_instruction
*inst
)
170 struct pstip_transform_context
*pctx
= (struct pstip_transform_context
*) ctx
;
172 if (pctx
->firstInstruction
) {
173 /* emit our new declarations before the first instruction */
175 struct tgsi_full_declaration decl
;
176 struct tgsi_full_instruction newInst
;
179 const int sampler
= pctx
->maxSampler
+ 1;
181 if (pctx
->wincoordInput
< 0)
182 wincoordInput
= pctx
->maxInput
+ 1;
184 wincoordInput
= pctx
->wincoordInput
;
186 /* find one free temp reg */
187 for (i
= 0; i
< 32; i
++) {
188 if ((pctx
->tempsUsed
& (1 << i
)) == 0) {
189 /* found a free temp */
190 if (pctx
->texTemp
< 0)
196 assert(pctx
->texTemp
>= 0);
198 if (pctx
->wincoordInput
< 0) {
199 /* declare new position input reg */
200 decl
= tgsi_default_full_declaration();
201 decl
.Declaration
.File
= TGSI_FILE_INPUT
;
202 decl
.Declaration
.Semantic
= 1;
203 decl
.Semantic
.SemanticName
= TGSI_SEMANTIC_POSITION
;
204 decl
.Semantic
.SemanticIndex
= 0;
205 decl
.Declaration
.Interpolate
= 1;
206 decl
.Interpolation
.Interpolate
= TGSI_INTERPOLATE_LINEAR
; /* XXX? */
207 decl
.u
.DeclarationRange
.First
=
208 decl
.u
.DeclarationRange
.Last
= wincoordInput
;
209 ctx
->emit_declaration(ctx
, &decl
);
212 /* declare new sampler */
213 decl
= tgsi_default_full_declaration();
214 decl
.Declaration
.File
= TGSI_FILE_SAMPLER
;
215 decl
.u
.DeclarationRange
.First
=
216 decl
.u
.DeclarationRange
.Last
= sampler
;
217 ctx
->emit_declaration(ctx
, &decl
);
219 /* declare new temp regs */
220 decl
= tgsi_default_full_declaration();
221 decl
.Declaration
.File
= TGSI_FILE_TEMPORARY
;
222 decl
.u
.DeclarationRange
.First
=
223 decl
.u
.DeclarationRange
.Last
= pctx
->texTemp
;
224 ctx
->emit_declaration(ctx
, &decl
);
226 /* emit immediate = {1/32, 1/32, 1, 1}
227 * The index/position of this immediate will be pctx->numImmed
230 static const float value
[4] = { 1.0/32, 1.0/32, 1.0, 1.0 };
231 struct tgsi_full_immediate immed
;
233 immed
= tgsi_default_full_immediate();
234 immed
.Immediate
.Size
= 1 + size
; /* one for the token itself */
235 immed
.u
.ImmediateFloat32
= (struct tgsi_immediate_float32
*) value
;
236 ctx
->emit_immediate(ctx
, &immed
);
239 pctx
->firstInstruction
= FALSE
;
243 * Insert new MUL/TEX/KILP instructions at start of program
244 * Take gl_FragCoord, divide by 32 (stipple size), sample the
245 * texture and kill fragment if needed.
247 * We'd like to use non-normalized texcoords to index into a RECT
248 * texture, but we can only use GL_REPEAT wrap mode with normalized
252 /* MUL texTemp, INPUT[wincoord], 1/32; */
253 newInst
= tgsi_default_full_instruction();
254 newInst
.Instruction
.Opcode
= TGSI_OPCODE_MUL
;
255 newInst
.Instruction
.NumDstRegs
= 1;
256 newInst
.FullDstRegisters
[0].DstRegister
.File
= TGSI_FILE_TEMPORARY
;
257 newInst
.FullDstRegisters
[0].DstRegister
.Index
= pctx
->texTemp
;
258 newInst
.Instruction
.NumSrcRegs
= 2;
259 newInst
.FullSrcRegisters
[0].SrcRegister
.File
= TGSI_FILE_INPUT
;
260 newInst
.FullSrcRegisters
[0].SrcRegister
.Index
= wincoordInput
;
261 newInst
.FullSrcRegisters
[1].SrcRegister
.File
= TGSI_FILE_IMMEDIATE
;
262 newInst
.FullSrcRegisters
[1].SrcRegister
.Index
= pctx
->numImmed
;
263 ctx
->emit_instruction(ctx
, &newInst
);
265 /* TEX texTemp, texTemp, sampler; */
266 newInst
= tgsi_default_full_instruction();
267 newInst
.Instruction
.Opcode
= TGSI_OPCODE_TEX
;
268 newInst
.Instruction
.NumDstRegs
= 1;
269 newInst
.FullDstRegisters
[0].DstRegister
.File
= TGSI_FILE_TEMPORARY
;
270 newInst
.FullDstRegisters
[0].DstRegister
.Index
= pctx
->texTemp
;
271 newInst
.Instruction
.NumSrcRegs
= 2;
272 newInst
.InstructionExtTexture
.Texture
= TGSI_TEXTURE_2D
;
273 newInst
.FullSrcRegisters
[0].SrcRegister
.File
= TGSI_FILE_TEMPORARY
;
274 newInst
.FullSrcRegisters
[0].SrcRegister
.Index
= pctx
->texTemp
;
275 newInst
.FullSrcRegisters
[1].SrcRegister
.File
= TGSI_FILE_SAMPLER
;
276 newInst
.FullSrcRegisters
[1].SrcRegister
.Index
= sampler
;
277 ctx
->emit_instruction(ctx
, &newInst
);
279 /* KILP texTemp; # if texTemp < 0, KILL fragment */
280 newInst
= tgsi_default_full_instruction();
281 newInst
.Instruction
.Opcode
= TGSI_OPCODE_KILP
;
282 newInst
.Instruction
.NumDstRegs
= 0;
283 newInst
.Instruction
.NumSrcRegs
= 1;
284 newInst
.FullSrcRegisters
[0].SrcRegister
.File
= TGSI_FILE_TEMPORARY
;
285 newInst
.FullSrcRegisters
[0].SrcRegister
.Index
= pctx
->texTemp
;
286 newInst
.FullSrcRegisters
[0].SrcRegister
.Negate
= 1;
287 ctx
->emit_instruction(ctx
, &newInst
);
290 /* emit this instruction */
291 ctx
->emit_instruction(ctx
, inst
);
296 * Generate the frag shader we'll use for doing polygon stipple.
297 * This will be the user's shader prefixed with a TEX and KIL instruction.
300 generate_pstip_fs(struct pstip_stage
*pstip
)
302 const struct pipe_shader_state
*orig_fs
= &pstip
->fs
->state
;
303 /*struct draw_context *draw = pstip->stage.draw;*/
304 struct pipe_shader_state pstip_fs
;
305 struct pstip_transform_context transform
;
309 pstip_fs
= *orig_fs
; /* copy to init */
310 pstip_fs
.tokens
= MALLOC(sizeof(struct tgsi_token
) * MAX
);
312 memset(&transform
, 0, sizeof(transform
));
313 transform
.wincoordInput
= -1;
314 transform
.maxInput
= -1;
315 transform
.maxSampler
= -1;
316 transform
.texTemp
= -1;
317 transform
.firstInstruction
= TRUE
;
318 transform
.base
.transform_instruction
= pstip_transform_inst
;
319 transform
.base
.transform_declaration
= pstip_transform_decl
;
320 transform
.base
.transform_immediate
= pstip_transform_immed
;
322 tgsi_transform_shader(orig_fs
->tokens
,
323 (struct tgsi_token
*) pstip_fs
.tokens
,
324 MAX
, &transform
.base
);
327 tgsi_dump(orig_fs
->tokens
, 0);
328 tgsi_dump(pstip_fs
.tokens
, 0);
331 pstip
->sampler_unit
= transform
.maxSampler
+ 1;
333 if (transform
.wincoordInput
< 0) {
334 pstip_fs
.input_semantic_name
[pstip_fs
.num_inputs
] = TGSI_SEMANTIC_POSITION
;
335 pstip_fs
.input_semantic_index
[pstip_fs
.num_inputs
] = transform
.maxInput
;
336 pstip_fs
.num_inputs
++;
339 pstip
->fs
->pstip_fs
= pstip
->driver_create_fs_state(pstip
->pipe
, &pstip_fs
);
344 * Load texture image with current stipple pattern.
347 pstip_update_texture(struct pstip_stage
*pstip
)
349 static const uint bit31
= 1 << 31;
350 struct pipe_context
*pipe
= pstip
->pipe
;
351 struct pipe_surface
*surface
;
352 const uint
*stipple
= pstip
->state
.stipple
->stipple
;
356 surface
= pipe
->get_tex_surface(pipe
, pstip
->texture
, 0, 0, 0);
357 data
= pipe_surface_map(surface
);
360 * Load alpha texture.
361 * Note: 0 means keep the fragment, 255 means kill it.
362 * We'll negate the texel value and use KILP which kills if value
365 for (i
= 0; i
< 32; i
++) {
366 for (j
= 0; j
< 32; j
++) {
367 if (stipple
[i
] & (bit31
>> j
)) {
369 data
[i
* surface
->pitch
+ j
] = 0;
373 data
[i
* surface
->pitch
+ j
] = 255;
379 pipe_surface_unmap(surface
);
380 pipe_surface_reference(&surface
, NULL
);
381 pipe
->texture_update(pipe
, pstip
->texture
);
386 * Create the texture map we'll use for stippling.
389 pstip_create_texture(struct pstip_stage
*pstip
)
391 struct pipe_context
*pipe
= pstip
->pipe
;
392 struct pipe_texture texTemp
;
394 memset(&texTemp
, 0, sizeof(texTemp
));
395 texTemp
.target
= PIPE_TEXTURE_2D
;
396 texTemp
.format
= PIPE_FORMAT_U_A8
; /* XXX verify supported by driver! */
397 texTemp
.last_level
= 0;
398 texTemp
.width
[0] = 32;
399 texTemp
.height
[0] = 32;
400 texTemp
.depth
[0] = 1;
403 pstip
->texture
= pipe
->texture_create(pipe
, &texTemp
);
405 //pstip_update_texture(pstip);
410 * Create the sampler CSO that'll be used for antialiasing.
411 * By using a mipmapped texture, we don't have to generate a different
412 * texture image for each line size.
415 pstip_create_sampler(struct pstip_stage
*pstip
)
417 struct pipe_sampler_state sampler
;
418 struct pipe_context
*pipe
= pstip
->pipe
;
420 memset(&sampler
, 0, sizeof(sampler
));
421 sampler
.wrap_s
= PIPE_TEX_WRAP_REPEAT
;
422 sampler
.wrap_t
= PIPE_TEX_WRAP_REPEAT
;
423 sampler
.wrap_r
= PIPE_TEX_WRAP_REPEAT
;
424 sampler
.min_mip_filter
= PIPE_TEX_MIPFILTER_NONE
;
425 sampler
.min_img_filter
= PIPE_TEX_FILTER_NEAREST
;
426 sampler
.mag_img_filter
= PIPE_TEX_FILTER_NEAREST
;
427 sampler
.normalized_coords
= 1;
428 sampler
.min_lod
= 0.0f
;
429 sampler
.max_lod
= 0.0f
;
431 pstip
->sampler_cso
= pipe
->create_sampler_state(pipe
, &sampler
);
436 * When we're about to draw our first AA line in a batch, this function is
437 * called to tell the driver to bind our modified fragment shader.
440 bind_pstip_fragment_shader(struct pstip_stage
*pstip
)
442 if (!pstip
->fs
->pstip_fs
) {
443 generate_pstip_fs(pstip
);
445 pstip
->driver_bind_fs_state(pstip
->pipe
, pstip
->fs
->pstip_fs
);
450 static INLINE
struct pstip_stage
*
451 pstip_stage( struct draw_stage
*stage
)
453 return (struct pstip_stage
*) stage
;
458 passthrough_point(struct draw_stage
*stage
, struct prim_header
*header
)
460 stage
->next
->point(stage
->next
, header
);
465 passthrough_line(struct draw_stage
*stage
, struct prim_header
*header
)
467 stage
->next
->line(stage
->next
, header
);
472 passthrough_tri(struct draw_stage
*stage
, struct prim_header
*header
)
474 stage
->next
->tri(stage
->next
, header
);
480 pstip_first_tri(struct draw_stage
*stage
, struct prim_header
*header
)
482 struct pstip_stage
*pstip
= pstip_stage(stage
);
483 struct draw_context
*draw
= stage
->draw
;
484 struct pipe_context
*pipe
= pstip
->pipe
;
486 assert(draw
->rasterizer
->poly_stipple_enable
);
489 * Bind our fragprog, sampler and texture
491 bind_pstip_fragment_shader(pstip
);
493 pstip
->driver_bind_sampler_state(pipe
, pstip
->sampler_unit
, pstip
->sampler_cso
);
494 pstip
->driver_set_sampler_texture(pipe
, pstip
->sampler_unit
, pstip
->texture
);
496 /* now really draw first line */
497 stage
->tri
= passthrough_tri
;
498 stage
->tri(stage
, header
);
503 pstip_flush(struct draw_stage
*stage
, unsigned flags
)
505 /*struct draw_context *draw = stage->draw;*/
506 struct pstip_stage
*pstip
= pstip_stage(stage
);
507 struct pipe_context
*pipe
= pstip
->pipe
;
509 stage
->tri
= pstip_first_tri
;
510 stage
->next
->flush( stage
->next
, flags
);
512 /* restore original frag shader */
513 pstip
->driver_bind_fs_state(pipe
, pstip
->fs
->driver_fs
);
515 /* XXX restore original texture, sampler state */
516 pstip
->driver_bind_sampler_state(pipe
, pstip
->sampler_unit
,
517 pstip
->state
.sampler
[pstip
->sampler_unit
]);
518 pstip
->driver_set_sampler_texture(pipe
, pstip
->sampler_unit
,
519 pstip
->state
.texture
[pstip
->sampler_unit
]);
524 pstip_reset_stipple_counter(struct draw_stage
*stage
)
526 stage
->next
->reset_stipple_counter( stage
->next
);
531 pstip_destroy(struct draw_stage
*stage
)
533 draw_free_temp_verts( stage
);
538 static struct pstip_stage
*
539 draw_pstip_stage(struct draw_context
*draw
)
541 struct pstip_stage
*pstip
= CALLOC_STRUCT(pstip_stage
);
543 draw_alloc_temp_verts( &pstip
->stage
, 8 );
545 pstip
->stage
.draw
= draw
;
546 pstip
->stage
.next
= NULL
;
547 pstip
->stage
.point
= passthrough_point
;
548 pstip
->stage
.line
= passthrough_line
;
549 pstip
->stage
.tri
= pstip_first_tri
;
550 pstip
->stage
.flush
= pstip_flush
;
551 pstip
->stage
.reset_stipple_counter
= pstip_reset_stipple_counter
;
552 pstip
->stage
.destroy
= pstip_destroy
;
559 * XXX temporary? solution to mapping a pipe_context to a pstip_stage.
562 #define MAX_CONTEXTS 10
564 static struct pipe_context
*Pipe
[MAX_CONTEXTS
];
565 static struct pstip_stage
*Stage
[MAX_CONTEXTS
];
566 static uint NumContexts
;
569 add_pstip_pipe_context(struct pipe_context
*pipe
, struct pstip_stage
*pstip
)
571 assert(NumContexts
< MAX_CONTEXTS
);
572 Pipe
[NumContexts
] = pipe
;
573 Stage
[NumContexts
] = pstip
;
577 static struct pstip_stage
*
578 pstip_stage_from_pipe(struct pipe_context
*pipe
)
581 for (i
= 0; i
< NumContexts
; i
++) {
591 * This function overrides the driver's create_fs_state() function and
592 * will typically be called by the state tracker.
595 pstip_create_fs_state(struct pipe_context
*pipe
,
596 const struct pipe_shader_state
*fs
)
598 struct pstip_stage
*pstip
= pstip_stage_from_pipe(pipe
);
599 struct pstip_fragment_shader
*aafs
= CALLOC_STRUCT(pstip_fragment_shader
);
605 aafs
->driver_fs
= pstip
->driver_create_fs_state(pstip
->pipe
, fs
);
613 pstip_bind_fs_state(struct pipe_context
*pipe
, void *fs
)
615 struct pstip_stage
*pstip
= pstip_stage_from_pipe(pipe
);
616 struct pstip_fragment_shader
*aafs
= (struct pstip_fragment_shader
*) fs
;
620 pstip
->driver_bind_fs_state(pstip
->pipe
, aafs
->driver_fs
);
625 pstip_delete_fs_state(struct pipe_context
*pipe
, void *fs
)
627 struct pstip_stage
*pstip
= pstip_stage_from_pipe(pipe
);
628 struct pstip_fragment_shader
*aafs
= (struct pstip_fragment_shader
*) fs
;
630 pstip
->driver_delete_fs_state(pstip
->pipe
, aafs
->driver_fs
);
636 pstip_bind_sampler_state(struct pipe_context
*pipe
,
637 unsigned unit
, void *sampler
)
639 struct pstip_stage
*pstip
= pstip_stage_from_pipe(pipe
);
641 pstip
->state
.sampler
[unit
] = sampler
;
643 pstip
->driver_bind_sampler_state(pstip
->pipe
, unit
, sampler
);
648 pstip_set_sampler_texture(struct pipe_context
*pipe
,
649 unsigned sampler
, struct pipe_texture
*texture
)
651 struct pstip_stage
*pstip
= pstip_stage_from_pipe(pipe
);
653 pstip
->state
.texture
[sampler
] = texture
;
655 pstip
->driver_set_sampler_texture(pstip
->pipe
, sampler
, texture
);
660 pstip_set_polygon_stipple(struct pipe_context
*pipe
,
661 const struct pipe_poly_stipple
*stipple
)
663 struct pstip_stage
*pstip
= pstip_stage_from_pipe(pipe
);
665 pstip
->state
.stipple
= stipple
;
667 pstip
->driver_set_polygon_stipple(pstip
->pipe
, stipple
);
669 pstip_update_texture(pstip
);
675 * Called by drivers that want to install this AA line prim stage
676 * into the draw module's pipeline. This will not be used if the
677 * hardware has native support for AA lines.
680 draw_install_pstipple_stage(struct draw_context
*draw
,
681 struct pipe_context
*pipe
)
683 struct pstip_stage
*pstip
;
686 * Create / install AA line drawing / prim stage
688 pstip
= draw_pstip_stage( draw
);
690 draw
->pipeline
.pstipple
= &pstip
->stage
;
694 /* create special texture, sampler state */
695 pstip_create_texture(pstip
);
696 pstip_create_sampler(pstip
);
698 /* save original driver functions */
699 pstip
->driver_create_fs_state
= pipe
->create_fs_state
;
700 pstip
->driver_bind_fs_state
= pipe
->bind_fs_state
;
701 pstip
->driver_delete_fs_state
= pipe
->delete_fs_state
;
703 pstip
->driver_bind_sampler_state
= pipe
->bind_sampler_state
;
704 pstip
->driver_set_sampler_texture
= pipe
->set_sampler_texture
;
705 pstip
->driver_set_polygon_stipple
= pipe
->set_polygon_stipple
;
707 /* override the driver's functions */
708 pipe
->create_fs_state
= pstip_create_fs_state
;
709 pipe
->bind_fs_state
= pstip_bind_fs_state
;
710 pipe
->delete_fs_state
= pstip_delete_fs_state
;
712 pipe
->bind_sampler_state
= pstip_bind_sampler_state
;
713 pipe
->set_sampler_texture
= pstip_set_sampler_texture
;
714 pipe
->set_polygon_stipple
= pstip_set_polygon_stipple
;
716 add_pstip_pipe_context(pipe
, pstip
);