1 #ifndef _ESEXTCTEXTUREBORDERCLAMPSAMPLERPARAMETERIWITHWRONGPNAME_HPP 2 #define _ESEXTCTEXTUREBORDERCLAMPSAMPLERPARAMETERIWITHWRONGPNAME_HPP 3 /*------------------------------------------------------------------------- 4 * OpenGL Conformance Test Suite 5 * ----------------------------- 6 * 7 * Copyright (c) 2014-2016 The Khronos Group Inc. 8 * 9 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * you may not use this file except in compliance with the License. 11 * You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 * 21 */ /*! 22 * \file 23 * \brief 24 */ /*-------------------------------------------------------------------*/ 25 26 /*! 27 * \file esextcTextureBorderClampSamplerParameterIWithWrongPname.hpp 28 * \brief Verifies glGetSamplerParameterI*() and glSamplerParameterI*() 29 * entry-points generate GL_INVALID_ENUM error if invalid pnames 30 * are used. (Test 5) 31 */ /*-------------------------------------------------------------------*/ 32 33 #include "esextcTextureBorderClampBase.hpp" 34 35 namespace glcts 36 { 37 38 /** Implementation of Test 5 from CTS_EXT_texture_border_clamp. Description follows 39 * 40 * Verify glGetSamplerParameterIivEXT(), glGetSamplerParameterIuivEXT(), 41 * glSamplerParameterIivEXT() and glSamplerParameterIuivEXT() generate 42 * GL_INVALID_ENUM error if invalid pnames are used. 43 * 44 * Category: Negative tests; 45 * Priority: Must-have. 46 * 47 * The test should verify the error is generated, when each function is 48 * called for the following pnames: 49 * 50 * - GL_TEXTURE_IMMUTABLE_FORMAT; 51 * - GL_TEXTURE_BASE_LEVEL; 52 * - GL_TEXTURE_MAX_LEVEL; 53 * - GL_TEXTURE_SWIZZLE_R; 54 * - GL_TEXTURE_SWIZZLE_G; 55 * - GL_TEXTURE_SWIZZLE_B; 56 * - GL_TEXTURE_SWIZZLE_A; 57 * 58 */ 59 class TextureBorderClampSamplerParameterIWithWrongPnameTest : public TextureBorderClampBase 60 { 61 public: 62 /* Public functions */ 63 TextureBorderClampSamplerParameterIWithWrongPnameTest(Context &context, const ExtParameters &extParams, 64 const char *name, const char *description); 65 ~TextureBorderClampSamplerParameterIWithWrongPnameTest()66 virtual ~TextureBorderClampSamplerParameterIWithWrongPnameTest() 67 { 68 } 69 70 virtual void deinit(void); 71 virtual IterateResult iterate(void); 72 73 private: 74 /* Private functions */ 75 void initTest(void); 76 77 void VerifyGLGetSamplerParameterIiv(glw::GLuint sampler_id, glw::GLenum pname, glw::GLenum expected_error); 78 79 void VerifyGLGetSamplerParameterIuiv(glw::GLuint sampler_id, glw::GLenum pname, glw::GLenum expected_error); 80 81 void VerifyGLSamplerParameterIiv(glw::GLuint sampler_id, glw::GLenum pname, glw::GLenum expected_error); 82 83 void VerifyGLSamplerParameterIuiv(glw::GLuint sampler_id, glw::GLenum pname, glw::GLenum expected_error); 84 85 /* Private variables */ 86 glw::GLuint m_sampler_id; 87 glw::GLboolean m_test_passed; 88 89 std::vector<glw::GLenum> m_pnames_list; 90 91 /* Private static constants */ 92 static const glw::GLuint m_buffer_size; 93 static const glw::GLuint m_texture_unit_index; 94 }; 95 96 } // namespace glcts 97 98 #endif // _ESEXTCTEXTUREBORDERCLAMPSAMPLERPARAMETERIWITHWRONGPNAME_HPP 99