• Home
  • Raw
  • Download

Lines Matching refs:rs

31                        const DWORD *rs)  in nine_convert_dsa_state()  argument
37 if (rs[D3DRS_ZENABLE]) { in nine_convert_dsa_state()
39 dsa.depth_func = d3dcmpfunc_to_pipe_func(rs[D3DRS_ZFUNC]); in nine_convert_dsa_state()
41 dsa.depth_writemask = !!rs[D3DRS_ZWRITEENABLE] && in nine_convert_dsa_state()
46 if (rs[D3DRS_STENCILENABLE]) { in nine_convert_dsa_state()
48 dsa.stencil[0].func = d3dcmpfunc_to_pipe_func(rs[D3DRS_STENCILFUNC]); in nine_convert_dsa_state()
49 dsa.stencil[0].fail_op = d3dstencilop_to_pipe_stencil_op(rs[D3DRS_STENCILFAIL]); in nine_convert_dsa_state()
50 dsa.stencil[0].zpass_op = d3dstencilop_to_pipe_stencil_op(rs[D3DRS_STENCILPASS]); in nine_convert_dsa_state()
51 dsa.stencil[0].zfail_op = d3dstencilop_to_pipe_stencil_op(rs[D3DRS_STENCILZFAIL]); in nine_convert_dsa_state()
52 dsa.stencil[0].valuemask = rs[D3DRS_STENCILMASK]; in nine_convert_dsa_state()
53 dsa.stencil[0].writemask = rs[D3DRS_STENCILWRITEMASK]; in nine_convert_dsa_state()
55 if (rs[D3DRS_TWOSIDEDSTENCILMODE]) { in nine_convert_dsa_state()
57 dsa.stencil[1].func = d3dcmpfunc_to_pipe_func(rs[D3DRS_CCW_STENCILFUNC]); in nine_convert_dsa_state()
58 dsa.stencil[1].fail_op = d3dstencilop_to_pipe_stencil_op(rs[D3DRS_CCW_STENCILFAIL]); in nine_convert_dsa_state()
59 dsa.stencil[1].zpass_op = d3dstencilop_to_pipe_stencil_op(rs[D3DRS_CCW_STENCILPASS]); in nine_convert_dsa_state()
60 dsa.stencil[1].zfail_op = d3dstencilop_to_pipe_stencil_op(rs[D3DRS_CCW_STENCILZFAIL]); in nine_convert_dsa_state()
66 if (rs[D3DRS_ALPHATESTENABLE]) { in nine_convert_dsa_state()
68 dsa.alpha_func = d3dcmpfunc_to_pipe_func(rs[D3DRS_ALPHAFUNC]); in nine_convert_dsa_state()
69 dsa.alpha_ref_value = (float)rs[D3DRS_ALPHAREF] / 255.0f; in nine_convert_dsa_state()
78 const DWORD *rs) in nine_convert_rasterizer_state() argument
84 rast.flatshade = rs[D3DRS_SHADEMODE] == D3DSHADE_FLAT; in nine_convert_rasterizer_state()
89 rast.cull_face = d3dcull_to_pipe_face(rs[D3DRS_CULLMODE]); in nine_convert_rasterizer_state()
90 rast.fill_front = d3dfillmode_to_pipe_polygon_mode(rs[D3DRS_FILLMODE]); in nine_convert_rasterizer_state()
92 rast.offset_tri = !!(rs[D3DRS_DEPTHBIAS] | rs[D3DRS_SLOPESCALEDEPTHBIAS]); in nine_convert_rasterizer_state()
95 rast.scissor = !!rs[D3DRS_SCISSORTESTENABLE]; in nine_convert_rasterizer_state()
101 rast.point_size_per_vertex = rs[NINED3DRS_VSPOINTSIZE]; in nine_convert_rasterizer_state()
102 rast.multisample = rs[NINED3DRS_MULTISAMPLE]; in nine_convert_rasterizer_state()
103 rast.line_smooth = !!rs[D3DRS_ANTIALIASEDLINEENABLE]; in nine_convert_rasterizer_state()
105 rast.line_last_pixel = !!rs[D3DRS_LASTPIXEL]; in nine_convert_rasterizer_state()
114 rast.clip_plane_enable = rs[D3DRS_CLIPPLANEENABLE]; in nine_convert_rasterizer_state()
117 rast.sprite_coord_enable = rs[D3DRS_POINTSPRITEENABLE] ? 0xff : 0x00; in nine_convert_rasterizer_state()
120 if (rs[NINED3DRS_VSPOINTSIZE]) { in nine_convert_rasterizer_state()
123 rast.point_size = CLAMP(asfloat(rs[D3DRS_POINTSIZE]), in nine_convert_rasterizer_state()
124 asfloat(rs[D3DRS_POINTSIZE_MIN]), in nine_convert_rasterizer_state()
125 asfloat(rs[D3DRS_POINTSIZE_MAX])); in nine_convert_rasterizer_state()
134 …rast.offset_units = asfloat(rs[D3DRS_DEPTHBIAS]) * (device->driver_caps.offset_units_unscaled ? 1.… in nine_convert_rasterizer_state()
136 rast.offset_scale = asfloat(rs[D3DRS_SLOPESCALEDEPTHBIAS]); in nine_convert_rasterizer_state()
143 nine_convert_blend_state_fixup(struct pipe_blend_state *blend, const DWORD *rs) in nine_convert_blend_state_fixup() argument
145 if (unlikely(rs[D3DRS_SRCBLEND] == D3DBLEND_BOTHSRCALPHA || in nine_convert_blend_state_fixup()
146 rs[D3DRS_SRCBLEND] == D3DBLEND_BOTHINVSRCALPHA)) { in nine_convert_blend_state_fixup()
147 blend->rt[0].rgb_dst_factor = (rs[D3DRS_SRCBLEND] == D3DBLEND_BOTHSRCALPHA) ? in nine_convert_blend_state_fixup()
149 if (!rs[D3DRS_SEPARATEALPHABLENDENABLE]) in nine_convert_blend_state_fixup()
152 if (unlikely(rs[D3DRS_SEPARATEALPHABLENDENABLE] && in nine_convert_blend_state_fixup()
153 (rs[D3DRS_SRCBLENDALPHA] == D3DBLEND_BOTHSRCALPHA || in nine_convert_blend_state_fixup()
154 rs[D3DRS_SRCBLENDALPHA] == D3DBLEND_BOTHINVSRCALPHA))) { in nine_convert_blend_state_fixup()
155 blend->rt[0].alpha_dst_factor = (rs[D3DRS_SRCBLENDALPHA] == D3DBLEND_BOTHSRCALPHA) ? in nine_convert_blend_state_fixup()
161 nine_convert_blend_state(struct pipe_blend_state *blend_state, const DWORD *rs) in nine_convert_blend_state() argument
167 blend.dither = !!rs[D3DRS_DITHERENABLE]; in nine_convert_blend_state()
170 blend.alpha_to_coverage = !!(rs[NINED3DRS_ALPHACOVERAGE] & 5); in nine_convert_blend_state()
172 blend.rt[0].blend_enable = !!rs[D3DRS_ALPHABLENDENABLE]; in nine_convert_blend_state()
174 blend.rt[0].rgb_func = d3dblendop_to_pipe_blend(rs[D3DRS_BLENDOP]); in nine_convert_blend_state()
175 blend.rt[0].rgb_src_factor = d3dblend_color_to_pipe_blendfactor(rs[D3DRS_SRCBLEND]); in nine_convert_blend_state()
176 blend.rt[0].rgb_dst_factor = d3dblend_color_to_pipe_blendfactor(rs[D3DRS_DESTBLEND]); in nine_convert_blend_state()
177 if (rs[D3DRS_SEPARATEALPHABLENDENABLE]) { in nine_convert_blend_state()
178 blend.rt[0].alpha_func = d3dblendop_to_pipe_blend(rs[D3DRS_BLENDOPALPHA]); in nine_convert_blend_state()
179 … blend.rt[0].alpha_src_factor = d3dblend_alpha_to_pipe_blendfactor(rs[D3DRS_SRCBLENDALPHA]); in nine_convert_blend_state()
180 … blend.rt[0].alpha_dst_factor = d3dblend_alpha_to_pipe_blendfactor(rs[D3DRS_DESTBLENDALPHA]); in nine_convert_blend_state()
184 blend.rt[0].alpha_src_factor = d3dblend_alpha_to_pipe_blendfactor(rs[D3DRS_SRCBLEND]); in nine_convert_blend_state()
185 blend.rt[0].alpha_dst_factor = d3dblend_alpha_to_pipe_blendfactor(rs[D3DRS_DESTBLEND]); in nine_convert_blend_state()
187 nine_convert_blend_state_fixup(&blend, rs); /* for BOTH[INV]SRCALPHA */ in nine_convert_blend_state()
191 blend.rt[0].colormask = rs[D3DRS_COLORWRITEENABLE]; in nine_convert_blend_state()
193 if (rs[D3DRS_COLORWRITEENABLE1] != rs[D3DRS_COLORWRITEENABLE] || in nine_convert_blend_state()
194 rs[D3DRS_COLORWRITEENABLE2] != rs[D3DRS_COLORWRITEENABLE] || in nine_convert_blend_state()
195 rs[D3DRS_COLORWRITEENABLE3] != rs[D3DRS_COLORWRITEENABLE]) { in nine_convert_blend_state()
200 blend.rt[1].colormask = rs[D3DRS_COLORWRITEENABLE1]; in nine_convert_blend_state()
201 blend.rt[2].colormask = rs[D3DRS_COLORWRITEENABLE2]; in nine_convert_blend_state()
202 blend.rt[3].colormask = rs[D3DRS_COLORWRITEENABLE3]; in nine_convert_blend_state()