Ejemplo n.º 1
0
static bool
test_3d_tex_format(GLenum internalFormat)
{
	GLint width, height, depth;
	bool pass = true;
	unsigned mbytes;

	piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);

	/* use proxy texture to find actual max texture size */
	width = height = depth = 0;
	find_max_tex3d_size(internalFormat, MaxSize,
			    &width, &height, &depth);

	mbytes = tex_size(internalFormat, width, height, depth);
	printf("Actual max 3D texture size for %s: %d x %d x %d (%u MB)\n",
	       piglit_get_gl_enum_name(internalFormat),
	       width, height, depth, mbytes);

	/* first, try some smaller res 3D texture rendering */
	pass = test_render(internalFormat, width, height, depth/4);
	pass = test_render(internalFormat, width, height, depth/2) && pass;

	/* test largest 3D texture size */
	pass = test_render(internalFormat, width, height, depth) && pass;

	return pass;
}
Ejemplo n.º 2
0
/**
 * @brief Main entry point.
 */
int main( int argc, char *argv[] )
{
   int failed;
   int rev;
   SDL_version ver;

   /* Get options. */
   parse_options( argc, argv );

   /* Defaults. */
   failed = 0;

   /* Print some text if verbose. */
   SDL_GetVersion( &ver );
   rev = SDL_GetRevision();
   SDL_ATprintVerbose( 1, "Running tests with SDL %d.%d.%d revision %d\n",
         ver.major, ver.minor, ver.patch, rev );

   /* Automatic tests. */
   if (run_platform)
      failed += test_platform();
   if (run_rwops)
      failed += test_rwops();
   if (run_rect)
      failed += test_rect();
   if (run_surface)
      failed += test_surface();
   if (run_render)
      failed += test_render();
   if (run_audio)
      failed += test_audio();

   /* Manual tests. */
   if (run_manual) {
   }

   /* Display more information if failed. */
   if (failed > 0) {
      SDL_ATprintErr( "Tests run with SDL %d.%d.%d revision %d\n",
            ver.major, ver.minor, ver.patch, rev );
      SDL_ATprintErr( "System is running %s and is %s endian\n",
            SDL_GetPlatform(),
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
            "little"
#else
            "big"
#endif
            );
   }

   return failed;
}
Ejemplo n.º 3
0
int main()
{
        unsigned int i;
        struct s_render_3D_dbentry *rdata;

        for(i = 0; i < sizeof(rates)/sizeof(int); i++) {
                rdata = render_3D_init(rates[i]);
                test_render(rdata, rates[i]);
                render_3D_free(&rdata);
        }

        xmemdmp();

        return 1;
}
Ejemplo n.º 4
0
int
main() {

  // Parser
  test_parse_simple();
  test_parse_major();
  test_parse_minor();
  test_parse_prerelease();
  test_parse_metadata();
  test_parse_prerelerease_metadata();

  // Comparison
  test_compare();
  test_compare_full();
  test_compare_gt();
  test_compare_lt();
  test_compare_eq();
  test_compare_neq();
  test_compare_gte();
  test_compare_lte();
  test_satisfies();

  // Render
  test_render();
  test_bump();
  test_bump_minor();
  test_bump_patch();

  // Clean up
  test_free();

  // Helpers
  test_valid_chars();

  return 0;
}