Lines Matching refs:so
119 struct nv50_blend_stateobj *so = CALLOC_STRUCT(nv50_blend_stateobj); in nv50_blend_state_create() local
125 SB_BEGIN_3D(so, BLEND_INDEPENDENT, 1); in nv50_blend_state_create()
126 SB_DATA (so, cso->independent_blend_enable); in nv50_blend_state_create()
129 so->pipe = *cso; in nv50_blend_state_create()
131 SB_BEGIN_3D(so, COLOR_MASK_COMMON, 1); in nv50_blend_state_create()
132 SB_DATA (so, !cso->independent_blend_enable); in nv50_blend_state_create()
134 SB_BEGIN_3D(so, BLEND_ENABLE_COMMON, 1); in nv50_blend_state_create()
135 SB_DATA (so, !cso->independent_blend_enable); in nv50_blend_state_create()
138 SB_BEGIN_3D(so, BLEND_ENABLE(0), 8); in nv50_blend_state_create()
140 SB_DATA(so, cso->rt[i].blend_enable); in nv50_blend_state_create()
151 SB_BEGIN_3D_(so, NVA3_3D_IBLEND_EQUATION_RGB(i), 6); in nv50_blend_state_create()
152 SB_DATA (so, nvgl_blend_eqn(cso->rt[i].rgb_func)); in nv50_blend_state_create()
153 SB_DATA (so, nv50_blend_fac(cso->rt[i].rgb_src_factor)); in nv50_blend_state_create()
154 SB_DATA (so, nv50_blend_fac(cso->rt[i].rgb_dst_factor)); in nv50_blend_state_create()
155 SB_DATA (so, nvgl_blend_eqn(cso->rt[i].alpha_func)); in nv50_blend_state_create()
156 SB_DATA (so, nv50_blend_fac(cso->rt[i].alpha_src_factor)); in nv50_blend_state_create()
157 SB_DATA (so, nv50_blend_fac(cso->rt[i].alpha_dst_factor)); in nv50_blend_state_create()
161 SB_BEGIN_3D(so, BLEND_ENABLE(0), 1); in nv50_blend_state_create()
162 SB_DATA (so, cso->rt[0].blend_enable); in nv50_blend_state_create()
166 SB_BEGIN_3D(so, BLEND_EQUATION_RGB, 5); in nv50_blend_state_create()
167 SB_DATA (so, nvgl_blend_eqn(cso->rt[0].rgb_func)); in nv50_blend_state_create()
168 SB_DATA (so, nv50_blend_fac(cso->rt[0].rgb_src_factor)); in nv50_blend_state_create()
169 SB_DATA (so, nv50_blend_fac(cso->rt[0].rgb_dst_factor)); in nv50_blend_state_create()
170 SB_DATA (so, nvgl_blend_eqn(cso->rt[0].alpha_func)); in nv50_blend_state_create()
171 SB_DATA (so, nv50_blend_fac(cso->rt[0].alpha_src_factor)); in nv50_blend_state_create()
172 SB_BEGIN_3D(so, BLEND_FUNC_DST_ALPHA, 1); in nv50_blend_state_create()
173 SB_DATA (so, nv50_blend_fac(cso->rt[0].alpha_dst_factor)); in nv50_blend_state_create()
177 SB_BEGIN_3D(so, LOGIC_OP_ENABLE, 2); in nv50_blend_state_create()
178 SB_DATA (so, 1); in nv50_blend_state_create()
179 SB_DATA (so, nvgl_logicop_func(cso->logicop_func)); in nv50_blend_state_create()
181 SB_BEGIN_3D(so, LOGIC_OP_ENABLE, 1); in nv50_blend_state_create()
182 SB_DATA (so, 0); in nv50_blend_state_create()
186 SB_BEGIN_3D(so, COLOR_MASK(0), 8); in nv50_blend_state_create()
188 SB_DATA(so, nv50_colormask(cso->rt[i].colormask)); in nv50_blend_state_create()
190 SB_BEGIN_3D(so, COLOR_MASK(0), 1); in nv50_blend_state_create()
191 SB_DATA (so, nv50_colormask(cso->rt[0].colormask)); in nv50_blend_state_create()
200 SB_BEGIN_3D(so, MULTISAMPLE_CTRL, 1); in nv50_blend_state_create()
201 SB_DATA (so, ms); in nv50_blend_state_create()
203 assert(so->size <= (sizeof(so->state) / sizeof(so->state[0]))); in nv50_blend_state_create()
204 return so; in nv50_blend_state_create()
227 struct nv50_rasterizer_stateobj *so; in nv50_rasterizer_state_create() local
230 so = CALLOC_STRUCT(nv50_rasterizer_stateobj); in nv50_rasterizer_state_create()
231 if (!so) in nv50_rasterizer_state_create()
233 so->pipe = *cso; in nv50_rasterizer_state_create()
236 SB_BEGIN_3D(so, SCISSOR_ENABLE(0), 1); in nv50_rasterizer_state_create()
237 SB_DATA (so, cso->scissor); in nv50_rasterizer_state_create()
240 SB_BEGIN_3D(so, SHADE_MODEL, 1); in nv50_rasterizer_state_create()
241 SB_DATA (so, cso->flatshade ? NV50_3D_SHADE_MODEL_FLAT : in nv50_rasterizer_state_create()
243 SB_BEGIN_3D(so, PROVOKING_VERTEX_LAST, 1); in nv50_rasterizer_state_create()
244 SB_DATA (so, !cso->flatshade_first); in nv50_rasterizer_state_create()
245 SB_BEGIN_3D(so, VERTEX_TWO_SIDE_ENABLE, 1); in nv50_rasterizer_state_create()
246 SB_DATA (so, cso->light_twoside); in nv50_rasterizer_state_create()
248 SB_BEGIN_3D(so, FRAG_COLOR_CLAMP_EN, 1); in nv50_rasterizer_state_create()
249 SB_DATA (so, cso->clamp_fragment_color ? 0x11111111 : 0x00000000); in nv50_rasterizer_state_create()
251 SB_BEGIN_3D(so, MULTISAMPLE_ENABLE, 1); in nv50_rasterizer_state_create()
252 SB_DATA (so, cso->multisample); in nv50_rasterizer_state_create()
254 SB_BEGIN_3D(so, LINE_WIDTH, 1); in nv50_rasterizer_state_create()
255 SB_DATA (so, fui(cso->line_width)); in nv50_rasterizer_state_create()
256 SB_BEGIN_3D(so, LINE_SMOOTH_ENABLE, 1); in nv50_rasterizer_state_create()
257 SB_DATA (so, cso->line_smooth); in nv50_rasterizer_state_create()
259 SB_BEGIN_3D(so, LINE_STIPPLE_ENABLE, 1); in nv50_rasterizer_state_create()
261 SB_DATA (so, 1); in nv50_rasterizer_state_create()
262 SB_BEGIN_3D(so, LINE_STIPPLE, 1); in nv50_rasterizer_state_create()
263 SB_DATA (so, (cso->line_stipple_pattern << 8) | in nv50_rasterizer_state_create()
266 SB_DATA (so, 0); in nv50_rasterizer_state_create()
270 SB_BEGIN_3D(so, POINT_SIZE, 1); in nv50_rasterizer_state_create()
271 SB_DATA (so, fui(cso->point_size)); in nv50_rasterizer_state_create()
273 SB_BEGIN_3D(so, POINT_SPRITE_ENABLE, 1); in nv50_rasterizer_state_create()
274 SB_DATA (so, cso->point_quad_rasterization); in nv50_rasterizer_state_create()
275 SB_BEGIN_3D(so, POINT_SMOOTH_ENABLE, 1); in nv50_rasterizer_state_create()
276 SB_DATA (so, cso->point_smooth); in nv50_rasterizer_state_create()
278 SB_BEGIN_3D(so, POLYGON_MODE_FRONT, 3); in nv50_rasterizer_state_create()
279 SB_DATA (so, nvgl_polygon_mode(cso->fill_front)); in nv50_rasterizer_state_create()
280 SB_DATA (so, nvgl_polygon_mode(cso->fill_back)); in nv50_rasterizer_state_create()
281 SB_DATA (so, cso->poly_smooth); in nv50_rasterizer_state_create()
283 SB_BEGIN_3D(so, CULL_FACE_ENABLE, 3); in nv50_rasterizer_state_create()
284 SB_DATA (so, cso->cull_face != PIPE_FACE_NONE); in nv50_rasterizer_state_create()
285 SB_DATA (so, cso->front_ccw ? NV50_3D_FRONT_FACE_CCW : in nv50_rasterizer_state_create()
289 SB_DATA(so, NV50_3D_CULL_FACE_FRONT_AND_BACK); in nv50_rasterizer_state_create()
292 SB_DATA(so, NV50_3D_CULL_FACE_FRONT); in nv50_rasterizer_state_create()
296 SB_DATA(so, NV50_3D_CULL_FACE_BACK); in nv50_rasterizer_state_create()
300 SB_BEGIN_3D(so, POLYGON_STIPPLE_ENABLE, 1); in nv50_rasterizer_state_create()
301 SB_DATA (so, cso->poly_stipple_enable); in nv50_rasterizer_state_create()
302 SB_BEGIN_3D(so, POLYGON_OFFSET_POINT_ENABLE, 3); in nv50_rasterizer_state_create()
303 SB_DATA (so, cso->offset_point); in nv50_rasterizer_state_create()
304 SB_DATA (so, cso->offset_line); in nv50_rasterizer_state_create()
305 SB_DATA (so, cso->offset_tri); in nv50_rasterizer_state_create()
308 SB_BEGIN_3D(so, POLYGON_OFFSET_FACTOR, 1); in nv50_rasterizer_state_create()
309 SB_DATA (so, fui(cso->offset_scale)); in nv50_rasterizer_state_create()
310 SB_BEGIN_3D(so, POLYGON_OFFSET_UNITS, 1); in nv50_rasterizer_state_create()
311 SB_DATA (so, fui(cso->offset_units * 2.0f)); in nv50_rasterizer_state_create()
312 SB_BEGIN_3D(so, POLYGON_OFFSET_CLAMP, 1); in nv50_rasterizer_state_create()
313 SB_DATA (so, fui(cso->offset_clamp)); in nv50_rasterizer_state_create()
329 SB_BEGIN_3D(so, VIEW_VOLUME_CLIP_CTRL, 1); in nv50_rasterizer_state_create()
330 SB_DATA (so, reg); in nv50_rasterizer_state_create()
332 assert(so->size <= (sizeof(so->state) / sizeof(so->state[0]))); in nv50_rasterizer_state_create()
333 return (void *)so; in nv50_rasterizer_state_create()
355 struct nv50_zsa_stateobj *so = CALLOC_STRUCT(nv50_zsa_stateobj); in nv50_zsa_state_create() local
357 so->pipe = *cso; in nv50_zsa_state_create()
359 SB_BEGIN_3D(so, DEPTH_WRITE_ENABLE, 1); in nv50_zsa_state_create()
360 SB_DATA (so, cso->depth.writemask); in nv50_zsa_state_create()
361 SB_BEGIN_3D(so, DEPTH_TEST_ENABLE, 1); in nv50_zsa_state_create()
363 SB_DATA (so, 1); in nv50_zsa_state_create()
364 SB_BEGIN_3D(so, DEPTH_TEST_FUNC, 1); in nv50_zsa_state_create()
365 SB_DATA (so, nvgl_comparison_op(cso->depth.func)); in nv50_zsa_state_create()
367 SB_DATA (so, 0); in nv50_zsa_state_create()
371 SB_BEGIN_3D(so, STENCIL_ENABLE, 5); in nv50_zsa_state_create()
372 SB_DATA (so, 1); in nv50_zsa_state_create()
373 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].fail_op)); in nv50_zsa_state_create()
374 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zfail_op)); in nv50_zsa_state_create()
375 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zpass_op)); in nv50_zsa_state_create()
376 SB_DATA (so, nvgl_comparison_op(cso->stencil[0].func)); in nv50_zsa_state_create()
377 SB_BEGIN_3D(so, STENCIL_FRONT_MASK, 2); in nv50_zsa_state_create()
378 SB_DATA (so, cso->stencil[0].writemask); in nv50_zsa_state_create()
379 SB_DATA (so, cso->stencil[0].valuemask); in nv50_zsa_state_create()
381 SB_BEGIN_3D(so, STENCIL_ENABLE, 1); in nv50_zsa_state_create()
382 SB_DATA (so, 0); in nv50_zsa_state_create()
387 SB_BEGIN_3D(so, STENCIL_TWO_SIDE_ENABLE, 5); in nv50_zsa_state_create()
388 SB_DATA (so, 1); in nv50_zsa_state_create()
389 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].fail_op)); in nv50_zsa_state_create()
390 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zfail_op)); in nv50_zsa_state_create()
391 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zpass_op)); in nv50_zsa_state_create()
392 SB_DATA (so, nvgl_comparison_op(cso->stencil[1].func)); in nv50_zsa_state_create()
393 SB_BEGIN_3D(so, STENCIL_BACK_MASK, 2); in nv50_zsa_state_create()
394 SB_DATA (so, cso->stencil[1].writemask); in nv50_zsa_state_create()
395 SB_DATA (so, cso->stencil[1].valuemask); in nv50_zsa_state_create()
397 SB_BEGIN_3D(so, STENCIL_TWO_SIDE_ENABLE, 1); in nv50_zsa_state_create()
398 SB_DATA (so, 0); in nv50_zsa_state_create()
401 SB_BEGIN_3D(so, ALPHA_TEST_ENABLE, 1); in nv50_zsa_state_create()
403 SB_DATA (so, 1); in nv50_zsa_state_create()
404 SB_BEGIN_3D(so, ALPHA_TEST_REF, 2); in nv50_zsa_state_create()
405 SB_DATA (so, fui(cso->alpha.ref_value)); in nv50_zsa_state_create()
406 SB_DATA (so, nvgl_comparison_op(cso->alpha.func)); in nv50_zsa_state_create()
408 SB_DATA (so, 0); in nv50_zsa_state_create()
411 assert(so->size <= (sizeof(so->state) / sizeof(so->state[0]))); in nv50_zsa_state_create()
412 return (void *)so; in nv50_zsa_state_create()
458 struct nv50_tsc_entry *so = CALLOC_STRUCT(nv50_tsc_entry); in nv50_sampler_state_create() local
461 so->id = -1; in nv50_sampler_state_create()
463 so->tsc[0] = (0x00026000 | in nv50_sampler_state_create()
470 so->tsc[1] |= NVE4_TSC_1_CUBE_SEAMLESS; in nv50_sampler_state_create()
472 so->tsc[1] |= NVE4_TSC_1_FORCE_NONNORMALIZED_COORDS; in nv50_sampler_state_create()
477 so->tsc[1] |= NV50_TSC_1_MAGF_LINEAR; in nv50_sampler_state_create()
481 so->tsc[1] |= NV50_TSC_1_MAGF_NEAREST; in nv50_sampler_state_create()
487 so->tsc[1] |= NV50_TSC_1_MINF_LINEAR; in nv50_sampler_state_create()
491 so->tsc[1] |= NV50_TSC_1_MINF_NEAREST; in nv50_sampler_state_create()
497 so->tsc[1] |= NV50_TSC_1_MIPF_LINEAR; in nv50_sampler_state_create()
500 so->tsc[1] |= NV50_TSC_1_MIPF_NEAREST; in nv50_sampler_state_create()
504 so->tsc[1] |= NV50_TSC_1_MIPF_NONE; in nv50_sampler_state_create()
509 so->tsc[0] |= (7 << 20); in nv50_sampler_state_create()
512 so->tsc[0] |= (6 << 20); in nv50_sampler_state_create()
514 so->tsc[0] |= (cso->max_anisotropy >> 1) << 20; in nv50_sampler_state_create()
517 so->tsc[1] |= NV50_TSC_1_UNKN_ANISO_35; in nv50_sampler_state_create()
520 so->tsc[1] |= NV50_TSC_1_UNKN_ANISO_15; in nv50_sampler_state_create()
525 so->tsc[0] |= (1 << 9); in nv50_sampler_state_create()
526 so->tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7) << 10; in nv50_sampler_state_create()
530 so->tsc[1] |= ((int)(f[0] * 256.0f) & 0x1fff) << 12; in nv50_sampler_state_create()
534 so->tsc[2] |= in nv50_sampler_state_create()
537 so->tsc[4] = fui(cso->border_color.f[0]); in nv50_sampler_state_create()
538 so->tsc[5] = fui(cso->border_color.f[1]); in nv50_sampler_state_create()
539 so->tsc[6] = fui(cso->border_color.f[2]); in nv50_sampler_state_create()
540 so->tsc[7] = fui(cso->border_color.f[3]); in nv50_sampler_state_create()
542 return (void *)so; in nv50_sampler_state_create()