summaryrefslogtreecommitdiff
path: root/tests/general
AgeCommit message (Collapse)AuthorFilesLines
2015-08-06point-vertex-id: Fix memory leak.Vinson Lee1-0/+2
Fix resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Neil Roberts <neil@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2015-07-28point-vertex-id: Test using an instanced attributeNeil Roberts1-12/+63
Adds an option to use an instanced attribute so that it can be tested in combination with glPolygonMode. This demonstrates a bug on the Mesa i965 driver on BDW which was reported as bug #91292. The ‘divisor’ argument can be added in addition to any of the other arguments so that all of the combinations can be test.
2015-07-28point-vertex-id: Additionally test with gl_InstanceIDNeil Roberts1-51/+130
The point-vertex-id test was originally created to test gl_VertexID in combination with glPolygonMode(GL_POINT) because of a bug with the i965 driver in Mesa. The same bug exists with gl_InstanceID and the code for BDW has some extra complications in this case so I think it's worth extending the test to check that as well. The test now takes a command line argument to specify which builtin to test. It can also take both arguments to generate a shader which relies on both.
2015-05-12request RGB visual, fixes gbm renderingIlia Mirkin2-2/+2
GBM presumably defaults to RGB565 otherwise. Not all of these are required, as some would still work with less precision, but this makes the tests consistent. At least fp-formats and user-clip were failing previously. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-02-16teximage-scale-bias: tests texture upload with scale/bias transfer optionsIago Toral Quiroga2-0/+136
After the recent rewrite of the format conversion code in Mesa we got a bug report for incorrect texture uploads with scale/bias trasfer options: https://bugs.freedesktop.org/show_bug.cgi?id=89068 This was not being catched by piglit, so this patch adds a test case to avoid similar regressions in the future. v2 (Brian Paul) - Rename test to textimage-scale-bias - Use 8-space indentation. Reviewed-by: Brian Paul <brianp@vmware.com>
2015-01-08framebuffer-srgb: Remove dead assignment.Vinson Lee1-1/+1
Fix Clang Static Analyzer dead assignment bug. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2015-01-07general: Testing really basic texture errors.Laura Ekstrand2-0/+75
Tests errors thrown by glGenTextures, glBindTexture, and glDeleteTextures. Oddly enough, these didn't seem to be tested elsewhere.
2014-12-03fog-modes: rename near, far variables to fix MinGW buildBrian Paul1-7/+7
Trivial.
2014-12-03util: move windows macro redefinitions into a single placeEmil Velikov1-5/+0
Move the final two windows specific #undef next to their min/max brothers. Note that they seem to be defined when building with MSVC (_MSV_VER) rather than all windows platfroms (_WIN32). Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-11-17Add a test using gl_VertexID with glPolygonMode(GL_POINT)Neil Roberts2-0/+154
This currently exposes a bug in the i965 driver. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84677
2014-11-08cmake: Require Visual Studio 2013.José Fonseca1-4/+2
Verified that cmake aborts with MSVS 2012. https://bugs.freedesktop.org/show_bug.cgi?id=85528 Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-10-21Replaced assert(glGetError()) with gl_check_gl_error()Juliet fru8-9/+18
Report PIGLIT_FAIL if there's an unexpected error. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-09-26draw-pixels: update BYTE_TO_FLOAT() macro to match MesaBrian Paul1-1/+1
Use Mesa's BYTE_TO_FLOAT_TEX() arithmetic. This lets Mesa pass the test. No regression with nvidia's driver either. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-09-26draw-pixels: report format/type for failuresBrian Paul1-16/+40
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-08-08attribs: add support for the SNORM equation 2.3Marek Olšák1-6/+25
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-07-18lineloop: fix #includeBrian Paul1-1/+1
Trivial.
2014-07-19lineloop: add test for checking behavior with many immediate mode vertsRoland Scheidegger2-0/+100
line loops are difficult to handle because when trying to accumulate vertex data in a buffer the loop must be closed at the end - this is problematic if using any kind of fixed size buffer. With immediate mode api (presumably display lists have similar problems) this exposes a bug in mesa when the buffer gets full and data is wrapped around (each buffer forms its own incorrect line loop) (actually it seems to expose two bugs, one in vbo, one in draw). See https://bugs.freedesktop.org/show_bug.cgi?id=81174. This only tests line loops, not the primitive-from-hell, GL_POLYGON, which should have the same problem but only with fill mode line... Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-07-16polygon-offset: limit line width to 12 pixelsBrian Paul1-0/+3
12 is somewhat arbitrary, but it avoids total failure if the max line width is something large (like 255 in llvmpipe).
2014-07-15util/gl: Rename piglit-util-gl-common.hChad Versace109-109/+109
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-07-10clipflat: fix 0/2 index typoBrian Paul1-1/+1
Spotted by Meng-Lin Wu. Reviewed-by: Matthew McClure <mcclurem@vmware.com>
2014-06-26stencil-twoside: Remove unused variables.Vinson Lee1-3/+0
Fix clang unused-const-variable warnings. stencil-twoside.c:50:22: warning: unused variable 'Near' [-Wunused-const-variable] static const GLfloat Near = 5.0, Far = 25.0; ^ stencil-twoside.c:50:34: warning: unused variable 'Far' [-Wunused-const-variable] static const GLfloat Near = 5.0, Far = 25.0; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-26blendsquare: Removed unused variables.Vinson Lee1-2/+0
Fix clang unused-const-variable warnings. blendsquare.c:47:22: warning: unused variable 'Near' [-Wunused-const-variable] static const GLfloat Near = 5.0, Far = 25.0; ^ blendsquare.c:47:34: warning: unused variable 'Far' [-Wunused-const-variable] static const GLfloat Near = 5.0, Far = 25.0; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-26blendminmax: Remove unused variables.Vinson Lee1-2/+0
Fix clang unused-const-variable warnings. blendminmax.c:47:22: warning: unused variable 'Near' [-Wunused-const-variable] static const GLfloat Near = 5.0, Far = 25.0; ^ blendminmax.c:47:34: warning: unused variable 'Far' [-Wunused-const-variable] static const GLfloat Near = 5.0, Far = 25.0; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-26triangle-rasterization: increase the precision of the testZack Rusin1-43/+53
Increase the subpixel precision to 8 bits. This requires changing some of the code to 64 bits to avoid overflows. v2 (sroland): Query GL for the number of subpixel bits and use that instead of a fixed 8 bits. Note that mesa drivers don't set this yet individually always using default 4 bits (GL requires 4 bits, all d3d10 capable hw should have 8 bits) and gallium drivers even can't set it so also add an override subpixel_bits arg so any desired precision can be tested. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-12cmake: Build a few more tests with MSVC.José Fonseca1-4/+2
It seems at least that newer MSVC versions can compile these without problems. Also add comment explaining why some tests still can't be built for future reference. Trivial. Only affects MSVC builds.
2014-06-09pbo-readpixels-small: use default window sizeBrian Paul1-3/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-05-21arb_draw_elements_base_vertex: rename/move negative index testBrian Paul2-145/+0
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-05-21arb_draw_elements_base_vertex: move the drawelements testBrian Paul2-157/+0
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-05-21arb_draw_elements_base_vertex: move bounds checking testBrian Paul2-128/+0
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-05-21arb_instanced_arrays: move and rename testBrian Paul2-192/+0
Move tests/general/draw-instanced-divisor.c to tests/spec/arb_instanced_arrays/drawarrays.c Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-05-21arb_draw_instanced: move and rename drawarrays testBrian Paul2-184/+0
Move tests/general/draw-instanced.c to tests/spec/arb_draw_instanced/drawarrays.c Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-04-29point-line-no-cull: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29timer_query: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29varray-disabled: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29quad-invariance: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29texunits: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29texgen: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29linestipple use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29framebuffer-srgb: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-29early-z: use default window sizeBrian Paul1-2/+0
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-03primitive-restart-draw-mode: fix failures caused by precision issuesMarek Olšák1-2/+8
Instead of offsetting the vertex position for the second half of the screen, setup both halves as separate viewports. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-02-08line-flat-clip-color: Initialize variable.Vinson Lee1-1/+1
Fixes "Uninitialized scalar variable" defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-02-03line-flat-clip-color: test flat-shaded line clipping colorBrian Paul2-0/+157
This exercises a bug found in Mesa with softpipe, llvmpipe and swrast Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-01-20hiz: Explicitly use sizeof(float) in malloc.Vinson Lee1-1/+1
Silences "Allocation size mismatch" defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-13primitive-restart: Fix GCC warnings.Vinson Lee1-0/+2
This patch fixes these GCC warnings. primitive-restart.c: In function 'read_index_value': primitive-restart.c:253:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ primitive-restart.c: In function 'test_draw_by_index': primitive-restart.c:445:18: warning: 'restart_index' may be used uninitialized in this function [-Wmaybe-uninitialized] enable_restart(restart_index); ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-26clipflat: Fix uninitialized variable warning.Vinson Lee1-0/+1
Fix GCC maybe-uninitialized warning. clipflat.c: In function 'reportFailure.isra.0': clipflat.c:374:10: warning: 'd' may be used uninitialized in this function [-Wmaybe-uninitialized] snprintf(msg1, sizeof(msg1), "clipflat: Failure for %s(%s)," ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-12-12gl30basic: test glClearBuffer(GL_COLOR), use piglit APIMarek Olšák1-30/+54
This adds testing of GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-02Always bind piglit_winsys_fbo instead of 0Marek Olšák2-6/+6
Tested-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-10-08piglit: silence piglit_report_subtest_result() format warningsBrian Paul1-2/+2
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-08-27Use global function piglit_linear_to_srgb() to avoid code duplicationAnuj Phogat1-18/+2
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>