diff options
Diffstat (limited to 'lib/mesa/src/gallium/tests/trivial/tri.c')
-rw-r--r-- | lib/mesa/src/gallium/tests/trivial/tri.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/mesa/src/gallium/tests/trivial/tri.c b/lib/mesa/src/gallium/tests/trivial/tri.c index a2031696f..3827edc0d 100644 --- a/lib/mesa/src/gallium/tests/trivial/tri.c +++ b/lib/mesa/src/gallium/tests/trivial/tri.c @@ -27,8 +27,8 @@ #define USE_TRACE 0 #define WIDTH 300 #define HEIGHT 300 -#define NEAR 30 -#define FAR 1000 +#define NEAR 0 +#define FAR 1 #define FLIP 0 /* pipe_*_state structs */ @@ -154,7 +154,8 @@ static void init_prog(struct program *p) p->rasterizer.cull_face = PIPE_FACE_NONE; p->rasterizer.half_pixel_center = 1; p->rasterizer.bottom_edge_rule = 1; - p->rasterizer.depth_clip = 1; + p->rasterizer.depth_clip_near = 1; + p->rasterizer.depth_clip_far = 1; surf_tmpl.format = PIPE_FORMAT_B8G8R8A8_UNORM; surf_tmpl.u.tex.level = 0; @@ -171,7 +172,7 @@ static void init_prog(struct program *p) { float x = 0; float y = 0; - float z = FAR; + float z = NEAR; float half_width = (float)WIDTH / 2.0f; float half_height = (float)HEIGHT / 2.0f; float half_depth = ((float)FAR - (float)NEAR) / 2.0f; @@ -208,10 +209,10 @@ static void init_prog(struct program *p) /* vertex shader */ { - const uint semantic_names[] = { TGSI_SEMANTIC_POSITION, - TGSI_SEMANTIC_COLOR }; - const uint semantic_indexes[] = { 0, 0 }; - p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, semantic_names, semantic_indexes, FALSE); + const enum tgsi_semantic semantic_names[] = + { TGSI_SEMANTIC_POSITION, TGSI_SEMANTIC_COLOR }; + const uint semantic_indexes[] = { 0, 0 }; + p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, semantic_names, semantic_indexes, FALSE); } /* fragment shader */ |