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