aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* iris: Add iris_resolve_conditional_render().Rafael Antognolli2019-03-202-0/+25
| | | | | | | | | | | | | | This function can be used to stall on the CPU and resolve the predicate for the conditional render. It will convert ice->state.predicate from IRIS_PREDICATE_STATE_USE_BIT to either IRIS_PREDICATE_STATE_RENDER or IRIS_PREDICATE_STATE_DONT_RENDER, depending on the result of the query. v2: - return void (Ken) - update the stored condition (Ken) - simplify the code leading to resolve the predicate (Ken) Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Implement fast clear color.Rafael Antognolli2019-03-202-24/+157
| | | | | | | | | | | | If all the restrictions are satisfied, do a fast clear instead of regular clear. v2: - add perf_debug() when we can't fast clear (Ken) - improve comment: s/miptree/resource/ (Ken) - use swizzle_color_value from blorp (Ken) Reviewed-by: Kenneth Graunke <[email protected]>
* intel/blorp: Make swizzle_color_value public.Rafael Antognolli2019-03-202-1/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel/isl: Add isl_format_has_color_component() function.Rafael Antognolli2019-03-202-0/+25
| | | | | | v2: Get luminance bits from luminance component (Ken). Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Bring back check for srgb and fast clear color.Rafael Antognolli2019-03-201-3/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Add function to update clear color in surface state.Rafael Antognolli2019-03-201-2/+30
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Add helper to convert fast clear color.Rafael Antognolli2019-03-201-0/+82
| | | | | | | It needs to be converted to a value that can be used by ISL (and our hardware SURFACE_STATE structure). Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Fast clear depth buffers.Rafael Antognolli2019-03-201-3/+116
| | | | | | | | | | Check and do a fast clear instead of a regular clear on depth buffers. v3: - remove swith with some cases that we shouldn't wory about (Ken) - more parens into the has_hiz check (Ken) Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Use the clear depth when emitting 3DSTATE_CLEAR_PARAMS.Rafael Antognolli2019-03-202-1/+26
| | | | | | | | | | | Take the clear depth into account when IRIS_DIRTY_DEPTH_BUFFER is marked as dirty. Also update the blorp surface clear color. v2: Use a single if (zres && zres->aux.bo) (Ken). Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Allocate buffer space for the fast clear color.Rafael Antognolli2019-03-202-8/+100
| | | | | | | | | | | | Also store clear color in the iris_resource. Always allocate clear color state buffer. v2: - Make clear_color_offset be 64 bits (Ken). - Simplify the logic to decide when to memset the aux buffer (Ken). Reviewed-by: Kenneth Graunke <[email protected]>
* radv: Implement VK_EXT_pipeline_creation_feedback.Bas Nieuwenhuizen2019-03-205-9/+107
| | | | | | | | | Does what it says on the tin. The per stage time is only an approximation due to linking and the Vega merged stages. Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: use new LLVM 8 intrinsics in ac_build_buffer_store_dword()Samuel Pitoiset2019-03-201-40/+26
| | | | | | | New buffer intrinsics have a separate soffset parameter. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: use new LLVM 8 intrinsic when storing 16-bit valuesSamuel Pitoiset2019-03-203-21/+33
| | | | | | | vindex is always 0. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add ac_build_{struct,raw}_tbuffer_store() helpersSamuel Pitoiset2019-03-202-0/+156
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: use new LLVM 8 intrinsics in ac_build_buffer_load()Samuel Pitoiset2019-03-201-0/+8
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: use ac_build_buffer_store_dword() for SSBO store operationsSamuel Pitoiset2019-03-201-14/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: use ac_build_buffer_load() for SSBO load operationsSamuel Pitoiset2019-03-201-29/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: use new LLVM 8 intrinsics for SSBO atomic operationsSamuel Pitoiset2019-03-201-24/+42
| | | | | | | Use the raw version (ie. IDXEN=0) because vindex is unused. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: remove one useless check in visit_store_ssbo()Samuel Pitoiset2019-03-201-6/+3
| | | | | | | Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add ac_build_buffer_store_format() helperSamuel Pitoiset2019-03-203-21/+119
| | | | | | | Similar to ac_build_buffer_load_format(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: set attrib flags for SSBO and image store operationsSamuel Pitoiset2019-03-201-3/+6
| | | | | | | For consistency regarding other store operations. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: make use of ac_get_store_intr_attribs() where possibleSamuel Pitoiset2019-03-201-6/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* bin/install_megadrivers.py: Correctly handle DESTDIR=''Dylan Baker2019-03-201-1/+1
| | | | | | | | | | | | | | Currently if destdir is set to '' then the resulting libdir will have it's first character replaced by / instead of / being prepended to the string. This was the result of ensuring that that DESTDIR wouldn't be ignored if libdir was absolute, since the only cases that meson allows the libdir to be absolute is if the prefix is /, this won't be a problem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110211 Fixes: ae3f45c11e3f934939b90445471da8f18b057bc5 ("bin/install_megadrivers: fix DESTDIR and -D*-path") Reviewed-by: Eric Engestrom <[email protected]>
* nir: deref only for OpTypePointerJuan A. Suarez Romero2019-03-201-8/+14
| | | | | | | | | | | | | | Fixes dEQP-VK.binding_model.buffer_device_address.* and dEQP-VK.ssbo.phys.layout* Vulkan CTS tests. v2: set val->type->stride in the section below (Jason) v3: restore val->type->type to original place (Jason) Fixes: d0ba326f238 ("nir/spirv: support physical pointers") CC: Karol Herbst <[email protected]> CC: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* softpipe: fix texture view crashesDave Airlie2019-03-211-5/+6
| | | | | | | | | | | | | | | I noticed we crashed piglit arb_texture_view-rendering-formats when run on softpipe. This fixes the clear tiles to use the surface format not the underlying storage format. This fixes a bunch of srgb piglits as well. Fixes: 396ac41fc28 (softpipe: add integer support) Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nvc0: Skip new update barrier bitsKenneth Graunke2019-03-201-0/+3
| | | | | | | | | | | I added new barrier bits in 220c1dce1e3194ea867e6d948fc7ff5b9ef2d3a7 and made most drivers skip them. I thought nvc0 was already skipping those but missed the else case here, which does something. So make it explicitly skip like I did everywhere else. Thanks to Ilia for catching this. Fixes: 220c1dce1e3 gallium: Add PIPE_BARRIER_UPDATE_BUFFER and UPDATE_TEXTURE bits.
* anv: implement VK_EXT_pipeline_creation_feedbackLionel Landwerlin2019-03-204-6/+94
| | | | | | | | | | | | | | | | | | An extension reporting cache hit in the user supplied pipeline cache as well as timing information for creating the pipelines & stages. v2: Don't consider no cache for cache hits (Jason) Rework duration accumulation (Jason) v3: Fold feedback creation writing into pipeline compile functions (Jason/Lionel) v4: Get cache hit information from anv_device_search_for_kernel() (Jason) Only set cache hit from the whole pipeline if all stages also have that bit (Lionel) v5: Always user_cache_hit in anv_device_search_for_kernel() (Jason) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* freedreno/ir3/a6xx: fix ssbo comp_swapRob Clark2019-03-201-1/+1
| | | | | | | One line left out of the conversion to ir3 ssbo intrinsics on a6xx. Fixes: 2e4525883f0 ir3/compiler: Enable lower_io_offsets pass and handle new SSBO intrinsics Signed-off-by: Rob Clark <[email protected]>
* nir: Constant values are per-column not per-componentJason Ekstrand2019-03-201-1/+2
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Karol Herbst <[email protected]>
* anv: Bump maxComputeWorkgroupInvocationsJason Ekstrand2019-03-201-1/+1
| | | | | | | | We initially set this lower because we didn't have SIMD32 support yet but we've supported SIMD32 for quite some time now. We should bump it up to the real limit. Reviewed-by: Lionel Landwerlin <[email protected]>
* radv: fix binding transform feedback buffersSamuel Pitoiset2019-03-201-1/+1
| | | | | | | | | | | | The mask should be accumulated if two calls are used for binding two buffers at different indexes. Otherwise, the driver only accounts for the last one. Noticed while glancing at this code. Cc: 18.3 19.0 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: use llvm.amdgcn.fract intrinsic for nir_op_ffractSamuel Pitoiset2019-03-201-5/+4
| | | | | | | | | | | | | | | | | | | | | | Noticed with a Doom shader. 29077 shaders in 15096 tests Totals: SGPRS: 1282125 -> 1282133 (0.00 %) VGPRS: 908716 -> 908616 (-0.01 %) Spilled SGPRs: 24811 -> 24779 (-0.13 %) Code Size: 49048176 -> 48936488 (-0.23 %) bytes Max Waves: 244232 -> 244226 (-0.00 %) Totals from affected shaders: SGPRS: 229584 -> 229592 (0.00 %) VGPRS: 163268 -> 163168 (-0.06 %) Spilled SGPRs: 8682 -> 8650 (-0.37 %) Code Size: 12819572 -> 12707884 (-0.87 %) bytes Max Waves: 24398 -> 24392 (-0.02 %) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium: Add PIPE_BARRIER_UPDATE_BUFFER and UPDATE_TEXTURE bits.Kenneth Graunke2019-03-198-16/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The glMemoryBarrier() function makes shader memory stores ordered with respect to things specified by the given bits. Until now, st/mesa has ignored GL_TEXTURE_UPDATE_BARRIER_BIT and GL_BUFFER_UPDATE_BARRIER_BIT, saying that drivers should implicitly perform the needed flushing. This seems like a pretty big assumption to make. Instead, this commit opts to translate them to new PIPE_BARRIER bits, and adjusts existing drivers to continue ignoring them (preserving the current behavior). The i965 driver performs actions on these memory barriers. Shader memory stores go through a "data cache" which is separate from the render cache and other read caches (like the texture cache). All memory barriers need to flush the data cache (to ensure shader memory stores are visible), and possibly invalidate read caches (to ensure stale data is no longer visible). The driver implicitly flushes for most caches, but not for data cache, since ARB_shader_image_load_store introduced MemoryBarrier() precisely to order these explicitly. I would like to follow i965's approach in iris, flushing the data cache on any MemoryBarrier() call, so I need st/mesa to actually call the pipe->memory_barrier() callback. Fixes KHR-GL45.shader_image_load_store.advanced-sync-textureUpdate and Piglit's spec/arb_shader_image_load_store/host-mem-barrier on the iris driver. Roland said this looks reasonable to him. Reviewed-by: Eric Anholt <[email protected]>
* iris: mark switch case fallthroughTapani Pälli2019-03-201-3/+3
| | | | | | | | CID: 1444103 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: initialize num_cbufsTapani Pälli2019-03-201-1/+1
| | | | | | | | | | Currently initialized only if 'ish' is non-NULL. CID: 1444106 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* panfrost: Properly align strideDaniel Stone2019-03-207-25/+20
| | | | | | | | | | | | | | Handle buffers whose width is not aligned to 16px by padding the stride and storing it accordingly. This does not reject imports for images whose stride is not sufficiently aligned. v2: make sure bo->stride is set on imported buffers, and add missing variable definition. (Tomeu) Tested-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* anv/icl: Add WA_2204188704 to disable pixel shader panic dispatchAnuj Phogat2019-03-192-0/+17
| | | | | | Signed-off-by: Anuj Phogat <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i965/icl: Add WA_2204188704 to disable pixel shader panic dispatchAnuj Phogat2019-03-192-0/+10
| | | | | | Signed-off-by: Anuj Phogat <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* gitlab-ci: drop most autotools buildsEric Engestrom2019-03-192-164/+456
| | | | | | | | | | With autotools this close to being not supported anymore, let's not waste half of the CI cycles on it. The default build will catch most issues, and the rest can be tested by the old Travis. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* v3d: Expose the dma-buf modifiers query.Eric Anholt2019-03-191-0/+29
| | | | | | | | | | This allows DRI3 to pick between UIF and raster according to whether we're pageflipping or not and whether the pageflipping display can do UIF, avoiding copies for the windowed/composited case that previously was forced to linear. Improves windowed glmark2 -b build:use-vbo=false performance by 30.7783% +/- 13.1719% (n=3)
* v3d: Allow the UIF modifier with renderonly.Eric Anholt2019-03-191-38/+52
| | | | | | | We ask the other side to make a buffer with the right number of pages, and then just store the UIF in it. This avoids an extra silent copy of the buffer from linear to UIF if it gets used for texturing (X11 copy-based swapbuffers, GL compositors).
* v3d: Always lay out shared tiled buffers with UIF_TOP set.Eric Anholt2019-03-191-4/+6
| | | | | The samplers are already ready for this, we just needed to make sure that layout chose UIF for level 0.
* Revert "glsl: relax input->output validation for SSO programs"Andres Gomez2019-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1aa5738e666a9534c7e5b46f077327e6d647c64f. This patch incorrectly asumed that for SSOs no inner interface matching check was needed. From the ARB_separate_shader_objects spec v.25: " With separable program objects, interfaces between shader stages may involve the outputs from one program object and the inputs from a second program object. For such interfaces, it is not possible to detect mismatches at link time, because the programs are linked separately. When each such program is linked, all inputs or outputs interfacing with another program stage are treated as active. The linker will generate an executable that assumes the presence of a compatible program on the other side of the interface. If a mismatch between programs occurs, no GL error will be generated, but some or all of the inputs on the interface will be undefined." This completes the fix from commit: 3be05dd2679 ("glsl/linker: don't fail non static used inputs without matching outputs") Fixes: 1aa5738e666 ("glsl: relax input->output validation for SSO programs") Cc: Tapani Pälli <[email protected]> Cc: Timothy Arceri <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Samuel Iglesias Gonsálvez <[email protected]> Cc: Ian Romanick <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/linker: simplify xfb_offset vs xfb_stride overflow checkAndres Gomez2019-03-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation uses a complicated calculation which relies in an implicit conversion to check the integral part of 2 division results. However, the calculation actually checks that the xfb_offset is smaller or a multiplier of the xfb_stride. For example, while this is expected to fail, it actually succeeds: " ... layout(xfb_buffer = 2, xfb_stride = 12) out block3 { layout(xfb_offset = 0) vec3 c; layout(xfb_offset = 12) vec3 d; // ERROR, requires stride of 24 }; ... " Fixes: 2fab85aaea5 ("glsl: add xfb_stride link time validation") Cc: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/linker: don't fail non static used inputs without matching outputsAndres Gomez2019-03-191-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is no Static Use of an input variable, the linker shouldn't fail whenever there is no defined matching output variable in the previous stage. From page 47 (page 51 of the PDF) of the GLSL 4.60 v.5 spec: " Only the input variables that are statically read need to be written by the previous stage; it is allowed to have superfluous declarations of input variables." Now, we complete this exception whenever the input variable has an explicit location. Previously, 18004c338f6 ("glsl: fail when a shader's input var has not an equivalent out var in previous") took care of the cases in which the input variable didn't have an explicit location. v2: do the location based interface matching check regardless on whether it is a separable program or not (Ilia). Fixes: 1aa5738e666 ("glsl: relax input->output validation for SSO programs") Cc: Timothy Arceri <[email protected]> Cc: Iago Toral Quiroga <[email protected]> Cc: Samuel Iglesias Gonsálvez <[email protected]> Cc: Tapani Pälli <[email protected]> Cc: Ian Romanick <[email protected]> Cc: Ilia Mirkin <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl/linker: always validate explicit location among inputsAndres Gomez2019-03-191-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Outputs are always validated when having explicit locations and we were trusting its outcome to catch similar problems with the inputs since, in case of having undefined outputs for existing inputs, we would be already reporting a linker error. However, consider this case: " Shader stage n: --------------- ... layout(location = 0) out float a; ... Shader stage n+1: ----------------- ... layout(location = 0) in float b; layout(location = 0) in float c; ... " Currently, this won't report a linker error even though location aliasing is happening for the inputs. Therefore, we also need to validate the inputs independently from the outcome of the outputs validation. Cc: Timothy Arceri <[email protected]> Cc: Iago Toral Quiroga <[email protected]> Cc: Ilia Mirkin <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: correctly validate component layout qualifier for dvec{3,4}Andres Gomez2019-03-191-0/+4
| | | | | | | | | | | | | | | | | | From page 62 (page 68 of the PDF) of the GLSL 4.50 v.7 spec: " A dvec3 or dvec4 can only be declared without specifying a component." Therefore, using the "component" qualifier with a dvec3 or dvec4 should result in a compiling error. v2: enhance the error message (Timothy). Fixes: 94438578d21 ("glsl: validate and store component layout qualifier in GLSL IR") Cc: Timothy Arceri <[email protected]> Cc: Kenneth Graunke <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* Revert "nir: const `nir_call_instr::callee`"Jason Ekstrand2019-03-193-4/+4
| | | | | | | | | | | This reverts commit db57db5317e81fb4ce31bc294fdcc199db651542. When building IR, nothing is really immutable and, since C has no concept of constness propagating beyond the first pointer, we have to be vary careful with how we use it. To just throw const into a function like this is a lie. Instead, we should just drop the unneeded const in spirv_to_nir which this commit does along with the revert.
* gitlab-ci: add clang buildEric Engestrom2019-03-191-0/+9
| | | | | | | `clang` has a different set of warnings and errors than `gcc`, so it's useful to do at least a generic pass over Mesa with it. Signed-off-by: Eric Engestrom <[email protected]>
* nir: const `nir_call_instr::callee`Eric Engestrom2019-03-192-3/+3
| | | | | | | | | Fixes: c95afe56a8033a87dca7 "nir/spirv: handle kernel function parameters" Cc: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Acked-by: Tapani Pälli <[email protected]> Acked-by: Karol Herbst <[email protected]>