summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-29renderer: fix frag depth writing from textureHEADmasterDave Airlie1-6/+9
We need to ignore the writemask for frag depth writes, this fixes a bunch of depth draw/copy pixels tests.
2016-02-29shader: fixes viewport-no-gs.shader_testMarc-André Lureau1-0/+14
Add fragment gl_ViewportIndex support. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-29shader: fixes piglit layer-gs-no-writeMarc-André Lureau1-1/+14
Fix using undeclared gl_Layer from fragment shader. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-29renderer: remove stencil attachments betterDave Airlie1-3/+13
disconnect using the proper functions, the API in theory works but mesa has bugs so lets avoid it for now. This fixes 1d texture depth tests.
2016-02-29renderer: handle gaps in vertex shader inputsDave Airlie3-2/+9
We are seeing shaders with 0 and 2 inputs, but no 1, so we need to handle gaps properly. This fixes some regressions in drawpixels after some mesa changes on the guest.
2016-02-29shader: improve TXQ translationMarc-André Lureau1-7/+47
TXQ may query levels and size. Fixes all piglit texturesize tests and others. [airlied: use EMIT_BUF_WITH_RET]. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-26Fix alpha-test regressionMarc-André Lureau1-0/+1
Commit 53286c6f5af introduced a regression, there is a missing break in the switch.. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-26add ax_code_coverage.m4 for distros that don't ship it.Dave Airlie1-0/+229
2016-02-26fix pthread_libs additionDave Airlie1-1/+1
2016-02-26configure: check for -lgbmMichal Privoznik2-1/+4
We use the library unconditionally, however not check it in configure phase. Let's produce an error there and not at compilation phase. And while at it, drop -ldl from LDFLAGS too. I suspect it's coming from the same source because in the gbm pkg-config file private libs are to be linked with dl. But not only we are not a gbm private library, we don't use dl*() anywhere. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-02-26add missing ax_pthread for distros that don't have itDave Airlie1-0/+309
2016-02-18bump to 0.4.1 for regression fixDave Airlie1-1/+1
2016-02-18vrend: fix VREND_MAX_CTX checksMarc-André Lureau1-5/+6
Context array is declared as dec_ctx[VREND_MAX_CTX], virgl shouldn't accept id == VREND_MAX_CTX. Found thanks to AddressSanitizer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-18shader: add a few handled texture typeMarc-André Lureau1-0/+7
This is a regression fix from c59eddf16e83. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-18Fix potential leak in fill_interpolants()Marc-André Lureau1-0/+1
Fix found thanks to AddressSanitizer & piglit glsl-1.50/execution/built-in-functions/gs-pow-vec3-vec3.shader_test. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-18Fix i965 crash with bin/gl-3.1-vao-broken-attribMarc-André Lureau1-0/+10
It's unfortunate, but the i965 driver deliberately crash on such simple test case. Fortunately, it seems fairly straightforward to avoid it in virgl. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-17bump library minor to 0.2Dave Airlie1-1/+1
this is to reflect the new APIs added for the sync thread
2016-02-17version: bump to 0.4.0Dave Airlie1-1/+1
Just to package latest stuff in Fedora, all the AFL fixes.
2016-02-17configure.ac: drop XORG macros.Dave Airlie1-3/+0
We can recreate these if we need them.
2016-02-17Fix -Wformat-nonliteral warningsMarc-André Lureau3-48/+60
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-17Fix void* casting warningsMarc-André Lureau3-29/+30
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-17Fix -Wswitch-defaultMarc-André Lureau3-11/+38
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-17util: remove redundant declarationMarc-André Lureau1-3/+0
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-17build-sys: remove unused directoriesMarc-André Lureau1-4/+0
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-15src: Drop useless -I from AM_LDFLAGS in MakefileMichal Privoznik1-1/+1
The -I switch is meant for extending the list of paths searched when looking for a header file. There's no justification in having in linker flags. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-15gallium: Add pthread compiler flagsMichal Privoznik1-0/+4
There are places in the code where we use pthread_* functions, but forgot to add corresponding bits onto the compiler command line. Because of that the build fails: CCLD virgl_test_server ../src/.libs/libvirglrenderer.so: undefined reference to `pthread_sigmask' ../src/.libs/libvirglrenderer.so: undefined reference to `pthread_join' ../src/.libs/libvirglrenderer.so: undefined reference to `pthread_create' ../src/.libs/libvirglrenderer.so: undefined reference to `pthread_mutexattr_init' ../src/.libs/libvirglrenderer.so: undefined reference to `pthread_mutexattr_destroy' collect2: error: ld returned 1 exit status Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-10renderer: remove double declaration of function.Dave Airlie1-1/+1
2016-02-10tests: make some functions static.Dave Airlie4-7/+7
2016-02-10vtest: make some functions static.Dave Airlie1-2/+2
These functions are only used here. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-10vtest: fix shadowed variable usage.Dave Airlie1-2/+2
Call the input a different name. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-10renderer: fix a couple of shadowed variable declarations.Dave Airlie2-5/+5
This fixes a couple of -Wshadow warnings. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-10renderer: make some char * into const char *.Dave Airlie2-7/+7
This fixes a bunch of warnings about losing constness. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-10vtest: fix potential leakMarc-André Lureau1-3/+1
Found that to american fuzzy lop & AddressSanitizer Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10decode: check streamout-targets num_handlesMarc-André Lureau1-0/+3
Prevent out-of-bound array access. Found thanks to AddressSanitizer & american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10decode: check the buffer length before accessMarc-André Lureau1-33/+39
Avoid out of bounds array access. Found thanks to AddressSanitizer & american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10vtest: be reasonable about cmd lengthMarc-André Lureau1-0/+4
Avoid overflow, found thanks to AddressSanitizer & american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: unref index buffer when destroying sub contextMarc-André Lureau1-0/+2
Found thanks to AddressSanitizer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: switch to context 0 before destroy subMarc-André Lureau1-0/+5
If the current context is one of the subcontext to be destroyed, vrend_destroy_sub_context() will fail after the last context is destroyed. Found thanks to amaerican fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: fix leak in hashtable on replaceMarc-André Lureau4-42/+25
Some american fuzzy lop tests managed to replace resources, however the old values got leaked (I am not sure if this should be allowed) In all cases, introduce a destroy callback to the hashtable, used when a value is removed, replaced or the table is cleared. This simplifies a bit resource management and help avoid potential errors by using simply refcounts. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: unref resource when destroying hashtable elementMarc-André Lureau1-1/+3
Resources are reference-counted, if another object holds a reference to a resource, it should not free it. Change the resource hashtable destroy callback to unref. Currently, this doesn't happen, since the resource hashtable is kept until the renderer is reset. However, in the next commit, the destroy callback will be used if a resource is replaced in the hashtable, and we want to keep the original resource. Furthermore, even if replace shouldn't happen, it avoids confusion and future errors if use only reference-counting mechanism. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: fix potential leaks in vrend_create_shaderMarc-André Lureau1-13/+26
Found thanks to llvm scan-build. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: check create_shader() finishedMarc-André Lureau1-0/+5
Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: fix sampler views leaksMarc-André Lureau1-1/+5
Fix found thanks to AddressSanitizer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: fix subcontext surface leaksMarc-André Lureau1-0/+9
Fix leaks found thanks to AddressSanitizer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: tinitial abs_s1 value is never readMarc-André Lureau1-3/+2
Found thanks to llvm scan-build. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10decode: fix set_scissor_state boundsMarc-André Lureau3-5/+5
Do not accept negative values for num & start. Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10decode: check set_uniform_buffer argumentsMarc-André Lureau1-0/+7
Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10decode: check set_sampler_views argsMarc-André Lureau1-0/+8
Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: check box boundsMarc-André Lureau1-1/+2
Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: validate descMarc-André Lureau1-0/+4
Fix found thanks to american fuzzy lop. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>