aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci/piglit/quick_gl.txt6
-rw-r--r--src/gallium/auxiliary/draw/draw_cliptest_tmp.h7
-rw-r--r--src/gallium/auxiliary/draw/draw_prim_assembler.c3
3 files changed, 10 insertions, 6 deletions
diff --git a/.gitlab-ci/piglit/quick_gl.txt b/.gitlab-ci/piglit/quick_gl.txt
index bc50f08f0f6..6c9f2d8f561 100644
--- a/.gitlab-ci/piglit/quick_gl.txt
+++ b/.gitlab-ci/piglit/quick_gl.txt
@@ -901,7 +901,6 @@ spec/arb_vertex_program/vp-address-02: skip
spec/arb_vertex_program/vp-address-04: skip
spec/arb_vertex_type_2_10_10_10_rev/attrib-p-type-size-match: skip
spec/arb_viewport_array/display-list: skip
-spec/arb_viewport_array/render-viewport-2: fail
spec/ati_envmap_bumpmap/ati_envmap_bumpmap-bump: skip
spec/egl 1.4/egl-blob-cache: skip
spec/egl 1.4/egl-context-priority: skip
@@ -1681,15 +1680,14 @@ spec/oes_texture_view/rendering-formats/render to gl_rgb8ui as gl_rgb8i: skip
spec/oes_texture_view/rendering-formats/render to gl_rgb8ui as gl_rgb8ui: skip
spec/oes_texture_view/texsubimage-layers pbo: skip
spec/oes_texture_view/texsubimage-levels pbo: skip
-spec/oes_viewport_array/render-viewport-2: fail
wgl/wgl-multi-context-single-window: skip
wgl/wgl-multi-window-single-context: skip
wgl/wgl-sanity: skip
summary:
name: results
---- --------
- pass: 21837
- fail: 217
+ pass: 21839
+ fail: 215
crash: 0
skip: 1446
timeout: 0
diff --git a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
index ba02461db48..b7c77bfd85d 100644
--- a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
@@ -49,7 +49,6 @@ static boolean TAG(do_cliptest)( struct pt_post_vs *pvs,
int viewport_index = 0;
int num_written_clipdistance =
draw_current_shader_num_written_clipdistances(pvs->draw);
- unsigned verts_per_prim = u_vertices_per_prim(prim_info->prim);
if (uses_vp_idx) {
viewport_index = u_bitcast_f2u(out->data[viewport_index_output][0]);
@@ -70,16 +69,20 @@ static boolean TAG(do_cliptest)( struct pt_post_vs *pvs,
}
assert(pos != -1);
+ unsigned prim_idx = 0, prim_vert_idx = 0;
for (j = 0; j < info->count; j++) {
float *position = out->data[pos];
unsigned mask = 0x0;
if (uses_vp_idx) {
/* only change the viewport_index for the leading vertex */
- if (!(j % verts_per_prim)) {
+ if (prim_vert_idx == (prim_info->primitive_lengths[prim_idx])) {
+ prim_idx++;
+ prim_vert_idx = 0;
viewport_index = u_bitcast_f2u(out->data[viewport_index_output][0]);
viewport_index = draw_clamp_viewport_idx(viewport_index);
}
+ prim_vert_idx++;
}
float *scale = pvs->draw->viewports[viewport_index].scale;
float *trans = pvs->draw->viewports[viewport_index].translate;
diff --git a/src/gallium/auxiliary/draw/draw_prim_assembler.c b/src/gallium/auxiliary/draw/draw_prim_assembler.c
index c0bc145f38b..edaaf0d501f 100644
--- a/src/gallium/auxiliary/draw/draw_prim_assembler.c
+++ b/src/gallium/auxiliary/draw/draw_prim_assembler.c
@@ -76,6 +76,9 @@ draw_prim_assembler_is_required(const struct draw_context *draw,
const struct draw_prim_info *prim_info,
const struct draw_vertex_info *vert_info)
{
+ /* viewport index requires primitive boundaries to get correct vertex */
+ if (draw_current_shader_uses_viewport_index(draw))
+ return TRUE;
switch (prim_info->prim) {
case PIPE_PRIM_LINES_ADJACENCY:
case PIPE_PRIM_LINE_STRIP_ADJACENCY: