summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-10shader: fix potential leakMarc-André Lureau1-4/+6
Found thanks to llvm scan-build. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10vtest: fix vtestname leakMarc-André Lureau1-2/+8
Fix leaks found thanks to AddressSanitizer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10tests: use checked fixtureMarc-André Lureau2-2/+2
The checked fixture run in the child test process. Fix leaks found thanks to AddressSanitizer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10Fix os-time.h removalMarc-André Lureau1-1/+1
Commit 5058068 actually removed os/os_misc.h from libgallium_la_SOURCES Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: fix eventfd checkMarc-André Lureau1-1/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-02-10renderer: destroy cond/mutexMarc-André Lureau1-0/+5
For completeness (there is no dynamic allocation on Linux). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2016-01-29decode: prevent handle 0 object creationMarc-André Lureau1-0/+2
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-01-29vrend: fix potential crash with resource 0 creationMarc-André Lureau1-0/+4
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-01-29vrend: do not accept to insert resource 0Marc-André Lureau1-1/+6
These leads to later crashes Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-01-29vrend: remove unused argumentMarc-André Lureau3-3/+3
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-01-29egl: check eglExportDMABUFImageMESA return valueMarc-André Lureau1-0/+2
Found thanks to llvm scan-build. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-01-29vrend: check eventfd value before closeMarc-André Lureau1-2/+4
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-01-21vtest: fail on renderer init failure.Dave Airlie1-3/+7
This stops us crashing later due to failing to init. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21vtest: use VIRGL_RENDERER_THREAD_SYNCMarc-André Lureau1-1/+3
Built-in EGL supports threaded contexts, so enable sync thread. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21vtest: only create fence before it's neededMarc-André Lureau1-6/+1
Just as bad as waiting only for the last fence, after all. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21vtest: use a poll fd if possibleMarc-André Lureau5-28/+92
For the same glmark2 "build" test, perf reports about half instructions. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21renderer: use a thread to block for fences.Marc-André Lureau5-20/+267
Instead of polling the fences regularly, have a thread that blocks for a single fence using a separate shared context, then uses eventfd to wake up the main thread when something happens. Inside the guest, glmark2 typicially runs twice as fast with the thread sync. Although in general, the performances seems to be about +30%. The benefits is mostly for CPU-bounds tasks (when main the thread hits 100%) A naive perf stat of the vtest renderer with glmark2 "build" test with a fixed number of frames (500) results in the following stats data: (do not value timing related informations, since the renderer is ran and stopped manually) without thread: 3032.282265 task-clock (msec) # 0.420 CPUs utilized 4,277 context-switches # 0.001 M/sec 102 cpu-migrations # 0.034 K/sec 9,020 page-faults # 0.003 M/sec 7,884,098,254 cycles # 2.600 GHz 4,440,126,451 stalled-cycles-frontend # 56.32% frontend cycles idle <not supported> stalled-cycles-backend 11,024,091,578 instructions # 1.40 insns per cycle # 0.40 stalled # cycles per insn 1,091,831,588 branches # 360.069 M/sec 5,426,846 branch-misses # 0.50% of all branches with thread: 3403.592921 task-clock (msec) # 0.452 CPUs utilized 7,145 context-switches # 0.002 M/sec 410 cpu-migrations # 0.120 K/sec 6,191 page-faults # 0.002 M/sec 7,475,038,064 cycles # 2.196 GHz 4,487,043,071 stalled-cycles-frontend # 60.03% frontend cycles idle <not supported> stalled-cycles-backend 9,925,205,494 instructions # 1.33 insns per cycle # 0.45 stalled # cycles per insn 834,375,503 branches # 245.146 M/sec 4,919,995 branch-misses # 0.59% of all branches Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21gallium: import some bits of c11/c99 threads from mesa.Dave Airlie6-0/+1283
These are needed to make the gallium thread abstraction work. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21renderer: move ctx forcing into fence checking.Dave Airlie2-1/+1
This is a precursor for some later changes Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21build-sys: use the appropriate autoconf macros for cflagsMarc-André Lureau2-7/+7
Don't bust CFLAGS passed on make command line please. [airlied: wrap config.h include] Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21gallium: Remove os_timeMarc-André Lureau4-197/+0
we aren't using this currently bring it back later if required. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21gallium: Remove os_processDave Airlie4-134/+0
We aren't using this currently, bring it back if we need it later. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-21shader: don't use a single temps arrayDave Airlie1-13/+53
Create a bunch of temp arrays based on the input TGSI ranges. Otherwise the temps code triggers a lack of some passes in the mesa GLSL compiler. A large shader from shadertoy triggered 1m30s compile in mesa due to the large temp array. Reported-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-01-17renderer: return an int in vrend_renderer_initMarc-André Lureau3-4/+5
This is an internal API.
2015-12-22tgsi: update tgsi info files.Dave Airlie1-5/+81
These were missed in previous tgsi update
2015-12-22tests: reset last fence before using itMarc-André Lureau3-0/+9
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-12-22build-sys: misc cleanupsMarc-André Lureau2-6/+2
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-12-22renderer: don't free tmp_buf if shader create fails.Dave Airlie1-3/+6
Noticed by Marc-Andre.
2015-12-22add GL3.txt style list of featuresDave Airlie1-0/+121
This list is just a first pass guess, it probably isn't entirely accurate yet.
2015-12-22gallium/tgsi: update with some newer gallium piecesDave Airlie13-105/+418
This updates the tgsi code from mesa, it introduces changes necessary to deal with tessellation and doubles. It also drops an unused saturate feature, which we didn't use anyways.
2015-12-04renderer: fix alpha swizzle detectionDave Airlie1-4/+13
We need to check if any swizzles point to alpha and fix them up, not just the alpha one. This fixes misrendering in gnome-shell.
2015-12-03renderer: patch blending up before draws.Dave Airlie1-80/+73
We might need to patch blending state up for xrgb destinations, and for for a8/a16 destinations we need to patch colormask and blendcolor.
2015-12-03renderer: handle rendering to A8 surfaces.Dave Airlie4-21/+84
I'm not sure this is 100% complete, piglit fbo-alpha now passes. This was a guess as to why gnome-shell was broken, but I don't think it was the correct one.
2015-12-02renderer: fix GLSL1.30 shader translationDave Airlie1-1/+1
If we were running on a GLSL 1.30 backend, shader translation was broken.
2015-12-02renderer: handle pixel pack buffer pre texture buffer objectsDave Airlie1-10/+16
Testing on a GL3.0 profile showed this as broken with glamor.
2015-12-02tests: fix typo,Dave Airlie1-2/+2
I forgot to git add.
2015-12-02renderer: fix potential leakMarc-André Lureau1-0/+1
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-12-01tests: fix fourcc check (on intel at least)Marc-André Lureau1-1/+3
- virgl maps VIRGL_FORMAT_B8G8R8X8_UNORM to GL_RGBA8 - _mesa_choose_tex_format() maps GL_RGBA8 to MESA_FORMAT_R8G8B8A8_UNORM or MESA_FORMAT_A8B8G8R8_UNORM or MESA_FORMAT_B8G8R8A8_UNORM. - it ends up in (gl_texture_image *)img->TexFormat - then in intel (_DRIImage *) image->format. - on create image, image->dri_format = driGLFormatToImageFormat() (to ex: MESA_FORMAT_R8G8B8A8_UNORM -> __DRI_IMAGE_FORMAT_ABGR8888) - on query, intel_lookup_fourcc() -> __DRI_IMAGE_FOURCC_ABGR8888 == GBM_FORMAT_ABGR8888. For some reason, driGLFormatToImageFormat() doesn't map MESA_FORMAT_A8B8G8R8_UNORM, so I only check the two possible values I could find. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-11-03renderer: emit clip distances before emitting positionDave Airlie1-5/+5
This fixes piglit fixed-clip-enables test.
2015-10-23renderer: bump to 0.3.0Dave Airlie1-1/+1
2015-10-23renderer: fix regression in shader bindingDave Airlie7-14/+56
made a mistake in the shader binding code, not good, time for brown paper bag.
2015-10-23virglrenderer: bump to version 0.2.0Dave Airlie1-1/+1
2015-10-23virglrenderer: fix make distcheckDave Airlie2-1/+6
2015-10-23virgl: virgl_egl.h is an internal header.Dave Airlie1-2/+3
No need to install this for anyone else
2015-10-23virgl: drop helper module.Dave Airlie3-138/+1
This was originally to be used by qemu, but we didn't need it in the end.
2015-10-23renderer: CLEANUP - remove TABsDave Airlie9-208/+208
I didn't do a good enough job last time at purging these.
2015-10-23virgl/shaders: handle large shaders.Dave Airlie7-220/+1740
the protocol failed to handle larger shaders, this allow the renderer to reassemble large shaders and recombined the chunks before passing them to the GLSL translation. This also enhances the renderer protocol to allow for some more info in the shader object, and removes the separate vs/gs/fs variants in favour of a type field in the shader.
2015-10-23tests: align more encoder with mesaDave Airlie1-22/+8
This aligns the encoder files more with mesa, removes the attach stuff which mesa dropped.
2015-10-23tests: align viewports/scissor encoding with mesa.Dave Airlie3-22/+28
This just realigns some of the encoder code with mesa.
2015-10-23virgl: add query index to top 16-bits of query type.Dave Airlie4-7/+16
This is an ABI valid change, we won't get passed indices unless we advertise later GLSL versions.