summaryrefslogtreecommitdiff
path: root/tests/fbo
AgeCommit message (Collapse)AuthorFilesLines
2015-04-13fbo-formats: add texture_stencil8 supportDave Airlie6-7/+28
Make sure to disable stencil textures everywhere we disable depth ones. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-02-18fbo: Fix broken MRT bindings test.Matt Turner1-1/+1
The code declared GLuint textures[4] and then proceeded to do things like glGenTextures(5, textures) and access textures[4]. Presumably the intention was to declare an array of size 5. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-01-16fbo: Changing mrt binding with same shader sourceMike Stroyan2-0/+245
New test fbo-mrt-new-bind asserts correct behavior for changing framebuffer binding without changing the shaders. That can cause trouble if the new binding selects a different shader kernel without updating all resources.
2014-12-03fbo-depth-array: use larger window for Windows sakeBrian Paul1-1/+1
Use slightly larger window size so that Windows doesn't complain about "Got spurious window resize in automatic run".
2014-10-21Replaced assert(glGetError()) with gl_check_gl_error()Juliet fru53-93/+186
Report PIGLIT_FAIL if there's an unexpected error. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-09-04fbo-depth-array: rewrite the test to make it really comprehensiveMarek Olšák1-140/+387
It tests: - clearing - layered clearing - drawing - drawing with a depth or stencil shader output - various sizes of TEXTURE_2D_ARRAY - texturing with both depth and stencil. v2: test dimensions from 1x1
2014-08-12bptc: Add tests using fbo-generatemipmap-formatsNeil Roberts1-0/+7
The unsigned half float format needs special handling because the texture that the test uploads tries to use negative values. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-08-12Add the bptc formats to fbo-formats.hNeil Roberts1-1/+25
2014-07-15util/gl: Rename piglit-util-gl-common.hChad Versace83-83/+83
There are no longer any source files in tests/util that are specific to a particular OpenGL API. In other words, all OpenGL utility sources in tests/util are now "common" and shared by all OpenGL APIs. So remove the 'common' in filename 'piglit-util-gl-common.h'. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-26fbo-incomplete-invalid-texture: Remove unused variable.Vinson Lee1-2/+0
Fix clang unused-const-variable warning. fbo-incomplete-invalid-texture.c:40:20: warning: unused variable 'green' [-Wunused-const-variable] static const float green[] = { 0.f, 1.f, 0.f, 1.f }; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-26fbo-generatemipmap-array: Remove unused variable.Vinson Lee1-1/+0
Fix clang unused-const-variable warning. fbo-generatemipmap-array.c:51:20: warning: unused variable 'red' [-Wunused-const-variable] static const float red[] = {1, 0, 0, 0}; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-17fbo-generatemipmap-1d: Remove unused variables.Vinson Lee1-5/+0
Fix clang unused-const-variable warnings. tests/fbo/fbo-generatemipmap-1d.c:44:20: warning: unused variable 'red' [-Wunused-const-variable] static const float red[] = {1, 0, 0, 0}; ^ tests/fbo/fbo-generatemipmap-1d.c:45:20: warning: unused variable 'green' [-Wunused-const-variable] static const float green[] = {0, 1, 0, 0}; ^ tests/fbo/fbo-generatemipmap-1d.c:46:20: warning: unused variable 'blue' [-Wunused-const-variable] static const float blue[] = {0, 0, 1, 0}; ^ tests/fbo/fbo-generatemipmap-1d.c:47:20: warning: unused variable 'white' [-Wunused-const-variable] static const float white[] = {1, 1, 1, 1}; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-17fbo: test that swizzle doesn't affect mipmap generationRobert Bragg2-0/+166
This is a regression test for a mesa meta bug fix whereby a swizzle set via GL_ARB_texture_swizzle was being applied while iteratively generating a mipmap. This meant the swizzle would be applied twice by the time the application sampled those generated layers. The bug was originally noticed with code that used a swizzle to emulate a component alpha texture via a component red texture. In this case the texture internally only had one component and applying the swizzle effectively discarded that component. The test follows a similar pattern, but swizzles from red to green instead of to alpha. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-29fbo-drawbuffers: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29fbo: use default window size for fbo testsBrian Paul20-40/+0
No regressions with NVIDIA's driver or llvmpipe. Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-26fbo-readpixels: use piglit_get_gl_enum_name() for info/error messagesBrian Paul1-6/+9
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-04-24fbo-depth-sample-compare: Eliminate dependency on glutSolidSphere.José Fonseca2-6/+17
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-03fbo-generatemipmap-formats: skip integer texturesBrian Paul1-0/+5
GL doesn't allow auto mipmap generation for integer textures. Skip those formats to avoid hitting an assertion in the piglit rgbw texture utility code when using the 'n' key to cycle through tests manually. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-03-22fbo-generatemipmap-3d: new test for 3D mipmap generationMarek Olšák2-0/+309
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-22fbo-generatemipmap-1d: new test for mipmap generation of 1D texturesMarek Olšák2-0/+245
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-22fbo-generatemipmap-cubemap: new test for cubemaps and cube arraysMarek Olšák2-0/+490
v2: load cubemap faces using a loop Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-22fbo-generatemipmap-array: test a non-renderable and a compressed formatMarek Olšák1-19/+116
This extends the test to test _mesa_generate_mipmap (software fallback). Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-20fbo-tex-rgbx: test rendering to and texturing from an RGBx textureBrian Paul2-0/+198
GL_RGB internal formats are usually stored as RGBx. This test makes sure that the empty alpha channel is one when we sample from the texture. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-03-19fbo-blit-d24s8: avoid using texturesIlia Mirkin1-21/+17
There's no reason to attach the teximages to the framebuffer. Instead use renderbuffers so that we don't need to depend on ARB_depth_texture. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-01-13fbo-stencil: Silence uninitialized warning.Vinson Lee1-0/+1
Fix GCC maybe-uninitialized warning. fbo-stencil.c:332:2: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized] return res; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-13fbo-scissor-blit: Silence uninitialized variable warning.Vinson Lee1-1/+3
Fix GCC maybe-uninitialized warning. fbo-scissor-blit.c:109:5: warning: 'blit_to_fbo' may be used uninitialized in this function [-Wmaybe-uninitialized] if (blit_to_fbo) ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-13fbo-rg: Silence uninitialized variable warning.Vinson Lee1-1/+1
Fix GCC maybe-uninitialized warning. fbo-rg.c:485:34: warning: 'internal_format' may be used uninitialized in this function [-Wmaybe-uninitialized] pass = render_and_check_textures(internal_format); ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-07fbo-incomplete: Fix GCC format-security warnings.Vinson Lee1-3/+3
This patch fixes these GCC warnings. fbo-incomplete.cpp: In function ‘bool invalid_1d_array_layer()’: fbo-incomplete.cpp:304:57: warning: format not a string literal and no format arguments [-Wformat-security] fbo-incomplete.cpp: In function ‘bool invalid_2d_array_layer()’: fbo-incomplete.cpp:331:57: warning: format not a string literal and no format arguments [-Wformat-security] fbo-incomplete.cpp: In function ‘bool invalid_cube_array_layer()’: fbo-incomplete.cpp:358:57: warning: format not a string literal and no format arguments [-Wformat-security] Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-06fbo-bind-renderbuffer: Expect INVALID_OPERATION error instead of INVALID_VALUEJin Zhou1-4/+10
The spec clearly requires INVALID_OPERATION, so add a quotation from the spec. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-12-26fbo-depth: Fix uninitialized variable warning.Vinson Lee1-0/+1
Fix GCC maybe-uninitialized warning. fbo-depth.c: In function 'piglit_display': fbo-depth.c:314:2: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized] return res; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-12-26fbo-depthstencil: Fix uninitialized variable warning.Vinson Lee1-0/+1
Fix GCC maybe-uninitialized warning. fbo-depthstencil.c: In function 'piglit_display': fbo-depthstencil.c:483:2: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized] return res; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-12-26fbo-generatemipmap-formats: Fix uninitialized variable warnings.Vinson Lee1-0/+2
Fix GCC maybe-uninitialized warnings. fbo-generatemipmap-formats.c: In function 'test_format': fbo-generatemipmap-formats.c:112:15: warning: 'format' may be used uninitialized in this function [-Wmaybe-uninitialized] glTexImage2D(GL_TEXTURE_2D, i, internalformat, ^ fbo-generatemipmap-formats.c:80:15: note: 'format' was declared here GLenum type, format; ^ fbo-generatemipmap-formats.c:112:15: warning: 'type' may be used uninitialized in this function [-Wmaybe-uninitialized] glTexImage2D(GL_TEXTURE_2D, i, internalformat, ^ fbo-generatemipmap-formats.c:80:9: note: 'type' was declared here GLenum type, format; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-12-02all.tests: make FBO tests concurrentMarek Olšák18-0/+19
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-02Always bind piglit_winsys_fbo instead of 0Marek Olšák53-90/+90
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-02all.tests: make fbo-depth and fbo-stencil tests concurrentMarek Olšák3-3/+6
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-02all.tests: make fbo-rg tests concurrentMarek Olšák1-1/+2
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-02all.tests: make fbo format tests concurrentMarek Olšák5-6/+15
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-02all.tests: make fbo-depthstencil tests concurrentMarek Olšák1-0/+1
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-02fbo-clear-formats: fix the stencil clear testMarek Olšák1-2/+2
glBlitFramebuffer generates a GL error, good old glCopyPixels doesn't. Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-11-11fbo-drawbuffers-maxtargets: use different colors for different buffersBrian Paul1-12/+51
Before, the test always drew green rects for all the target buffers. Now we draw a different color into each buffer to be more thorough. Plus, replace 16 with MAX_TARGETS, add some comments, etc. Note: the test now fails with Mesa's swrast because swrast errantly writes the same color to all render targets.
2013-10-08fbo-gl_pointcoord: clean up shader formattingBrian Paul1-5/+7
2013-10-08piglit: silence piglit_report_subtest_result() format warningsBrian Paul7-13/+13
silences a bunch of warnings such as: "tests/fbo/fbo-alphatest-formats.c:184:3: warning: format not a string literal and no format arguments [-Wformat-security]"
2013-09-03fbo-storage-formats: Fix reporting of invalid formats.Kenney Phillis1-1/+1
Currently Invalid formats is reported from the formats data structure. This is incorrect because the invalid formats set should not use this system. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-08-24Add new test for MRT alpha testChris Forbes2-0/+154
This test exercises alpha test with multiple render targets. This is one part of FDO #67864. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-08-06fbo: Trigger a Mesa segfault with an FBO with invalid texture attachedIan Romanick2-0/+114
Attach a really broken texture to an FBO, unbind the FBO, rebind the FBO: boom! Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-08-06fbo: Verify deleting the texture bound to the current FBOIan Romanick1-0/+79
Also verify deleting the renderbuffer bound to the current FBO. Both of these should result in GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT. This currently passes on Mesa. v2: Fix a compile error typo. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-08-06fbo: Verify attaching an invalid slice of a 3D textureIan Romanick1-0/+174
Create a texture with slices [0, N-1]. Try attaching slice N, N+1, and N-1 to an FBO. The first two cases should result in GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT. Do the same test with the layers of an array texture. The i965 driver results in: intel_mipmap_tree.h:554: intel_miptree_check_level_layer: Assertion `layer < mt->level[level].depth' failed. v2: Also try attaching levels N and N-1 instead of just N+1. This catches a bug in the first proposed fix for this issue. v3: Also try 1D_ARRAY textures. There were still some problems there in Mesa. v4: Also try CUBE_MAP_ARRAY textures. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> [v1]
2013-08-06fbo: Add the first in a series of negative FBO completeness testsIan Romanick2-0/+221
This test will eventually contain a number of subtests that verify certain framebuffer incompleteness scenarios. The first test tries a 0x0 color texture (and renderbuffer). This should result in GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT, but in Mesa it results in a segfault instead. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-06-12Always print what is being probedMarek Olšák1-1/+1
Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-06-07Set config.requires_displayed_window in tests that use front buffers.Paul Berry2-0/+2
When running tests with a non-composited window manager, it isn't safe to access the front buffer until after the window is shown. This patch sets config.requires_displayed_window in tests that access front buffers, to make sure that the piglit framework exposes the window, even when testing in "-auto" mode. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>