summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* haiku: build fixes around debug definesJerome Duval2017-02-241-2/+2
|
* radv: add sample mask output supportDave Airlie2017-02-243-2/+9
| | | | | | | | | This adds support to write to sample mask from the fragment shader. We can optimise this later like radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: refactor our fmask sample index fixup.Dave Airlie2017-02-241-122/+107
| | | | | | | | This refactors out the sample index fixup between txf and image load. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fetch sample index via fmask for image coord as well.Dave Airlie2017-02-241-54/+126
| | | | | | | | | | | This follows the txf_ms code, I can't figure out why amdgpu-pro doesn't do this in their shaders, they must know someone we don't. This fixes: dEQP-VK.pipeline.multisample_shader_builtin.sample_id.* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add sample mask input supportDave Airlie2017-02-241-1/+6
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: enable location at sample when persample is forced.Dave Airlie2017-02-241-0/+3
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix interpolation at wrong place for offset interpDave Airlie2017-02-242-3/+4
| | | | | | | | | The code was interpolating at the offset from the sample, not the offset from the center. Also fix for persample interpolation modes we should force the pixel center to be at the sample. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* swr: fix index buffers with non-zero indicesGeorge Kyriazis2017-02-235-6/+62
| | | | | | | | | | | | | Fix issue with index buffers that do not contain a 0 index. 0 index can be a non-valid index if the (copied) vertex buffers are a subset of the user's (which happens because we only copy the range between min & max). Core will use an index passed in from the driver to replace invalid indices. Only do this for calls that contain non-zero indices, to minimize performance Reviewed-by: Bruce Cherniak <[email protected]> cost.
* swr: add fetch shader cacheGeorge Kyriazis2017-02-236-15/+50
| | | | | | | | | For now, the cache key is all of FETCH_COMPILE_STATE. Use new/delete for swr_vertex_element_state, since we have to call the constructors/destructors of the struct elements. Reviewed-by: Bruce Cherniak <[email protected]>
* st/mesa: free shader cache buffer on fallbackTimothy Arceri2017-02-241-1/+3
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* st/mesa: fix crash in shader cache cased by race conditionTimothy Arceri2017-02-241-6/+8
| | | | | | | | | | If a thread doesn't load GLSL IR from cache but does load TGSI from cache (that was created by another thread) than it will crash due to expecting gl_program_parameter_list to have been restored from the GLSL IR cache and not be null. Reviewed-by: Edward O'Callaghan <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* anv: Enable MSAA compressionJason Ekstrand2017-02-235-2/+36
| | | | | | | | | | | This just enables basic MSAA compression (no fast clears) for all multisampled surfaces. This improves the framerate of the Sascha "multisampling" demo by 76% on my Sky Lake laptop. Running Talos on medium settings with 8x MSAA, this improves the framerate in the benchmark by 80%. Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* anv/blorp/clear_subpass: Only set surface clear color for fast clearsJason Ekstrand2017-02-231-2/+3
| | | | | | | | | | | | Not all clear colors are valid. In particular, on Broadwell and earlier, only 0/1 colors are allowed in surface state. No CTS tests are affected outright by this because, apparently, the CTS coverage for different clear colors is pretty terrible. However, when multisample compression is enabled, we do hit it with CTS tests and this commit prevents regressions when enabling MCS on Broadwell and earlier. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: "13.0 17.0" <[email protected]>
* intel/isl: Apply render target alignment constraints for MCSPohjolainen, Topi2017-02-231-1/+16
| | | | | | | | v2: Instead of having the same block in isl_gen7,8,9.c add it once into isl.c::isl_choose_image_alignment_el() instead. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* intel/isl: add MCS width constraint 16 samplesLionel Landwerlin2017-02-231-0/+10
| | | | | | | | v3 (Jason Ekstrand): Add a comment explaining why Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel/isl: Return surface creation success from aux helpersJason Ekstrand2017-02-233-41/+40
| | | | | | | | | The isl_surf_init call that each of these helpers make can, in theory, fail. We should propagate that up to the caller rather than just silently ignoring it. Reviewed-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* glsl: Raise a link error for non-SSO ES programs with a TES but no TCS.Kenneth Graunke2017-02-231-0/+10
| | | | | | | | | | | | | | | OpenGL allows the TCS to be missing and supplies an implicit passthrough shader, but OpenGL ES does not (see section 7.3 of the ES 3.2 spec, cited above in the code). One open question is how to handle this for ARB_ES3_2_compatibility. This patch raises the link error for all ES shading language programs, but it might make sense to base it on the API. The approach taken in this patch is more restrictive, but should still allow any valid ES programs to work in GL. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* isl/state: fix assert on raw buffer surface state minimum sizeSamuel Iglesias Gonsálvez2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | From IVB PRM, SURFACE_STATE::Height: "For typed buffer and structured buffer surfaces, the number of entries in the buffer ranges from 1 to 2^27 . For raw buffer surfaces, the number of entries in the buffer is the number of bytes which can range from 1 to 2^30." The minimum value is 1, according to the spec. The spec quote was already added into the code by 028f6d8317f00. Fixes crashing tests under: dEQP-VK.robustness.buffer_access.* Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: enable early_fragment_tests implicitly with post_depth_coverageIago Toral Quiroga2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | From ARB_post_depth_coverage: "This extension allows the fragment shader to control whether values in gl_SampleMaskIn[] reflect the coverage after application of the early depth and stencil tests. This feature can be enabled with the following layout qualifier in the fragment shader: layout(post_depth_coverage) in; Use of this feature implicitly enables early fragment tests." And a bit later it also adds: "early_fragment_tests" requests that fragment tests be performed before fragment shader execution, as described in section 15.2.4 "Early Fragment Tests" of the OpenGL Specification. If neither this nor post_depth_coverage are declared, per-fragment tests will be performed after fragment shader execution." Fixes: GL45-CTS.post_depth_coverage_tests.PostDepthSampleMask Reviewed-by: Marek Olšák <[email protected]>
* glsl: refactor get_variable_being_redeclared() to return always an ↵Samuel Iglesias Gonsálvez2017-02-231-27/+34
| | | | | | | | | | | | | ir_variable pointer It will return the current variable ('var') or the earlier declaration ('earlier') in case of redeclaration of that variable. In order to distinguish between both, 'is_redeclaration' boolean will indicate in which case we are. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: fix heap-use-after-free in ast_declarator_list::hir()Samuel Iglesias Gonsálvez2017-02-231-2/+4
| | | | | | | | | | | | | | | | | | | | | The get_variable_being_redeclared() function can free 'var' because a re-declaration of an unsized array variable can establish the size, so we set the array type to the 'earlier' declaration and free 'var' as it is not needed anymore. However, the same 'var' is referenced later in ast_declarator_list::hir(). This patch fixes it by picking the ir_variable_mode from the proper ir_variable. This error was detected by Address Sanitizer. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Suggested-by: Ian Romanick <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99677 Cc: "17.0" <[email protected]> Cc: "13.0" <[email protected]>
* 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]>