i915g: fix glClearColor using a 1 byte color format
Unscissored glClearColor is using i915_fill_blit(). Clearing can be done with the 1 byte formats GL_ALPHA, GL_LUMINANCE or GL_INTENSITY. Routine i915_fill_blit() is called with a rgba-mask containing 1 byte, but it is handling this as a 2-byte color. This fix adds the needed 1 byte setup to both i915_fill_blit() and i915_copy_blit(). It solves 1 piglit-test concerning arb_clear_texture-base-formats and 15 tests concerning fbo-clear-formats. No regression is shown at other piglit-tests. Cc: mesa-stable Signed-off-by: GKraats <vd.kraats@hccnet.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32178>
This commit is contained in:
@@ -41,34 +41,12 @@ dEQP-GLES2.functional.shaders.random.trigonometric.fragment.45,Fail
|
||||
dEQP-GLES2.functional.shaders.struct.uniform.equal_fragment,Fail
|
||||
dEQP-GLES2.functional.shaders.struct.uniform.not_equal_fragment,Fail
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/4982
|
||||
# -Y face renders incorrectly (black instead of texture contents)
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_linear_clamp_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_linear_mirror_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_linear_repeat_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_mipmap_linear_nearest_repeat_l8,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_mipmap_nearest_nearest_repeat_l8,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_clamp_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_mirror_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.linear_nearest_repeat_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_mirror_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_repeat_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_mipmap_linear_nearest_repeat_l8,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_mipmap_nearest_nearest_repeat_l8,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_nearest_clamp_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_nearest_mirror_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.filtering.cube.nearest_nearest_repeat_l8_pot,Fail
|
||||
dEQP-GLES2.functional.texture.size.cube.128x128_l8_mipmap,Fail
|
||||
dEQP-GLES2.functional.texture.size.cube.64x64_l8_mipmap,Fail
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/4982
|
||||
# Minor errors on all faces, perhaps around filtering's texel selection?
|
||||
dEQP-GLES2.functional.texture.size.cube.15x15_l8,Fail
|
||||
dEQP-GLES2.functional.texture.size.cube.15x15_rgb888,Fail
|
||||
dEQP-GLES2.functional.texture.size.cube.15x15_rgba4444,Fail
|
||||
dEQP-GLES2.functional.texture.size.cube.15x15_rgba8888,Fail
|
||||
dEQP-GLES2.functional.texture.size.cube.16x16_l8_mipmap,Fail
|
||||
|
||||
# Texel differences in the middle of the texture?
|
||||
dEQP-GLES2.functional.texture.wrap.clamp_clamp_nearest_npot_etc1,Fail
|
||||
@@ -352,7 +330,6 @@ spec@!opengl 2.1@pbo,Fail
|
||||
spec@!opengl 2.1@pbo@test_polygon_stip,Fail
|
||||
spec@!opengl 2.1@polygon-stipple-fs,Fail
|
||||
|
||||
spec@arb_clear_texture@arb_clear_texture-base-formats,Fail
|
||||
spec@arb_clear_texture@arb_clear_texture-sized-formats,Fail
|
||||
|
||||
spec@arb_depth_texture@fbo-clear-formats,Fail
|
||||
@@ -522,22 +499,6 @@ spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB10,Fail
|
||||
spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB4,Fail
|
||||
spec@ext_framebuffer_object@fbo-blending-formats@GL_RGB5,Fail
|
||||
|
||||
spec@ext_framebuffer_object@fbo-clear-formats,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_ALPHA,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_ALPHA12,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_ALPHA16,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_ALPHA4,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_ALPHA8,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_INTENSITY,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_INTENSITY12,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_INTENSITY16,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_INTENSITY4,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_INTENSITY8,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_LUMINANCE,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_LUMINANCE12,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_LUMINANCE16,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_LUMINANCE4,Fail
|
||||
spec@ext_framebuffer_object@fbo-clear-formats@GL_LUMINANCE8,Fail
|
||||
spec@ext_framebuffer_object@fbo-colormask-formats,Fail
|
||||
spec@ext_framebuffer_object@fbo-colormask-formats@GL_ALPHA,Fail
|
||||
spec@ext_framebuffer_object@fbo-colormask-formats@GL_ALPHA12,Fail
|
||||
|
||||
@@ -44,6 +44,9 @@ i915_fill_blit(struct i915_context *i915, unsigned cpp, unsigned rgba_mask,
|
||||
|
||||
switch (cpp) {
|
||||
case 1:
|
||||
BR13 = (((int)dst_pitch) & 0xffff) | (0xF0 << 16);
|
||||
CMD = XY_COLOR_BLT_CMD;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
BR13 = (((int)dst_pitch) & 0xffff) | (0xF0 << 16) | (1 << 24);
|
||||
@@ -99,6 +102,9 @@ i915_copy_blit(struct i915_context *i915, unsigned cpp,
|
||||
|
||||
switch (cpp) {
|
||||
case 1:
|
||||
BR13 = (((int)dst_pitch) & 0xffff) | (0xCC << 16);
|
||||
CMD = XY_SRC_COPY_BLT_CMD;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
BR13 = (((int)dst_pitch) & 0xffff) | (0xCC << 16) | (1 << 24);
|
||||
|
||||
Reference in New Issue
Block a user