summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* st/wgl: flush with ST_FLUSH_WAIT before releasing shared contextsCharmaine Lee2017-02-182-2/+15
| | | | | | | | | | | Before releasing a shared context, flush the context with ST_FLUSH_WAIT to make sure all commands are executed. This ensures that rendering to any shared resources is completed before they will be referenced by another context. Fixes an intermittent flickering with Photoshop. (VMware bug# 1779340) Reviewed-by: Brian Paul <[email protected]>
* st: add ST_FLUSH_WAIT to st_context_flush()Charmaine Lee2017-02-182-0/+8
| | | | | | | When st_context_flush() is called with ST_FLUSH_WAIT, the function will return after the fence is completed. Reviewed-by: Brian Paul <[email protected]>
* radv/ac: handle gs->copy shader clip distances.Dave Airlie2017-02-231-13/+68
| | | | | | | | | | | This fixes up the clip distance passing between the geometry shader and the copy shader. It packs the clip and cull distances into one or two consecutive slots, and avoids wasting space and make sure the gs output and copy shader input agree on where things are stored. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: pass clips properly from vertex->geometry shader stages.Dave Airlie2017-02-231-6/+40
| | | | | | | | | | | This works out the geometry shader clip/cull inputs separately to the outputs, and uses that information to read from the ES->GS ring buffer. It stores the clip/cull distances packed into one or two slots. It fixes the es output emission and gs input reading to match. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: rename num clips/cull to output clips/cullsDave Airlie2017-02-231-10/+10
| | | | | | | | | As geom shaders can have different ones on entry and exit. also move to uint8_t as these are never that big. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi: move image count to shared structure.Dave Airlie2017-02-233-26/+24
| | | | | | | | | For prime support I need to access this, so move it in advance. [airlied: fix int->uint32_t] Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon: fix r600 builds when old version of llvm is presentTimothy Arceri2017-02-231-2/+2
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* vulkan: Fix gen_enum_to_str in out of tree buildsDylan Baker2017-02-221-1/+5
| | | | | | | | | In some configurations the util directory is created when building out of tree, but not others. This patch ensures that it's created. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-and-Tested-by: Mike Lothian <[email protected]>
* anv/Makefile: Gather all the genX files into one placeJason Ekstrand2017-02-221-22/+9
| | | | | | | While we're here, we also fix the alphabetization of the list of genx_* files. Reviewed-by: Emil Velikov <[email protected]>
* r600/radeonsi: enable glsl/tgsi on-disk cacheTimothy Arceri2017-02-232-0/+46
| | | | | | | | | | For gpu generations that use LLVM we create a timestamp string containing both the LLVM and Mesa build times, otherwise we just use the Mesa build time. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: get on-disk shader cacheTimothy Arceri2017-02-231-0/+3
| | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug/rbug/trace: add get_disk_shader_cache() to pass-throughsTimothy Arceri2017-02-233-0/+39
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add get_disk_shader_cache() callbackTimothy Arceri2017-02-232-0/+19
| | | | | | | V2: Provide more detail in callback description and add description to screen.rst Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: implement a tgsi on-disk shader cacheTimothy Arceri2017-02-235-6/+481
| | | | | | | | Implements a tgsi cache for the OpenGL state tracker. V2: add support for compute shaders Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: add sha1 field to st program structsTimothy Arceri2017-02-231-0/+18
| | | | | | | This will be used to share the sha1 computed by the tgsi load function with the tgsi write function. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: move set_prog_affected_state_flags() to st_program.cTimothy Arceri2017-02-233-141/+144
| | | | | | | We want to use this in the new tgsi shader cache so we move it here and make it available externally. Reviewed-by: Nicolai Hähnle <[email protected]>
* util/disk_cache: fix bug with deleting old cache dirsTimothy Arceri2017-02-231-4/+6
| | | | | | | | | | If there was more than a single directory in the .cache/mesa dir then it would only remove one (or none) of the directories. Apparently Valgrind was also reporting: Conditional jump or move depends on uninitialised value Reviewed-by: Edward O'Callaghan <[email protected]>
* vulkan: Combine wsi and util makefilesDylan Baker2017-02-228-42/+36
| | | | Reviewed-by: Matt Turner <[email protected]>
* vulkan/util: Add generator for enum_to_str functionsDylan Baker2017-02-226-35/+200
| | | | | | | | | | | This adds a python generator to produce enum_to_str functions for Vulkan from the vk.xml API description. It supports extensions as well as core API features, and the generator works with both python2 and python3. Signed-off-by: Dylan Baker <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* Revert "st/vdpau: Fix multithreading"Thomas Hellstrom2017-02-221-21/+1
| | | | | | | | | | This reverts commit f1e5dfbe3c8951a6c8acf41bf5e6c2d090098b2c. For a detailed discussion see https://lists.freedesktop.org/archives/mesa-dev/2017-February/145283.html Acked-by: Christian König <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]>
* vl: u_upload_alloc might fail to allocate buffer in bicubic filterNayan Deshmukh2017-02-221-3/+5
| | | | | Signed-off-by: Nayan Deshmukh <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: reorder fields in pipe_draw_infoMarek Olšák2017-02-221-23/+26
| | | | | | | | | sizeof(struct pipe_draw_info) = 104 -> 88 Also, vertices_per_patch is switched to ubyte, because it can't be more than 32. Seemed-reasonable-to: Roland Scheidegger
* gallium/hud: handle a thread switch for API-thread-busy monitoringMarek Olšák2017-02-221-4/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: prevent an infinite loopMarek Olšák2017-02-221-2/+3
| | | | | | v2: use UINT64_MAX / 11 Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_queue: isolate util_queue_fence implementationMarek Olšák2017-02-226-26/+30
| | | | | | it's cleaner this way. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_queue: fix random crashes when the app calls exit()Marek Olšák2017-02-222-2/+78
| | | | | | | | | | | | This fixes: vdpauinfo: ../lib/CodeGen/TargetPassConfig.cpp:579: virtual void llvm::TargetPassConfig::addMachinePasses(): Assertion `TPI && IPI && "Pass ID not registered!"' failed. v2: use list_head, switch the call order in destroy Cc: 13.0 17.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* i965: Implement INTEL_performance_query backendRobert Bragg2017-02-226-0/+729
| | | | | | | | | | | | | | | | | | | This adds a bare-bones backend for the INTEL_performance_query extension that exposes pipeline statistics. Although this could be considered redundant given that the same statistics are already available via query objects, they are a simple starting point for this extension and it's expected to be convenient for tools wanting to have a single go to api to introspect what performance counters are available, along with names, descriptions and semantic/data types. This code is derived from Kenneth Graunke's work, temporarily removed while the frontend and backend interface were reworked. Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Model INTEL perf query backend after query obj BERobert Bragg2017-02-224-402/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the same backend interface as AMD_performance_monitor this defines a dedicated INTEL_performance_query interface that is modelled more on the ARB_query_buffer_object interface (considering the similarity of the extensions) with the addition of vfuncs for initializing and enumerating query and counter info. Compared to the previous backend, some notable differences are: - The backend is free to represent counters using whatever data structures are optimal/convenient since queries and counters are enumerated via an iterator api instead of declaring them using structures directly shared with the frontend. This is also done to help us support the full range of data and semantic types available with INTEL_performance_query which is awkward while using a structure shared with the AMD_performance_monitor backend since neither extension's types are a subset of the other. - The backend must support waiting for a query instead of the frontend simply using glFinish(). - Objects go through 'Active' and 'Ready' states consistent with the query object backend (hopefully making them more familiar). There is no 'Ended' state (which used to show that a query has ended at least once for a given object). There is a new 'Used' state, set when a query is first begun which implies that we are expecting to get results back for the object at some point. There's no equivalent to the 'EverBound' state since the spec doesn't require there to be a limbo state between generating IDs and associating them with an object on query Begin. The INTEL_performance_query and AMD_performance_monitor extensions are now completely orthogonal within Mesa main (though a driver could optionally choose to implement both extensions within a unified backend if that were convenient for the sake of sharing state/code). v2: (Samuel Pitoiset) - init PerfQuery.NumQueries in frontend - s/return_string/output_clipped_string/ - s/backed/backend/ typo - remove redundant *bytesWritten = 0 v3: - Add InitPerfQueryInfo for lazy probing of available queries v4: - Clean up some internal usage of GL typedefs (Ken) Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Separate INTEL_performance_query frontendRobert Bragg2017-02-228-629/+889
| | | | | | | | | | | | | | | | | To allow the backend interfaces for AMD_performance_monitor and INTEL_performance_query to evolve independently based on the more specific requirements of each extension this starts by separating the frontends of these extensions. Even though there wasn't much tying these frontends together, this separation intentionally copies what few helpers/utilities that were shared between the two extensions, avoiding any re-factoring specific to INTEL_performance_query so that the evolution will be easier to follow later. Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/vl: Simplify the matrix filter fragment shaderThomas Hellstrom2017-02-221-40/+16
| | | | | | | | | It looks like it was partly copied from the median filter fragment shader and unnecessesarily saved a lot of temporary values. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Christian König <[email protected]>
* st/vdpau: Fix multithreadingThomas Hellstrom2017-02-221-1/+21
| | | | | | | | | | | | The vdpau state tracker allows multiple threads access to the same gallium context simultaneously. We can fix this either by locking the same mutex each time the context is used or by using a different gallium context for each mutex domain. Here we do the latter, although I'm not sure that's really the best option. Signed-off-by: Thomas Hellstrom <[email protected]> Acked-by: Sinclair Yeh <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/vl: Parameter substitution in the csc matrix computationThomas Hellstrom2017-02-221-12/+17
| | | | | | | | Makes the code significantly more readable. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/vl: Simplify usage of full range matricesThomas Hellstrom2017-02-221-38/+17
| | | | | | | | | | | | | | | | | | | When looking at the full range matrices, it becomes obvious that the difference between the standard matrices and the full range matrices is that the full range matrices are multiplied by 1.164. Together with offsetting the y value with -16/255, this will scale and offset RGB with the desired quantities. However, the standard SMPTE 240M matrix seems to differ a bit since the U and V coefficients are only multiplied with 1.138 to get the full range matrix. This would actually alter the color somewhat so I figure that's an error. The full range matrix is consistent with Nvidia's VDPAU implementation. We can also incorporate the ybias in the brightness simplifying the calculation somewhat. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/vl Fix brightness matrix descriptionThomas Hellstrom2017-02-221-4/+4
| | | | | | | | | The brightness matrix doesn't actually match the procamp matrix and what's calculated in vl_csc_get_matrix. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/vl: Don't map vertex buffers on creationThomas Hellstrom2017-02-221-1/+0
| | | | | | | | | It will cause multiple simultaneous maps of the same vertex buffer and flushed-while-mapped warnings. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/vl: Add sampler views to video filter fragment shadersThomas Hellstrom2017-02-223-0/+15
| | | | | | | | Needed for at least the svga driver. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/vl: declare sampler views in compositor shadersThomas Hellstrom2017-02-221-5/+32
| | | | | | | | The svga driver relies on the existence of these sampler views. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Christian König <[email protected]>
* util: fix MSVC build issue in disk_cache.hBrian Paul2017-02-211-10/+16
| | | | | | | | Windows doesn't have dlfcn.h. Protect the code in question with #if ENABLE_SHADER_CACHE test. And fix indentation. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* radv: fix typo in the subpass barrier patch.Dave Airlie2017-02-221-1/+1
| | | | | | Fixes: dbb0eaccc radv: handle subpass cache flushes Signed-off-by: Dave Airlie <[email protected]>
* i965/gen6+: Enable arb_transform_feedback_overflow_query.Rafael Antognolli2017-02-211-0/+1
| | | | | | | | | | | | This extension adds new query types which can be used to detect overflow of transform feedback buffers. The new query types are also accepted by conditional rendering commands. v3: - s/gen7+/gen6+/ in the relnotes (Jordan Justen) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add support for xfb overflow query on conditional render.Rafael Antognolli2017-02-211-14/+53
| | | | | | | | | | | | | | | | | | | Enable the use of a transform feedback overflow query with glBeginConditionalRender. The render commands will only execute if the query is true (i.e. if there was an overflow). Use ARB_conditional_render_inverted to change this behavior. v4: - reuse MI_MATH calcs from hsw_queryob (Kenneth) - fallback to software conditional rendering when MI_MATH is not available (Kenneth) v5: - check query->Target (Kenneth) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add support for xfb overflow on query buffer objects.Rafael Antognolli2017-02-212-0/+115
| | | | | | | | | | | | | | | Enable getting the results of a transform feedback overflow query with a buffer object. v4: - hsw_overflow_result_to_gpr0 a public function, so it can be used by conditional render. (Kenneth) - fix typo grp0/gpr0 (Kenneth) - rename load_gen_written_data_to_regs to load_overflow_data_to_cs_gprs (Kenneth) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: add plumbing for ARB_transform_feedback_overflow_query.Rafael Antognolli2017-02-212-0/+75
| | | | | | | | | | | | | When querying for transform feedback overflow on one or all of the streams, store information about number of generated and written primitives. Then check whether generated == written. v2: - use only SO_PRIM_STORAGE_NEEDED, do not fallback to CL_INVOCATION_COUNT. (Kenneth) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Track transform feedback overflow query objects.Rafael Antognolli2017-02-213-1/+30
| | | | | | | Also update checks on conditional rendering. Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add types for ARB_transform_feedback_oveflow_query.Rafael Antognolli2017-02-212-0/+6
| | | | | | | | | | Add some basic types and storage for the queries of this extension. v2: - update date of extension (Kenneth) Signed-off-by: Rafael Antognolli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/docs: use imgmath instead of pngmathEric Engestrom2017-02-221-1/+1
| | | | | | | | WARNING: sphinx.ext.pngmath has been deprecated. Please use sphinx.ext.imgmath instead. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/docs: fix section title formattingEric Engestrom2017-02-221-2/+2
| | | | | | | src/gallium/docs/source/tgsi.rst:3488: WARNING: Title underline too short. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/docs: add missing newlinesEric Engestrom2017-02-221-0/+33
| | | | | | | | Without these, mathjax considers these as the continuation of the previous line. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/docs: add missing math formattingEric Engestrom2017-02-221-0/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/docs: fix sublist formattingEric Engestrom2017-02-221-0/+2
| | | | | | | | | src/gallium/docs/source/context.rst:95: ERROR: Unexpected indentation. Sub lists need to be surrounded by a blank line. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>