Lines Matching refs:so

9  * Software is furnished to do so, subject to the following conditions:
41 struct nv30_blend_stateobj *so;
45 so = CALLOC_STRUCT(nv30_blend_stateobj);
46 if (!so)
48 so->pipe = *cso;
51 SB_MTHD30(so, COLOR_LOGIC_OP_ENABLE, 2);
52 SB_DATA (so, 1);
53 SB_DATA (so, nvgl_logicop_func(cso->logicop_func));
55 SB_MTHD30(so, COLOR_LOGIC_OP_ENABLE, 1);
56 SB_DATA (so, 0);
59 SB_MTHD30(so, DITHER_ENABLE, 1);
60 SB_DATA (so, cso->dither);
86 SB_MTHD40(so, MRT_BLEND_ENABLE, 2);
87 SB_DATA (so, blend[1]);
88 SB_DATA (so, cmask[1]);
92 SB_MTHD30(so, BLEND_FUNC_ENABLE, 3);
93 SB_DATA (so, blend[0]);
94 SB_DATA (so, (nvgl_blend_func(cso->rt[0].alpha_src_factor) << 16) |
96 SB_DATA (so, (nvgl_blend_func(cso->rt[0].alpha_dst_factor) << 16) |
99 SB_MTHD30(so, BLEND_EQUATION, 1);
100 SB_DATA (so, nvgl_blend_eqn(cso->rt[0].rgb_func));
102 SB_MTHD40(so, BLEND_EQUATION, 1);
103 SB_DATA (so, (nvgl_blend_eqn(cso->rt[0].alpha_func) << 16) |
107 SB_MTHD30(so, BLEND_FUNC_ENABLE, 1);
108 SB_DATA (so, blend[0]);
111 SB_MTHD30(so, COLOR_MASK, 1);
112 SB_DATA (so, cmask[0]);
113 return so;
135 struct nv30_rasterizer_stateobj *so;
137 so = CALLOC_STRUCT(nv30_rasterizer_stateobj);
138 if (!so)
140 so->pipe = *cso;
142 SB_MTHD30(so, SHADE_MODEL, 1);
143 SB_DATA (so, cso->flatshade ? NV30_3D_SHADE_MODEL_FLAT :
146 SB_MTHD30(so, POLYGON_MODE_FRONT, 6);
147 SB_DATA (so, nvgl_polygon_mode(cso->fill_front));
148 SB_DATA (so, nvgl_polygon_mode(cso->fill_back));
150 SB_DATA (so, NV30_3D_CULL_FACE_FRONT_AND_BACK);
153 SB_DATA (so, NV30_3D_CULL_FACE_FRONT);
155 SB_DATA (so, NV30_3D_CULL_FACE_BACK);
156 SB_DATA (so, cso->front_ccw ? NV30_3D_FRONT_FACE_CCW :
158 SB_DATA (so, cso->poly_smooth);
159 SB_DATA (so, cso->cull_face != PIPE_FACE_NONE);
161 SB_MTHD30(so, POLYGON_OFFSET_POINT_ENABLE, 3);
162 SB_DATA (so, cso->offset_point);
163 SB_DATA (so, cso->offset_line);
164 SB_DATA (so, cso->offset_tri);
166 SB_MTHD30(so, POLYGON_OFFSET_FACTOR, 2);
167 SB_DATA (so, fui(cso->offset_scale));
168 SB_DATA (so, fui(cso->offset_units * 2.0));
171 SB_MTHD30(so, LINE_WIDTH, 2);
172 SB_DATA (so, (unsigned char)(cso->line_width * 8.0) & 0xff);
173 SB_DATA (so, cso->line_smooth);
174 SB_MTHD30(so, LINE_STIPPLE_ENABLE, 2);
175 SB_DATA (so, cso->line_stipple_enable);
176 SB_DATA (so, (cso->line_stipple_pattern << 16) |
179 SB_MTHD30(so, VERTEX_TWO_SIDE_ENABLE, 1);
180 SB_DATA (so, cso->light_twoside);
181 SB_MTHD30(so, POLYGON_STIPPLE_ENABLE, 1);
182 SB_DATA (so, cso->poly_stipple_enable);
183 SB_MTHD30(so, POINT_SIZE, 1);
184 SB_DATA (so, fui(cso->point_size));
185 SB_MTHD30(so, FLATSHADE_FIRST, 1);
186 SB_DATA (so, cso->flatshade_first);
188 SB_MTHD30(so, DEPTH_CONTROL, 1);
189 SB_DATA (so, cso->depth_clip ? 0x00000001 : 0x00000010);
190 return so;
212 struct nv30_zsa_stateobj *so;
214 so = CALLOC_STRUCT(nv30_zsa_stateobj);
215 if (!so)
217 so->pipe = *cso;
219 SB_MTHD30(so, DEPTH_FUNC, 3);
220 SB_DATA (so, nvgl_comparison_op(cso->depth.func));
221 SB_DATA (so, cso->depth.writemask);
222 SB_DATA (so, cso->depth.enabled);
225 SB_MTHD30(so, STENCIL_ENABLE(0), 3);
226 SB_DATA (so, 1);
227 SB_DATA (so, cso->stencil[0].writemask);
228 SB_DATA (so, nvgl_comparison_op(cso->stencil[0].func));
229 SB_MTHD30(so, STENCIL_FUNC_MASK(0), 4);
230 SB_DATA (so, cso->stencil[0].valuemask);
231 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].fail_op));
232 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zfail_op));
233 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zpass_op));
235 SB_MTHD30(so, STENCIL_ENABLE(0), 2);
236 SB_DATA (so, 0);
237 SB_DATA (so, 0x000000ff);
241 SB_MTHD30(so, STENCIL_ENABLE(1), 3);
242 SB_DATA (so, 1);
243 SB_DATA (so, cso->stencil[1].writemask);
244 SB_DATA (so, nvgl_comparison_op(cso->stencil[1].func));
245 SB_MTHD30(so, STENCIL_FUNC_MASK(1), 4);
246 SB_DATA (so, cso->stencil[1].valuemask);
247 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].fail_op));
248 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zfail_op));
249 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zpass_op));
251 SB_MTHD30(so, STENCIL_ENABLE(1), 1);
252 SB_DATA (so, 0);
255 SB_MTHD30(so, ALPHA_FUNC_ENABLE, 3);
256 SB_DATA (so, cso->alpha.enabled ? 1 : 0);
257 SB_DATA (so, nvgl_comparison_op(cso->alpha.func));
258 SB_DATA (so, float_to_ubyte(cso->alpha.ref_value));
260 return so;