Commit 9f76cbaa authored by Paul Berry's avatar Paul Berry

Transform feedback: Move piglit_require_transform_feedback().

With the transform feedback wrapper functions removed,
piglit_require_transform_feedback() was the only function left in
piglit-transform-feedback.{c.h}.  This patch moves it to piglit-util.c
so that it won't get lonely.
Reviewed-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
parent f7f0f906
......@@ -4,7 +4,6 @@ set(UTIL_GL_SOURCES
piglit-dispatch-init.c
piglit-shader.c
piglit-shader-gl.c
piglit-transform-feedback.c
piglit-util-gl.c
piglit-vbo.cpp
sized-internalformats.c
......@@ -30,7 +29,6 @@ IF(BUILD_GLX_TESTS)
piglit_add_library (piglitglxutil
piglit-shader.c
piglit-shader-gl.c
piglit-transform-feedback.c
piglit-util-gl-common.c
piglit-util-gl-enum.c
piglit-util-gl.c
......
/*
* Copyright © 2011 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef USE_OPENGL
# error USE_OPENGL is undefined
#endif
#if defined(_MSC_VER)
#include <windows.h>
#endif
#include "piglit-util-gl-common.h"
void
piglit_require_transform_feedback(void)
{
if (!(piglit_get_gl_version() >= 30 ||
piglit_is_extension_supported("GL_EXT_transform_feedback"))) {
printf("Transform feedback not supported.\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
}
}
/*
* Copyright © 2011 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#pragma once
/**
* Require transform feedback.
*
* Transform feedback may either be provided by GL 3.0 or
* EXT_transform_feedback.
*/
extern void piglit_require_transform_feedback(void);
......@@ -38,7 +38,6 @@ extern "C" {
#include "piglit-framework.h"
#include "piglit-shader.h"
#include "piglit-transform-feedback.h"
extern const uint8_t fdo_bitmap[];
extern const unsigned int fdo_bitmap_width;
......@@ -170,6 +169,7 @@ GLuint piglit_rgbw_texture(GLenum format, int w, int h, GLboolean mip,
GLuint piglit_depth_texture(GLenum target, GLenum format, int w, int h, int d, GLboolean mip);
extern float piglit_tolerance[4];
void piglit_set_tolerance_for_bits(int rbits, int gbits, int bbits, int abits);
extern void piglit_require_transform_feedback(void);
extern GLfloat cube_face_texcoords[6][4][3];
extern const char *cube_face_names[6];
......
......@@ -1338,3 +1338,20 @@ piglit_depth_texture(GLenum target, GLenum internalformat, int w, int h, int d,
free(data);
return tex;
}
/**
* Require transform feedback.
*
* Transform feedback may either be provided by GL 3.0 or
* EXT_transform_feedback.
*/
void
piglit_require_transform_feedback(void)
{
if (!(piglit_get_gl_version() >= 30 ||
piglit_is_extension_supported("GL_EXT_transform_feedback"))) {
printf("Transform feedback not supported.\n");
piglit_report_result(PIGLIT_SKIP);
exit(1);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment