diff --git a/src/gallium/drivers/r300/ci/r300-rv380-fails.txt b/src/gallium/drivers/r300/ci/r300-rv380-fails.txt index 750660580cb..978c4b1776a 100644 --- a/src/gallium/drivers/r300/ci/r300-rv380-fails.txt +++ b/src/gallium/drivers/r300/ci/r300-rv380-fails.txt @@ -28,14 +28,6 @@ dEQP-GLES2.functional.shaders.functions.control_flow.mixed_return_break_continue dEQP-GLES2.functional.shaders.functions.control_flow.mixed_return_break_continue_vertex,Fail dEQP-GLES2.functional.shaders.functions.control_flow.return_after_continue_fragment,Fail dEQP-GLES2.functional.shaders.functions.control_flow.return_after_continue_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.float_const_write_dynamic_read_fragment,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.float_const_write_dynamic_read_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec2_const_write_dynamic_read_fragment,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec2_const_write_dynamic_read_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_read_fragment,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_read_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec4_const_write_dynamic_read_fragment,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec4_const_write_dynamic_read_vertex,Fail dEQP-GLES2.functional.shaders.loops.for_constant_iterations.101_iterations_fragment,Fail dEQP-GLES2.functional.shaders.loops.for_constant_iterations.101_iterations_vertex,Fail dEQP-GLES2.functional.shaders.loops.for_constant_iterations.conditional_continue_fragment,Fail @@ -93,13 +85,35 @@ dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_1, dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_2,Fail dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_4,Fail dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_8,Fail + +dEQP-GLES2.functional.uniform_api.info_query.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.info_query.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.info_query.multiple_nested_structs_arrays.both,Fail +dEQP-GLES2.functional.uniform_api.info_query.nested_structs_arrays.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.info_query.struct_in_array.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.info_query.struct_in_array.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.random.13,Fail +dEQP-GLES2.functional.uniform_api.random.20,Fail +dEQP-GLES2.functional.uniform_api.random.23,Fail +dEQP-GLES2.functional.uniform_api.random.27,Fail dEQP-GLES2.functional.uniform_api.random.81,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_full.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_full.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_partial.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_partial.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.multiple_nested_structs_arrays.both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.nested_structs_arrays.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.struct_in_array.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.struct_in_array.mat4_mat2_fragment,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.mat4_mat2_both,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.mat4_mat2_fragment,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.multiple_nested_structs_arrays.both,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.mat4_mat2_fragment,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.struct_in_array.mat4_mat2_both,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.struct_in_array.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_value.get_uniform.multiple_nested_structs_arrays.both,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.multiple_nested_structs_arrays.both,Fail # This bunch is not reproducible outside of CI diff --git a/src/gallium/drivers/r300/ci/r300-rv410-fails.txt b/src/gallium/drivers/r300/ci/r300-rv410-fails.txt index 1112976b85d..c9338f21cef 100644 --- a/src/gallium/drivers/r300/ci/r300-rv410-fails.txt +++ b/src/gallium/drivers/r300/ci/r300-rv410-fails.txt @@ -58,10 +58,6 @@ dEQP-GLES2.functional.shaders.functions.control_flow.mixed_return_break_continue dEQP-GLES2.functional.shaders.functions.control_flow.mixed_return_break_continue_vertex,Fail dEQP-GLES2.functional.shaders.functions.control_flow.return_after_continue_fragment,Fail dEQP-GLES2.functional.shaders.functions.control_flow.return_after_continue_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.float_const_write_dynamic_read_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec2_const_write_dynamic_read_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec3_const_write_dynamic_read_vertex,Fail -dEQP-GLES2.functional.shaders.indexing.tmp_array.vec4_const_write_dynamic_read_vertex,Fail dEQP-GLES2.functional.shaders.loops.for_constant_iterations.101_iterations_fragment,Fail dEQP-GLES2.functional.shaders.loops.for_constant_iterations.101_iterations_vertex,Fail dEQP-GLES2.functional.shaders.loops.for_constant_iterations.conditional_continue_fragment,Fail @@ -122,7 +118,24 @@ dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_1, dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_2,Fail dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_4,Fail dEQP-GLES2.functional.texture.specification.teximage2d_align.cube_rgba8888_47_8,Fail + +dEQP-GLES2.functional.uniform_api.info_query.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.info_query.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.info_query.nested_structs_arrays.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.info_query.struct_in_array.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.info_query.struct_in_array.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.random.13,Fail +dEQP-GLES2.functional.uniform_api.random.23,Fail dEQP-GLES2.functional.uniform_api.random.81,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_full.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_full.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_partial.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.basic_array_assign_partial.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.array_in_struct.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.array_in_struct.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.nested_structs_arrays.mat4_mat2_fragment,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.struct_in_array.mat4_mat2_both,Fail +dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.get_uniform.struct_in_array.mat4_mat2_fragment,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.mat4_mat2_both,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.mat4_mat2_fragment,Fail dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.mat4_mat2_fragment,Fail @@ -728,6 +741,22 @@ spec@ext_direct_state_access@textures@CopyTextureSubImage1DEXT + display list GL spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail +spec@ext_framebuffer_multisample@accuracy all_samples color depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples color depthstencil linear,Fail +spec@ext_framebuffer_multisample@accuracy all_samples color small depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples color small depthstencil linear,Fail +spec@ext_framebuffer_multisample@accuracy all_samples depth_draw depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples depth_draw small depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples depth_resolve depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples depth_resolve small depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples srgb depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples srgb depthstencil linear,Fail +spec@ext_framebuffer_multisample@accuracy all_samples srgb small depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples srgb small depthstencil linear,Fail +spec@ext_framebuffer_multisample@accuracy all_samples stencil_draw depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples stencil_draw small depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples stencil_resolve depthstencil,Fail +spec@ext_framebuffer_multisample@accuracy all_samples stencil_resolve small depthstencil,Fail spec@ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 2,Fail spec@ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 4,Fail spec@ext_framebuffer_multisample@alpha-to-coverage-no-draw-buffer-zero 6,Fail @@ -1254,7 +1283,6 @@ spec@glsl-1.20@execution@built-in-functions@fs-op-sub-mat2x4-mat2x4,Fail spec@glsl-1.20@execution@built-in-functions@fs-op-sub-mat3x2-float,Fail spec@glsl-1.20@execution@built-in-functions@fs-outerproduct-vec4-vec4,Fail spec@glsl-1.20@execution@fs-underflow-mul-compare-zero,Fail -spec@glsl-1.20@execution@fs-vec4-const-array-indirect-access-128-elements,Fail spec@glsl-1.20@execution@fs-vec4-const-array-indirect-access-256-elements,Fail spec@glsl-1.20@execution@glsl-fs-frontfacing,Fail spec@glsl-1.20@execution@tex-miplevel-selection gl2:texture() 1dshadow,Fail diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c index 1fe1eab0772..d872dff3736 100644 --- a/src/gallium/drivers/r300/r300_debug.c +++ b/src/gallium/drivers/r300/r300_debug.c @@ -36,6 +36,7 @@ static const struct debug_named_value r300_debug_options[] = { { "notcl", DBG_NO_TCL, "Disable hardware accelerated Transform/Clip/Lighting" }, { "ieeemath", DBG_IEEEMATH, "Force IEEE versions of VS math opcodes where applicable and also IEEE handling of multiply by zero (R5xx only)" }, { "ffmath", DBG_FFMATH, "Force FF versions of VS math opcodes where applicable and 0*anything=0 rules in FS" }, + { "dummysh", DBG_DUMMYSH, "Never report errors when compilation fails, use dummy shaders instead." }, /* must be last */ DEBUG_NAMED_VALUE_END diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 3c362cf3153..e5b48a150d9 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -483,8 +483,7 @@ static void r300_translate_fragment_shader( } if (ttr.error) { - fprintf(stderr, "r300 FP: Cannot translate a shader. " - "Using a dummy shader instead.\n"); + shader->error = strdup("Cannot translate a shader from TGSI."); r300_dummy_fragment_shader(r300, shader); return; } @@ -514,8 +513,7 @@ static void r300_translate_fragment_shader( r3xx_compile_fragment_program(&compiler); if (compiler.Base.Error) { - fprintf(stderr, "r300 FP: Compiler Error:\n%sUsing a dummy shader" - " instead.\n", compiler.Base.ErrorMsg); + shader->error = strdup(compiler.Base.ErrorMsg); if (shader->dummy) { fprintf(stderr, "r300 FP: Cannot compile the dummy shader! " diff --git a/src/gallium/drivers/r300/r300_fs.h b/src/gallium/drivers/r300/r300_fs.h index deb5ce69a3d..82d5b59e67b 100644 --- a/src/gallium/drivers/r300/r300_fs.h +++ b/src/gallium/drivers/r300/r300_fs.h @@ -40,6 +40,8 @@ struct r300_fragment_shader_code { bool write_all; + /* Error message in case compilation failed. */ + char *error; }; struct r300_fragment_shader { diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index 6879c465b90..fc7996af580 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -94,6 +94,7 @@ radeon_winsys(struct pipe_screen *screen) { #define DBG_NO_TCL (1 << 25) #define DBG_IEEEMATH (1 << 26) #define DBG_FFMATH (1 << 27) +#define DBG_DUMMYSH (1 << 28) /*@}*/ static inline bool SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags) { diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index e45bfd09be3..8790a6ff339 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -41,6 +41,9 @@ r300_mark_atom_dirty(r300, &(atom)); \ } +static void r300_delete_vs_state(struct pipe_context* pipe, void* shader); +static void r300_delete_fs_state(struct pipe_context* pipe, void* shader); + static bool blend_discard_if_src_alpha_0(unsigned srcRGB, unsigned srcA, unsigned dstRGB, unsigned dstA) { @@ -1073,6 +1076,19 @@ static void* r300_create_fs_state(struct pipe_context* pipe, } r300_pick_fragment_shader(r300, fs, &precompile_state); + if (fs->shader->error) { + if (shader->report_compile_error && !DBG_ON(r300, DBG_DUMMYSH)) { + fprintf(stderr, "r300 FP: Compiler error: %s\n" + "r300 FP: Use RADEON_DEBUG=dummysh to force dummy shader instead.\n", + fs->shader->error); + ((struct pipe_shader_state *)shader)->error_message = strdup(fs->shader->error); + r300_delete_fs_state(pipe, fs); + return NULL; + } + fprintf(stderr, "r300 FP: Compiler error: %s\n" + "r300 FP: Using a dummy shader instead.\n", fs->shader->error); + } + return (void *)fs; } @@ -1127,6 +1143,7 @@ static void r300_delete_fs_state(struct pipe_context* pipe, void* shader) ptr = ptr->next; rc_constants_destroy(&tmp->code.constants); FREE(tmp->cb_code); + free(tmp->error); FREE(tmp); } if (fs->state.type == PIPE_SHADER_IR_NIR) { @@ -1972,6 +1989,19 @@ static void* r300_create_vs_state(struct pipe_context* pipe, r300_draw_init_vertex_shader(r300, vs); } + if (r300->screen->caps.has_tcl && vs->shader->error) { + if (shader->report_compile_error && !DBG_ON(r300, DBG_DUMMYSH)) { + fprintf(stderr, "r300 VP: Compiler error: %s\n" + "r300 VP: Use RADEON_DEBUG=dummysh to silently skip instead.\n", + vs->shader->error); + ((struct pipe_shader_state *)shader)->error_message = strdup(vs->shader->error); + r300_delete_vs_state(pipe, vs); + return NULL; + } + fprintf(stderr, "r300 VP: Compiler error: %s\n" + "r300 VP: Corresponding draws will be skipped.\n", vs->shader->error); + } + return vs; } @@ -2023,6 +2053,7 @@ static void r300_delete_vs_state(struct pipe_context* pipe, void* shader) while (vs->shader) { rc_constants_destroy(&vs->shader->code.constants); FREE(vs->shader->code.constants_remap_table); + free(vs->shader->error); vs->shader = vs->shader->next; FREE(vs->first); vs->first = vs->shader; diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c index 44303e6776a..19529f4e64e 100644 --- a/src/gallium/drivers/r300/r300_vs.c +++ b/src/gallium/drivers/r300/r300_vs.c @@ -223,8 +223,7 @@ void r300_translate_vertex_shader(struct r300_context *r300, r300_tgsi_to_rc(&ttr, shader->state.tokens); if (ttr.error) { - fprintf(stderr, "r300 VP: Cannot translate a shader. " - "Corresponding draws will be skipped.\n"); + vs->error = strdup("Cannot translate shader from TGSI"); vs->dummy = true; return; } @@ -243,9 +242,7 @@ void r300_translate_vertex_shader(struct r300_context *r300, /* Invoke the compiler */ r3xx_compile_vertex_program(&compiler); if (compiler.Base.Error) { - fprintf(stderr, "r300 VP: Compiler error:\n%sCorresponding draws will be" - " skipped.\n", compiler.Base.ErrorMsg); - + vs->error = strdup(compiler.Base.ErrorMsg); rc_destroy(&compiler.Base); vs->dummy = true; return; diff --git a/src/gallium/drivers/r300/r300_vs.h b/src/gallium/drivers/r300/r300_vs.h index ce5ff1494e0..c4b6dc0bdd8 100644 --- a/src/gallium/drivers/r300/r300_vs.h +++ b/src/gallium/drivers/r300/r300_vs.h @@ -37,6 +37,9 @@ struct r300_vertex_shader_code { struct r300_vertex_program_code code; struct r300_vertex_shader_code *next; + + /* Error message in case compilation failed. */ + char *error; }; struct r300_vertex_shader {