Lines Matching refs:so
89 struct nvc0_blend_stateobj *so = CALLOC_STRUCT(nvc0_blend_stateobj); in nvc0_blend_state_create() local
97 so->pipe = *cso; in nvc0_blend_state_create()
133 SB_BEGIN_3D(so, LOGIC_OP_ENABLE, 2); in nvc0_blend_state_create()
134 SB_DATA (so, 1); in nvc0_blend_state_create()
135 SB_DATA (so, nvgl_logicop_func(cso->logicop_func)); in nvc0_blend_state_create()
137 SB_IMMED_3D(so, MACRO_BLEND_ENABLES, 0); in nvc0_blend_state_create()
139 SB_IMMED_3D(so, LOGIC_OP_ENABLE, 0); in nvc0_blend_state_create()
141 SB_IMMED_3D(so, BLEND_INDEPENDENT, indep_funcs); in nvc0_blend_state_create()
142 SB_IMMED_3D(so, MACRO_BLEND_ENABLES, blend_en); in nvc0_blend_state_create()
146 SB_BEGIN_3D(so, IBLEND_EQUATION_RGB(i), 6); in nvc0_blend_state_create()
147 SB_DATA (so, nvgl_blend_eqn(cso->rt[i].rgb_func)); in nvc0_blend_state_create()
148 SB_DATA (so, nvc0_blend_fac(cso->rt[i].rgb_src_factor)); in nvc0_blend_state_create()
149 SB_DATA (so, nvc0_blend_fac(cso->rt[i].rgb_dst_factor)); in nvc0_blend_state_create()
150 SB_DATA (so, nvgl_blend_eqn(cso->rt[i].alpha_func)); in nvc0_blend_state_create()
151 SB_DATA (so, nvc0_blend_fac(cso->rt[i].alpha_src_factor)); in nvc0_blend_state_create()
152 SB_DATA (so, nvc0_blend_fac(cso->rt[i].alpha_dst_factor)); in nvc0_blend_state_create()
157 SB_BEGIN_3D(so, BLEND_EQUATION_RGB, 5); in nvc0_blend_state_create()
158 SB_DATA (so, nvgl_blend_eqn(cso->rt[r].rgb_func)); in nvc0_blend_state_create()
159 SB_DATA (so, nvc0_blend_fac(cso->rt[r].rgb_src_factor)); in nvc0_blend_state_create()
160 SB_DATA (so, nvc0_blend_fac(cso->rt[r].rgb_dst_factor)); in nvc0_blend_state_create()
161 SB_DATA (so, nvgl_blend_eqn(cso->rt[r].alpha_func)); in nvc0_blend_state_create()
162 SB_DATA (so, nvc0_blend_fac(cso->rt[r].alpha_src_factor)); in nvc0_blend_state_create()
163 SB_BEGIN_3D(so, BLEND_FUNC_DST_ALPHA, 1); in nvc0_blend_state_create()
164 SB_DATA (so, nvc0_blend_fac(cso->rt[r].alpha_dst_factor)); in nvc0_blend_state_create()
167 SB_IMMED_3D(so, COLOR_MASK_COMMON, !indep_masks); in nvc0_blend_state_create()
169 SB_BEGIN_3D(so, COLOR_MASK(0), 8); in nvc0_blend_state_create()
171 SB_DATA(so, nvc0_colormask(cso->rt[i].colormask)); in nvc0_blend_state_create()
173 SB_BEGIN_3D(so, COLOR_MASK(0), 1); in nvc0_blend_state_create()
174 SB_DATA (so, nvc0_colormask(cso->rt[0].colormask)); in nvc0_blend_state_create()
184 SB_BEGIN_3D(so, MULTISAMPLE_CTRL, 1); in nvc0_blend_state_create()
185 SB_DATA (so, ms); in nvc0_blend_state_create()
187 assert(so->size <= (sizeof(so->state) / sizeof(so->state[0]))); in nvc0_blend_state_create()
188 return so; in nvc0_blend_state_create()
211 struct nvc0_rasterizer_stateobj *so; in nvc0_rasterizer_state_create() local
214 so = CALLOC_STRUCT(nvc0_rasterizer_stateobj); in nvc0_rasterizer_state_create()
215 if (!so) in nvc0_rasterizer_state_create()
217 so->pipe = *cso; in nvc0_rasterizer_state_create()
223 SB_BEGIN_3D(so, SHADE_MODEL, 1); in nvc0_rasterizer_state_create()
224 SB_DATA (so, cso->flatshade ? NVC0_3D_SHADE_MODEL_FLAT : in nvc0_rasterizer_state_create()
226 SB_IMMED_3D(so, PROVOKING_VERTEX_LAST, !cso->flatshade_first); in nvc0_rasterizer_state_create()
227 SB_IMMED_3D(so, VERTEX_TWO_SIDE_ENABLE, cso->light_twoside); in nvc0_rasterizer_state_create()
229 SB_IMMED_3D(so, VERT_COLOR_CLAMP_EN, cso->clamp_vertex_color); in nvc0_rasterizer_state_create()
230 SB_BEGIN_3D(so, FRAG_COLOR_CLAMP_EN, 1); in nvc0_rasterizer_state_create()
231 SB_DATA (so, cso->clamp_fragment_color ? 0x11111111 : 0x00000000); in nvc0_rasterizer_state_create()
233 SB_IMMED_3D(so, MULTISAMPLE_ENABLE, cso->multisample); in nvc0_rasterizer_state_create()
235 SB_IMMED_3D(so, LINE_SMOOTH_ENABLE, cso->line_smooth); in nvc0_rasterizer_state_create()
237 SB_BEGIN_3D(so, LINE_WIDTH_SMOOTH, 1); in nvc0_rasterizer_state_create()
239 SB_BEGIN_3D(so, LINE_WIDTH_ALIASED, 1); in nvc0_rasterizer_state_create()
240 SB_DATA (so, fui(cso->line_width)); in nvc0_rasterizer_state_create()
242 SB_IMMED_3D(so, LINE_STIPPLE_ENABLE, cso->line_stipple_enable); in nvc0_rasterizer_state_create()
244 SB_BEGIN_3D(so, LINE_STIPPLE_PATTERN, 1); in nvc0_rasterizer_state_create()
245 SB_DATA (so, (cso->line_stipple_pattern << 8) | in nvc0_rasterizer_state_create()
250 SB_IMMED_3D(so, VP_POINT_SIZE_EN, cso->point_size_per_vertex); in nvc0_rasterizer_state_create()
252 SB_BEGIN_3D(so, POINT_SIZE, 1); in nvc0_rasterizer_state_create()
253 SB_DATA (so, fui(cso->point_size)); in nvc0_rasterizer_state_create()
260 SB_BEGIN_3D(so, POINT_COORD_REPLACE, 1); in nvc0_rasterizer_state_create()
261 SB_DATA (so, ((cso->sprite_coord_enable & 0xff) << 3) | reg); in nvc0_rasterizer_state_create()
262 SB_IMMED_3D(so, POINT_SPRITE_ENABLE, cso->point_quad_rasterization); in nvc0_rasterizer_state_create()
263 SB_IMMED_3D(so, POINT_SMOOTH_ENABLE, cso->point_smooth); in nvc0_rasterizer_state_create()
265 SB_BEGIN_3D(so, MACRO_POLYGON_MODE_FRONT, 1); in nvc0_rasterizer_state_create()
266 SB_DATA (so, nvgl_polygon_mode(cso->fill_front)); in nvc0_rasterizer_state_create()
267 SB_BEGIN_3D(so, MACRO_POLYGON_MODE_BACK, 1); in nvc0_rasterizer_state_create()
268 SB_DATA (so, nvgl_polygon_mode(cso->fill_back)); in nvc0_rasterizer_state_create()
269 SB_IMMED_3D(so, POLYGON_SMOOTH_ENABLE, cso->poly_smooth); in nvc0_rasterizer_state_create()
271 SB_BEGIN_3D(so, CULL_FACE_ENABLE, 3); in nvc0_rasterizer_state_create()
272 SB_DATA (so, cso->cull_face != PIPE_FACE_NONE); in nvc0_rasterizer_state_create()
273 SB_DATA (so, cso->front_ccw ? NVC0_3D_FRONT_FACE_CCW : in nvc0_rasterizer_state_create()
277 SB_DATA(so, NVC0_3D_CULL_FACE_FRONT_AND_BACK); in nvc0_rasterizer_state_create()
280 SB_DATA(so, NVC0_3D_CULL_FACE_FRONT); in nvc0_rasterizer_state_create()
284 SB_DATA(so, NVC0_3D_CULL_FACE_BACK); in nvc0_rasterizer_state_create()
288 SB_IMMED_3D(so, POLYGON_STIPPLE_ENABLE, cso->poly_stipple_enable); in nvc0_rasterizer_state_create()
289 SB_BEGIN_3D(so, POLYGON_OFFSET_POINT_ENABLE, 3); in nvc0_rasterizer_state_create()
290 SB_DATA (so, cso->offset_point); in nvc0_rasterizer_state_create()
291 SB_DATA (so, cso->offset_line); in nvc0_rasterizer_state_create()
292 SB_DATA (so, cso->offset_tri); in nvc0_rasterizer_state_create()
295 SB_BEGIN_3D(so, POLYGON_OFFSET_FACTOR, 1); in nvc0_rasterizer_state_create()
296 SB_DATA (so, fui(cso->offset_scale)); in nvc0_rasterizer_state_create()
297 SB_BEGIN_3D(so, POLYGON_OFFSET_UNITS, 1); in nvc0_rasterizer_state_create()
298 SB_DATA (so, fui(cso->offset_units * 2.0f)); in nvc0_rasterizer_state_create()
299 SB_BEGIN_3D(so, POLYGON_OFFSET_CLAMP, 1); in nvc0_rasterizer_state_create()
300 SB_DATA (so, fui(cso->offset_clamp)); in nvc0_rasterizer_state_create()
312 SB_BEGIN_3D(so, VIEW_VOLUME_CLIP_CTRL, 1); in nvc0_rasterizer_state_create()
313 SB_DATA (so, reg); in nvc0_rasterizer_state_create()
315 assert(so->size <= (sizeof(so->state) / sizeof(so->state[0]))); in nvc0_rasterizer_state_create()
316 return (void *)so; in nvc0_rasterizer_state_create()
338 struct nvc0_zsa_stateobj *so = CALLOC_STRUCT(nvc0_zsa_stateobj); in nvc0_zsa_state_create() local
340 so->pipe = *cso; in nvc0_zsa_state_create()
342 SB_IMMED_3D(so, DEPTH_TEST_ENABLE, cso->depth.enabled); in nvc0_zsa_state_create()
344 SB_IMMED_3D(so, DEPTH_WRITE_ENABLE, cso->depth.writemask); in nvc0_zsa_state_create()
345 SB_BEGIN_3D(so, DEPTH_TEST_FUNC, 1); in nvc0_zsa_state_create()
346 SB_DATA (so, nvgl_comparison_op(cso->depth.func)); in nvc0_zsa_state_create()
350 SB_BEGIN_3D(so, STENCIL_ENABLE, 5); in nvc0_zsa_state_create()
351 SB_DATA (so, 1); in nvc0_zsa_state_create()
352 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].fail_op)); in nvc0_zsa_state_create()
353 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zfail_op)); in nvc0_zsa_state_create()
354 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zpass_op)); in nvc0_zsa_state_create()
355 SB_DATA (so, nvgl_comparison_op(cso->stencil[0].func)); in nvc0_zsa_state_create()
356 SB_BEGIN_3D(so, STENCIL_FRONT_FUNC_MASK, 2); in nvc0_zsa_state_create()
357 SB_DATA (so, cso->stencil[0].valuemask); in nvc0_zsa_state_create()
358 SB_DATA (so, cso->stencil[0].writemask); in nvc0_zsa_state_create()
360 SB_IMMED_3D(so, STENCIL_ENABLE, 0); in nvc0_zsa_state_create()
365 SB_BEGIN_3D(so, STENCIL_TWO_SIDE_ENABLE, 5); in nvc0_zsa_state_create()
366 SB_DATA (so, 1); in nvc0_zsa_state_create()
367 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].fail_op)); in nvc0_zsa_state_create()
368 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zfail_op)); in nvc0_zsa_state_create()
369 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zpass_op)); in nvc0_zsa_state_create()
370 SB_DATA (so, nvgl_comparison_op(cso->stencil[1].func)); in nvc0_zsa_state_create()
371 SB_BEGIN_3D(so, STENCIL_BACK_MASK, 2); in nvc0_zsa_state_create()
372 SB_DATA (so, cso->stencil[1].writemask); in nvc0_zsa_state_create()
373 SB_DATA (so, cso->stencil[1].valuemask); in nvc0_zsa_state_create()
376 SB_IMMED_3D(so, STENCIL_TWO_SIDE_ENABLE, 0); in nvc0_zsa_state_create()
379 SB_IMMED_3D(so, ALPHA_TEST_ENABLE, cso->alpha.enabled); in nvc0_zsa_state_create()
381 SB_BEGIN_3D(so, ALPHA_TEST_REF, 2); in nvc0_zsa_state_create()
382 SB_DATA (so, fui(cso->alpha.ref_value)); in nvc0_zsa_state_create()
383 SB_DATA (so, nvgl_comparison_op(cso->alpha.func)); in nvc0_zsa_state_create()
386 assert(so->size <= (sizeof(so->state) / sizeof(so->state[0]))); in nvc0_zsa_state_create()
387 return (void *)so; in nvc0_zsa_state_create()