summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* v3d: Drop incorrect dependency for flpop.Eric Anholt2018-12-301-4/+0
| | | | | It is just shifting probably-means-flags bits out of a value, it doesn't actually update the flags on its own.
* v3d: Drop unused count_nir_instrs() helper.Eric Anholt2018-12-301-18/+0
| | | | | This was for shader-db, but I haven't cared about NIR instruction counts in a long time.
* v3d: Hook up some shader-db output to GL_ARB_debug_output.Eric Anholt2018-12-304-2/+55
| | | | | | | This allows the original shader-db project's run.c runner to parse things easily, and is probably a good thing to have for GL_ARB_debug_output in general. I formatted it more like Intel's so I can mostly reuse their report script.
* v3d: Add a "precompile" debug flag for shader-db.Eric Anholt2018-12-293-0/+78
| | | | | | | | | I've been using my apitrace-based shader-db so far, but it's slow (apitrace decompression), intrusive (apitrace windows spamming the screen), and doesn't have much coverage. The original shader-db provides a lot more coverage and compiles faster, at the expense of not having the actual runtime variant key. As v3d has a lot less runtime variation than vc4 did, this tradeoff makes more sense.
* v3d: Fix uniform pretty printing assertion failure with branches.Eric Anholt2018-12-291-0/+3
| | | | Fixes: 248a7fb392ba ("v3d: Do uniform pretty-printing in the QPU dump.")
* meson: Override C++ standard to gnu++11 when building with altivec on ppc64Dylan Baker2018-12-281-0/+3
| | | | | | | | | | Otherwise there will be symbol collisions for the vector name. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108943 Distro Bug: https://bugs.gentoo.org/673622 Fixes: 42ea0631f108d82554339530d6c88aa1b448af1e ("meson: build clover") Acked-by: Matt Turner <[email protected]>
* intel/aub_viewer: highlight true booleansLionel Landwerlin2018-12-283-2/+10
| | | | | | | Useful to spot PIPE_CONTROL flags. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* intel/aub_viewer: fold binding/sampler table itemsLionel Landwerlin2018-12-281-4/+11
| | | | | | | Makes things easier to read rather than a long block of text. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* intel/aub_viewer: fix shader viewLionel Landwerlin2018-12-281-1/+3
| | | | | | | Not decoding the shader at the right offset. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* intel/aub_viewer: print address of missing shaderLionel Landwerlin2018-12-281-1/+2
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* intel/aub_viewer: fixup 0x address prefixLionel Landwerlin2018-12-281-1/+1
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* intel/aub_viewer: fix shader get_boLionel Landwerlin2018-12-281-6/+2
| | | | | | | Instruction addresses are always in ppgtt space. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* radeonsi: Enable adaptive_sync by default for radeonNicholas Kazlauskas2018-12-281-0/+4
| | | | | | | | | It's better to let most applications make use of adaptive sync by default. Problematic applications can be placed on the blacklist or the user can manually disable the feature. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]>
* loader/dri3: Enable adaptive_sync via _VARIABLE_REFRESH propertyNicholas Kazlauskas2018-12-282-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DDX driver can be notified of adaptive sync suitability by flagging the application's window with the _VARIABLE_REFRESH property. This property is set on the first swap the application performs when adaptive_sync is set to true in the drirc. It's performed here instead of when the loader is initialized for two reasons: (1) The window's drawable can be missing during loader init. This can be observed during the Unigine Superposition benchmark. (2) Adaptive sync will only be enabled closer to when the application actually begins rendering. If adaptive_sync is false then the _VARIABLE_REFRESH property is deleted on loader init. The property is only managed on the glx DRI3 backend for now. This should cover most common applications and games on modern hardware. Vulkan support can be implemented in a similar manner but would likely require splitting the function out into a common helper function. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]>
* drirc: Initial blacklist for adaptive syncNicholas Kazlauskas2018-12-281-0/+85
| | | | | | | | | | | Applications that don't present at a predictable rate (ie. not games) shouldn't have adapative sync enabled. This list covers some of the common desktop compositors, web browsers and video players. [ Michel Dänzer: Added entry for firefox-esr ] Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]>
* util: Add adaptive_sync driconf optionNicholas Kazlauskas2018-12-281-0/+5
| | | | | | | | | | | This option lets the user decide whether mesa should notify the window manager / DDX driver that the current application is adaptive sync capable. It's off by default. Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]>
* util: Get program name based on path when possibleNicholas Kazlauskas2018-12-281-1/+22
| | | | | | | | | | | | | | Some programs start with the path and command line arguments in argv[0] (program_invocation_name). Chromium is an example of an application using mesa that does this. This tries to query the real path for the symbolic link /proc/self/exe to find the program name instead. It only uses the realpath if it was a prefix of the invocation to avoid breaking wine programs. Cc: Timothy Arceri <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* etnaviv: Consolidate buffer references from framebuffersTomeu Vizoso2018-12-283-10/+9
| | | | | | | | | | | | | | | | | | We were leaking surfaces because the references taken in etna_set_framebuffer_state weren't being released on context destroy. Instead of just directly releasing those references in etna_context_destroy, use the util_copy_framebuffer_state helper. Take the chance to remove the duplicated buffer references in compiled_framebuffer_state to avoid confusion. The leak can be reproduced with a client that continuously creates and destroys contexts. Signed-off-by: Tomeu Vizoso <[email protected]> Reported-by: Sjoerd Simons <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* virgl/vtest: fix front buffer flush with protocol version 0.Dave Airlie2018-12-281-1/+1
| | | | | | | | Older versions of virglrenderer before 33da7361aec486290df0aec4ad8dfa8ff6adde2c in vtest mode, misrender gears. Fixes: 9d81cd8e7c (virgl: Pass resource size and transfer offsets) Reviewed-By: Gert Wollny <[email protected]>
* nv50,nvc0: add missing CAPs for unsupported featuresIlia Mirkin2018-12-262-0/+3
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nvc0: enable GL_NV_shader_atomic_float on pre-MaxwellIlia Mirkin2018-12-261-0/+2
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* nv50/ir: add support for converting ATOMFADD to proper irIlia Mirkin2018-12-261-0/+4
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* st/mesa: expose GL_NV_shader_atomic_float when ATOMFADD is supportedIlia Mirkin2018-12-261-0/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: select ATOMFADD when source type is floatIlia Mirkin2018-12-262-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add PIPE_CAP_TGSI_ATOMFADD to indicate supportIlia Mirkin2018-12-263-0/+4
| | | | | | | | ATOMFADD is a little special -- make drivers have to specify it explicitly. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi: add ATOMFADD operationIlia Mirkin2018-12-266-2/+23
| | | | | | | | This is supported by at least NVIDIA hardware, and exposeable via GL extensions. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: allow glDrawElements to work with GL_SELECT feedbackIlia Mirkin2018-12-262-23/+42
| | | | | | | | | | | Not sure if this ever worked, but the current logic for setting the min/max index is definitely wrong for indexed draws. While we're at it, bring in all the usual logic from the non-indirect drawing path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109086 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallium/ttn: Fix setup of outputs_written.Eric Anholt2018-12-261-1/+1
| | | | | | | | | We need a 64-bit value, otherwise we only handle the low 32, and happen to sign-extend to claim to write all varying slots if VARYING_SLOT_VAR2 was used. Fixes: 4d0b2c7aaac3 ("ttn: Update shader->info as we generate code.") Reviewed-by: Rob Clark <[email protected]>
* anv: don't do partial resolve on layer > 0Lionel Landwerlin2018-12-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | We've made the choice not to use fast clears on layer > 0 with multilayer images. This is partly because we would need to store multiple clear colors for each layer, making the existing memory layout, already including aux surfaces, fast clear color, image state, etc... even more complex. Partial resolves are the operations transfering the clear colors into the auxiliary buffers. This operation is currently implemented in Blorp by loading the clear color from the image's BO, into a shader that then samples from the auxiliary buffer and writes the color only if it isn't there already. The problem here is that because we store only one clear color for all layers and it is used for partial resolves. If you trigger a partial clear on a layer > 0, then you're likely to deal with a color that is not what you actually want. In the particular issues below, we have multiple layers, each cleared with a different color but the partial resolve just writes the wrong color into the auxiliary buffers for layers > 0. Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108910 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108911 Cc: [email protected]
* st/nine: Increase the limit of cached ff shadersAxel Davy2018-12-231-2/+2
| | | | | | | | 100 is too small for some games, which triggers recompilations every frame. Increase to 1024. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/nine: Add src reference to nine_context_range_uploadAxel Davy2018-12-233-1/+8
| | | | | | | | | | Just like nine_context_box_upload, nine_context_range_upload should reference the src, which holds the ram source buffer. Fixes: https://github.com/iXit/Mesa-3D/issues/327 Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
* st/nine: Bind src not dst in nine_context_box_uploadAxel Davy2018-12-234-6/+6
| | | | | | | | | | | | nine_context_box_upload uploads a ram buffer (from src) to a pipe_resource (dst). We already have a refcount on the pipe_resource, what needs to be protected from release is the ram buffer, thus a reference to src. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
* st/nine: Fix volumetexture dtor on ctor failureAxel Davy2018-12-231-1/+2
| | | | | | | | | | The dtor is called on allocation failure, thus we must check the volumes are allocated before trying to release them. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
* st/nine: Switch to presentation buffer if resize is detectedAxel Davy2018-12-231-1/+36
| | | | | | | | | This enables to match the window size on resize on all cases, as it only works currently with presentation buffers. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/nine: Use helper to release swapchain buffers laterAxel Davy2018-12-232-8/+42
| | | | | | | | | | | This patch introduces a structure to release the present_handles only when they are fully released by the server, thus making "DestroyD3DWindowBuffer" actually release the buffer right away when called. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* freedreno/a6xx: fix 3d texture layoutRob Clark2018-12-223-3/+15
| | | | | | | Maybe not 100% perfect, but seems to be a pretty good approximation of that. Signed-off-by: Rob Clark <[email protected]>
* freedreno: update generated headersRob Clark2018-12-227-21/+28
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: improve setup_slices() debug msgsRob Clark2018-12-221-6/+5
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: simplify special case for 3d layoutRob Clark2018-12-221-9/+10
| | | | | | | | This logic can be re-written as the two cases for 3d (ie. before/after the miplevel sizes start reducing) vs everything else. I think it is easier to read this way. Signed-off-by: Rob Clark <[email protected]>
* freedreno: combine fd_resource_layer_offset()/fd_resource_offset()Rob Clark2018-12-221-13/+2
| | | | | | We really only need this logic in one place. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: don't treat all inputs/outputs as vec4Rob Clark2018-12-222-14/+38
| | | | | | | | | This was a hold-over from the early TGSI days, and mostly not needed with NIR. This avoids burning an entire 4 consecutive scalar regs for vec3 outputs, for example. Which fixes a few places that we were doing worse that we should on register usage. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3: fix fallout of extra assertRob Clark2018-12-211-1/+1
| | | | | | | | | | | | | | | Fixes the following crash that happened after d6110d4d The problem happens if we first compile a "vanilla" shader with nothing lowered in NIR, which perform the final lowering passes on so->shader-> nir (including nir_lower_locals_to_regs()), and then later we have compile a shader with some lowering. The second time through we would have already done nir_lower_locals_to_regs(). Arguably this was already a bug, just one we hadn't noticed yet. Fixes: d6110d4d547 intel/compiler: move nir_lower_bool_to_int32 before nir_lower_locals_to_regs Signed-off-by: Rob Clark <[email protected]>
* st/nir: Drop unused gl_program parameter in VS input handling helper.Kenneth Graunke2018-12-211-2/+2
| | | | | | | Nobody uses this, so let's drop it. This makes the helper callable from places without a gl_program. Reviewed-by: Marek Olšák <[email protected]>
* st/nir: Gather info after applying lowering FS variant featuresKenneth Graunke2018-12-211-0/+4
| | | | | | | | DrawPixels lowering, for example, adds new varyings that need to be accounted for in inputs_read. The earlier info gathering at link time cannot account for this. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Combine the DrawPixels and Bitmap passthrough VS programs.Kenneth Graunke2018-12-214-33/+22
| | | | | | They're now identical, so we can just compile it once. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Don't open code the drawpixels vertex shader.Kenneth Graunke2018-12-211-27/+11
| | | | | | Now that we always copy color, we can just use the util function. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Drop !passColor optimization in drawpixels shaders.Kenneth Graunke2018-12-212-28/+20
| | | | | | | | | | | | | | | | | | | | The glDrawPixels passthrough vertex shader copies position and texcoord vertex attributes to varying outputs. It also optionally copies a third gl_Color attribute, which sometimes is unnecessary. Until now, we've compiled separate variants of the shader, one of which does this extra copy, and the other of which doesn't. We have done this since 2007. But, the vertex shader runs for a whopping four vertices, and so the cost of a copying a single input to output is likely inconsequential. In theory, we could bind one fewer vertex element - but we always bind all three regardless. So, we don't even get that savings. This patch unifies the two, so we always copy the optional color, and save having to compile the variant. It also makes the VS input interface match up with the vertex element state without any dead (unused) input attributes. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: Drop dead 'passthrough_fs' field.Kenneth Graunke2018-12-211-2/+0
| | | | | | | Dead since 2015 (commit 5142564734bd68f165b02e29e384ebbcf91cce38). Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radv: Fix wrongly positioned paren.Bas Nieuwenhuizen2018-12-211-1/+1
| | | | | | Trivial. Fixes: 9f0bfbed11f "radv: Work around non-renderable 128bpp compressed 3d textures on GFX9."
* gallivm: abort when trying to use non-existing intrinsicRoland Scheidegger2018-12-211-0/+10
| | | | | | | | | | | Whenever llvm removes an intrinsic (we're using), we're hitting segfaults due to llvm doing calls to address 0 in the jitted code instead. However, Jose figured out we can actually detect this with LLVMGetIntrinsicID(), so use this to abort, so we don't have to wonder what got broken. (Of course, someone still needs to fix the code to no longer use this intrinsic.) Reviewed-by: Jose Fonseca <[email protected]>