/* rast.lower_left_origin = 0; */
/* rast.bottom_edge_rule = 0; */
/* rast.rasterizer_discard = 0; */
- rast.depth_clip = 1;
+ rast.depth_clip_near = 1;
+ rast.depth_clip_far = 1;
rast.clip_halfz = 1;
rast.clip_plane_enable = rs[D3DRS_CLIPPLANEENABLE];
/* rast.line_stipple_factor = 0; */
samp.min_mip_filter = PIPE_TEX_MIPFILTER_NONE;
}
samp.max_lod = 15.0f;
- samp.wrap_s = d3dtextureaddress_to_pipe_tex_wrap(ss[D3DSAMP_ADDRESSU]);
- samp.wrap_t = d3dtextureaddress_to_pipe_tex_wrap(ss[D3DSAMP_ADDRESSV]);
- samp.wrap_r = d3dtextureaddress_to_pipe_tex_wrap(ss[D3DSAMP_ADDRESSW]);
+
+ if (ss[NINED3DSAMP_CUBETEX]) {
+ /* Cube textures are always clamped to edge on D3D */
+ samp.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ samp.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ samp.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
+ } else {
+ samp.wrap_s = d3dtextureaddress_to_pipe_tex_wrap(ss[D3DSAMP_ADDRESSU]);
+ samp.wrap_t = d3dtextureaddress_to_pipe_tex_wrap(ss[D3DSAMP_ADDRESSV]);
+ samp.wrap_r = d3dtextureaddress_to_pipe_tex_wrap(ss[D3DSAMP_ADDRESSW]);
+ }
samp.min_img_filter = (ss[D3DSAMP_MINFILTER] == D3DTEXF_POINT && !ss[NINED3DSAMP_SHADOW]) ? PIPE_TEX_FILTER_NEAREST : PIPE_TEX_FILTER_LINEAR;
samp.mag_img_filter = (ss[D3DSAMP_MAGFILTER] == D3DTEXF_POINT && !ss[NINED3DSAMP_SHADOW]) ? PIPE_TEX_FILTER_NEAREST : PIPE_TEX_FILTER_LINEAR;
if (ss[D3DSAMP_MINFILTER] == D3DTEXF_ANISOTROPIC ||
samp.compare_mode = ss[NINED3DSAMP_SHADOW] ? PIPE_TEX_COMPARE_R_TO_TEXTURE : PIPE_TEX_COMPARE_NONE;
samp.compare_func = PIPE_FUNC_LEQUAL;
samp.normalized_coords = 1;
- samp.seamless_cube_map = 1;
+ samp.seamless_cube_map = 0;
d3dcolor_to_pipe_color_union(&samp.border_color, ss[D3DSAMP_BORDERCOLOR]);
/* see nine_state.h */
cso_single_sampler(ctx, PIPE_SHADER_VERTEX, idx - NINE_SAMPLER_VS(0), &samp);
}
-void
-nine_pipe_context_clear(struct NineDevice9 *This)
-{
- struct pipe_context *pipe = This->pipe;
- struct cso_context *cso = This->cso;
- pipe->bind_vs_state(pipe, NULL);
- pipe->bind_fs_state(pipe, NULL);
-
- /* Don't unbind constant buffers, they're device-private and
- * do not change on Reset.
- */
-
- cso_set_samplers(cso, PIPE_SHADER_VERTEX, 0, NULL);
- cso_set_samplers(cso, PIPE_SHADER_FRAGMENT, 0, NULL);
-
- cso_set_sampler_views(cso, PIPE_SHADER_VERTEX, 0, NULL);
- cso_set_sampler_views(cso, PIPE_SHADER_FRAGMENT, 0, NULL);
-
- pipe->set_vertex_buffers(pipe, 0, This->caps.MaxStreams, NULL);
- pipe->set_index_buffer(pipe, NULL);
-}
-
const enum pipe_format nine_d3d9_to_pipe_format_map[120] =
{
[D3DFMT_UNKNOWN] = PIPE_FORMAT_NONE,