gallivm: fix stencil border

Fixes:
dEQP-GLES31.functional.texture.border_clamp.unused_channels.depth32f_stencil8_sample_stencil
dEQP-GLES31.functional.texture.border_clamp.sampler.uint_stencil

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
This commit is contained in:
Dave Airlie 2020-04-24 11:23:19 +10:00
parent 565df65651
commit 8faa0e2c1b
3 changed files with 12 additions and 8 deletions

View File

@ -717,6 +717,4 @@ dEQP-GLES31.functional.tessellation.user_defined_io.per_patch_block_array.vertex
dEQP-GLES31.functional.tessellation.user_defined_io.per_vertex.vertex_io_array_size_query.quads_explicit_tcs_out_size
dEQP-GLES31.functional.tessellation.user_defined_io.per_vertex.vertex_io_array_size_shader_builtin.triangles
dEQP-GLES31.functional.tessellation.user_defined_io.per_vertex_block.vertex_io_array_size_shader_builtin.isolines
dEQP-GLES31.functional.texture.border_clamp.per_axis_wrap_mode.texture_2d.uint_stencil.nearest.s_clamp_to_edge_t_clamp_to_border_pot
dEQP-GLES31.functional.texture.border_clamp.range_clamp.nearest_float_depth
dEQP-GLES31.functional.texture.border_clamp.unused_channels.stencil_index8

View File

@ -1121,8 +1121,6 @@ spec/arb_texture_rg/multisample-formats 8 gl_arb_texture_rg: skip
spec/arb_texture_rg/multisample-formats 8 gl_arb_texture_rg-float: skip
spec/arb_texture_rg/multisample-formats 8 gl_arb_texture_rg-int: skip
spec/arb_texture_stencil8/fbo-clear-formats/gl_stencil_index8 (fbo incomplete): skip
spec/arb_texture_stencil8/texwrap formats bordercolor-swizzled/gl_stencil_index8, swizzled, border color only: fail
spec/arb_texture_stencil8/texwrap formats bordercolor/gl_stencil_index8, border color only: fail
spec/arb_texture_view/rendering-formats/clear gl_r8 as gl_r8_snorm: fail
spec/arb_texture_view/rendering-formats/clear gl_r8 as gl_r8i: fail
spec/arb_texture_view/rendering-formats/clear gl_rg8 as gl_r16_snorm: fail
@ -2083,8 +2081,8 @@ wgl/wgl-sanity: skip
summary:
name: results
---- --------
pass: 19537
fail: 248
pass: 19539
fail: 246
crash: 0
skip: 1814
timeout: 0

View File

@ -195,9 +195,17 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
for (chan = 0; chan < 4; chan++) {
unsigned chan_s;
/* reverse-map channel... */
for (chan_s = 0; chan_s < 4; chan_s++) {
if (chan_s == format_desc->swizzle[chan]) {
if (util_format_has_stencil(format_desc)) {
if (chan == 0)
chan_s = 0;
else
break;
}
else {
for (chan_s = 0; chan_s < 4; chan_s++) {
if (chan_s == format_desc->swizzle[chan]) {
break;
}
}
}
if (chan_s <= 3) {