#define NV50_3D_CULL_FACE_BACK 0x00000405
#define NV50_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
-#define NV50_3D_LINE_LAST_PIXEL 0x00001924
+#define NV50_3D_PIXEL_CENTER_INTEGER 0x00001924
#define NVA3_3D_FP_MULTISAMPLE 0x00001928
#define NVA3_3D_FP_MULTISAMPLE_EXPORT_SAMPLE_MASK 0x00000001
PUSH_DATA (push, 0);
BEGIN_NV04(push, NV50_3D(PRIM_RESTART_WITH_DRAW_ARRAYS), 1);
PUSH_DATA (push, 1);
- BEGIN_NV04(push, NV50_3D(LINE_LAST_PIXEL), 1);
- PUSH_DATA (push, 0);
BEGIN_NV04(push, NV50_3D(BLEND_SEPARATE_ALPHA), 1);
PUSH_DATA (push, 1);
* ! pipe_rasterizer_state.flatshade_first also applies to QUADS
* (There's a GL query for that, forcing an exception is just ridiculous.)
*
- * ! pipe_rasterizer_state.half_pixel_center is ignored - pixel centers
- * are always at half integer coordinates and the top-left rule applies
- * (There does not seem to be a hardware switch for this.)
- *
* ! pipe_rasterizer_state.sprite_coord_enable is masked with 0xff on NVC0
* (The hardware only has 8 slots meant for TexCoord and we have to assign
* in advance to maintain elegant separate shader objects.)
FREE(hwcso);
}
-/* NOTE: ignoring line_last_pixel, using FALSE (set on screen init) */
+/* NOTE: ignoring line_last_pixel */
static void *
nv50_rasterizer_state_create(struct pipe_context *pipe,
const struct pipe_rasterizer_state *cso)
SB_BEGIN_3D(so, DEPTH_CLIP_NEGATIVE_Z, 1);
SB_DATA (so, cso->clip_halfz);
+ SB_BEGIN_3D(so, PIXEL_CENTER_INTEGER, 1);
+ SB_DATA (so, !cso->half_pixel_center);
+
assert(so->size <= (sizeof(so->state) / sizeof(so->state[0])));
return (void *)so;
}
struct nv50_rasterizer_stateobj {
struct pipe_rasterizer_state pipe;
int size;
- uint32_t state[48];
+ uint32_t state[49];
};
struct nv50_zsa_stateobj {
#define NVC0_3D_CULL_FACE_BACK 0x00000405
#define NVC0_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
-#define NVC0_3D_LINE_LAST_PIXEL 0x00001924
+#define NVC0_3D_PIXEL_CENTER_INTEGER 0x00001924
#define NVC0_3D_VIEWPORT_TRANSFORM_EN 0x0000192c
PUSH_DATA (push, 0);
BEGIN_NVC0(push, NVC0_3D(LINE_WIDTH_SEPARATE), 1);
PUSH_DATA (push, 1);
- BEGIN_NVC0(push, NVC0_3D(LINE_LAST_PIXEL), 1);
- PUSH_DATA (push, 0);
BEGIN_NVC0(push, NVC0_3D(PRIM_RESTART_WITH_DRAW_ARRAYS), 1);
PUSH_DATA (push, 1);
BEGIN_NVC0(push, NVC0_3D(BLEND_SEPARATE_ALPHA), 1);
FREE(hwcso);
}
-/* NOTE: ignoring line_last_pixel, using FALSE (set on screen init) */
+/* NOTE: ignoring line_last_pixel */
static void *
nvc0_rasterizer_state_create(struct pipe_context *pipe,
const struct pipe_rasterizer_state *cso)
SB_IMMED_3D(so, DEPTH_CLIP_NEGATIVE_Z, cso->clip_halfz);
+ SB_IMMED_3D(so, PIXEL_CENTER_INTEGER, !cso->half_pixel_center);
+
assert(so->size <= (sizeof(so->state) / sizeof(so->state[0])));
return (void *)so;
}
struct nvc0_rasterizer_stateobj {
struct pipe_rasterizer_state pipe;
int size;
- uint32_t state[43];
+ uint32_t state[44];
};
struct nvc0_zsa_stateobj {