[Piglit] [PATCH] program_interface_query: no need to check link status when using piglit_build_simple_program_multiple_shaders
Tapani Pälli
tapani.palli at intel.com
Thu Feb 11 09:59:31 UTC 2016
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
On 02/10/2016 08:56 PM, Alejandro Piñeiro wrote:
> From piglit_build_simple_program_multiple_shaders documentation:
> /**
> * Builds and links a program from optional sources, throwing
> * PIGLIT_FAIL on error. The last target must be 0.
> */
>
> So internally is already calling piglit_link_check_status, deleting
> the program and reporting PIGLIT_FAIL if fails.
>
> So it is not needed to check the link status. That would be needed
> when using piglit_build_simple_program_unlinked_multiple_shaders.
> ---
> .../arb_program_interface_query/getprogramresourceiv.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/tests/spec/arb_program_interface_query/getprogramresourceiv.c b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
> index aff7c86..28cfc27 100755
> --- a/tests/spec/arb_program_interface_query/getprogramresourceiv.c
> +++ b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
> @@ -982,10 +982,6 @@ piglit_init(int argc, char **argv)
> GL_GEOMETRY_SHADER, gs_stor,
> GL_FRAGMENT_SHADER, fs_stor,
> 0);
> - if (!piglit_link_check_status(prog_stor)) {
> - glDeleteProgram(prog_stor);
> - piglit_report_result(PIGLIT_FAIL);
> - }
> }
>
> if (piglit_is_extension_supported("GL_ARB_explicit_attrib_location") &&
> @@ -994,10 +990,6 @@ piglit_init(int argc, char **argv)
> GL_VERTEX_SHADER, vs_loc,
> GL_FRAGMENT_SHADER, fs_loc,
> 0);
> - if (!piglit_link_check_status(prog_loc)) {
> - glDeleteProgram(prog_loc);
> - piglit_report_result(PIGLIT_FAIL);
> - }
> }
>
> if (piglit_is_extension_supported("GL_ARB_shader_atomic_counters")) {
> @@ -1026,10 +1018,6 @@ piglit_init(int argc, char **argv)
> GL_GEOMETRY_SHADER, gs_sub,
> GL_FRAGMENT_SHADER, fs_sub,
> 0);
> - if (!piglit_link_check_status(prog_sub)) {
> - glDeleteProgram(prog_sub);
> - piglit_report_result(PIGLIT_FAIL);
> - }
>
> if (piglit_is_extension_supported("GL_ARB_tessellation_shader")) {
> prog_sub_tess =
> @@ -1052,10 +1040,6 @@ piglit_init(int argc, char **argv)
> prog_cs = piglit_build_simple_program_multiple_shaders(
> GL_COMPUTE_SHADER, cs_sub,
> 0);
> - if (!piglit_link_check_status(prog_cs)) {
> - glDeleteProgram(prog_cs);
> - piglit_report_result(PIGLIT_FAIL);
> - }
> }
> }
>
>
More information about the Piglit
mailing list