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>
(cherry picked from commit bed66430ab)

Conflicts:
	src/gallium/drivers/i915/ci/i915-g33-fails.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
This commit is contained in:
GKraats 2024-11-17 20:53:29 +01:00 committed by Dylan Baker
parent 9a73b89f28
commit 34c6edb029
3 changed files with 8 additions and 34 deletions

View file

@ -1634,7 +1634,7 @@
"description": "i915g: fix glClearColor using a 1 byte color format",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -61,34 +61,12 @@ dEQP-GLES2.functional.shaders.struct.uniform.nested_struct_array_dynamic_index_f
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
@ -329,6 +307,7 @@ spec@!opengl 2.1@polygon-stipple-fs,Fail
spec@arb_arrays_of_arrays@execution@glsl-arrays-copy-size-mismatch,Fail
spec@arb_depth_texture@depth-level-clamp,Fail
spec@arb_depth_texture@fbo-clear-formats,Fail
spec@arb_depth_texture@fbo-clear-formats@GL_DEPTH_COMPONENT,Fail
spec@arb_depth_texture@fbo-clear-formats@GL_DEPTH_COMPONENT16,Fail
@ -529,17 +508,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_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

View file

@ -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);