summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nir/range-analysis: Fail gracefully on non-SSA sourcesIan Romanick2019-08-141-0/+3
| | | | | Tested-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* etnaviv: split destroy_shaderChristian Gmeiner2019-08-142-4/+5
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: split link_shaderChristian Gmeiner2019-08-142-4/+7
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: split dump_shaderChristian Gmeiner2019-08-143-35/+71
| | | | | | | Also this adds the missing impl for etna_dump_shader_nir(..). Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: mv etnaviv_compiler.c etnaviv_compiler_tgsi.cChristian Gmeiner2019-08-143-2/+2
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: correct PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE handlingChristian Gmeiner2019-08-141-1/+3
| | | | | | | | Have a correct answer to GL_MAX_FRAGMENT_UNIFORM_VECTORS and GL_MAX_VERTEX_UNIFORM_VECTORS. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach [email protected]
* etnaviv: update logic to determine uniform limitsChristian Gmeiner2019-08-141-4/+26
| | | | | | | Taken 1:1 from the header file. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach [email protected]
* etnaviv: put uniform limit determination into own functionChristian Gmeiner2019-08-141-8/+14
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach [email protected]
* etnaviv: Use reentrant screen lock around flushMarek Vasut2019-08-141-0/+5
| | | | | | | | | | | | | | The flush callback may be called on the same pipe context, and thus the same stream, from two different threads of execution. However, etna_cmd_stream_flush{,2}() must not be called on the same stream from two different threads of execution as that would mess up the etna_bo refcounting and likely have other ugly side effects. Fix this by using a reentrant screen lock around the flush callback. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: Add valgrind supportMarek Vasut2019-08-143-1/+64
| | | | | | | | Add Valgrind support for etnaviv to track BO leaks. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: Use hash table to track BO indexesMarek Vasut2019-08-143-15/+26
| | | | | | | Use hash table instead of ad-hoc arrays. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: Fix double-free in etna_bo_cache_free()Marek Vasut2019-08-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | The following situation can happen in a multithreaded OpenGL application. A BO is submitted from etna_cmd_stream #1 with flags set for read. A BO is submitted from etna_cmd_stream #2 with flags set for write. This triggers a flush on stream #1 and clears the BO's current_stream pointer. If at this point, stream #2 attempts to queue BO again, which does happen, the BO will be added to the submit list twice. The Linux kernel driver correctly detects this and warns about it with "BO at index %u already on submit list" kernel message. However, when cleaning the BO cache in etna_bo_cache_free(), the BO which was submitted twice will also be free()d twice, this triggering a glibc double free detector. The fix is easy, even if the BO does not have current_stream set, iterate over current streams' list of BOs before adding the BO to it and verify that the BO is not yet there. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* kmsro: Add missing definitions to Android.mkRoman Stratiienko2019-08-141-0/+2
| | | | | Signed-off-by: Roman Stratiienko <[email protected]> Reviewed-by: Rob Herring [email protected]
* softpipe: Add support for ARB_derivative_controlGert Wollny2019-08-143-2/+31
| | | | | | | | | | | | | | Enables and passes piglits: spec/ARB_drivative_control/ dfdx-coarse dfdx-dfdy dfdx-fine dfdy-coarse dfdy-fine Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* lima/ppir: print srcs and dests in ppir_node_print_prog()Vasily Khoruzhick2019-08-131-2/+56
| | | | | | | | Now we have an accessors for ppir src, so it's possible to easily print all srcs and dests while dumping ppir representation. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* lima/ppir: use src accessors in ppir regallocVasily Khoruzhick2019-08-132-102/+17
| | | | | | | Get rid of most switch/case by using src accessors Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* lima/ppir: add ppir_node to ppir_srcVasily Khoruzhick2019-08-135-10/+16
| | | | | | | We'll need it if we want to walk through node sources Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* lima/ppir: introduce accessors for ppir_node sourcesVasily Khoruzhick2019-08-131-0/+41
| | | | | | | | Sometimes we need to walk through ppir_node sources, common accessor for all node types will simplify code a lot. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* iris: Expose aux buffer as 2nd plane w/modifiersJordan Justen2019-08-131-10/+23
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Export and import surfaces with modifiers that have aux dataJordan Justen2019-08-134-25/+118
| | | | | | | | | | | | | | | | The DRI interface for modifiers with aux data treats the aux data as a separate plane of the main surface. When the dri layer requests the plane associated with the aux data, we save the required information into the dri aux plane image. Later when the image is used, the dri plane image will be available in the pipe_resource structure's `next` field. Therefore in iris, we reconstruct the aux setup from this separate dri plane image when the image is used. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Do proper format checks for Y+CCS modifier supportKenneth Graunke2019-08-131-6/+20
| | | | | | We need to ensure that the DRI image format supports CCS. Reviewed-by: Jordan Justen <[email protected]>
* iris: Create single bo for surfaces with modifiers and aux dataJordan Justen2019-08-131-3/+40
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Split iris_resource_alloc_aux to enable aux modifiersJordan Justen2019-08-131-40/+85
| | | | | | | | | | | | | | | | | Reworks: * If the aux-state is not ISL_AUX_STATE_AUX_INVALID, then use memset even when memset_value is zero. The hiz buffer initial aux-state will be set to invalid, and therefore we can skip the memset. But, for CCS it will be set to ISL_AUX_STATE_PASS_THROUGH, and therefore the aux data must be cleared to 0 with the memset. Previously we would use BO_ALLOC_ZEROED with the CCS aux data, so this memset wasn't required. Now, the CCS aux data may be part of the main surface. We prefer to not use BO_ALLOC_ZEROED excessively, so the memset is needed for the CCS case. (Nanley) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* iris: Add aux offset into hiz_addressJordan Justen2019-08-131-1/+1
| | | | | | | | | | | This is not currently required because the hiz buffer is in a separate buffer, and therefore the offset is 0. If we combine the aux buffer with the main surface buffer, then the hiz offset may become non-zero. Suggested-by: Nanley Chery <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi_to_nir: add assertions for max varying slotsMarek Olšák2019-08-131-0/+2
| | | | | | Nine uses GENERIC slots > 31. Trivial.
* tgsi_to_nir: expand vec3 system values to vec4Marek Olšák2019-08-131-0/+3
| | | | | | for nir_intrinsic_load_work_group_id Reviewed-by: Eric Anholt <[email protected]>
* tgsi_to_nir: fix incorrect number of image src1 componentsMarek Olšák2019-08-131-4/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965/gen11: fix genX_bits.h include pathMauro Rossi2019-08-131-1/+1
| | | | | | | | | | | Instead of "genX_bits.h" use "genxml/genX_bits.h" as already done in other similar cases Besides being more correct, it also fixes building error in Android. Fixes: f0d2923 ("i965/gen11: Emit SLICE_HASH_TABLE when pipes are unbalanced.") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]>
* panfrost: Workaround bug in partial update implementationAlyssa Rosenzweig2019-08-131-4/+9
| | | | | | | | We can't intersect with empty regions. Fixes: 65ae86b8542 ("panfrost: Add support for KHR_partial_update()") Signed-off-by: Alyssa Rosenzweig <[email protected]>
* gitlab-ci: Run the GLES2 CTS on llvmpipe.Eric Anholt2019-08-135-0/+313
| | | | | | | | | | | | | | | | This is the start of doing CTS tests on merges to Mesa master. We use the surfaceless platform so that we don't need to bother bringing up weston or X11. The surface size is kept low to reduce runtime, but this comes at the cost of many rendering tests skipping due to too-small render targets (as we see the impact of Mesa on the shared runner pool, we can reevaluate this and what set of CTS tests we want to run). We split the job up across 4 runners (each at 4 llvmpipe threads), so that the job can load-balance across our shared runners and finish sooner (since dEQP is very single-thread-performance bound). Reviewed-by: Eric Engestrom <[email protected]>
* gitlab-ci: Switch the meson-main build type to debugoptimized.Eric Anholt2019-08-132-1/+2
| | | | | | | | | | | Now that we're running the drivers we build, building with optimization is important for keeping our runtime down. Shaves about 4 minutes of runtime off of GLES2 CTS of llvmpipe at 64x64. v2: Only switch meson-main until we enable CTS for other builds on request by Michel. Reviewed-by: Eric Engestrom <[email protected]>
* gitlab-ci: Set the prefix to ./install instead of the DESTDIR.Eric Anholt2019-08-132-3/+4
| | | | | | | | | | If we don't set DESTDIR, then the DEFAULT_DRIVER_DIR built into the libraries is correct and we don't need to use LIBGL_DRIVERS_PATH and friends for CI usage. Incidentally, this moves our installed paths from /builds/anholt/mesa/install/usr/local/lib (for example) to /builds/anholt/mesa/install/lib for simplicity. Reviewed-by: Eric Engestrom <[email protected]>
* gitlab-ci: Build the CTS in the debian build image.Eric Anholt2019-08-132-3/+60
| | | | | | This will let us reuse the image for test runs. Reviewed-by: Eric Engestrom <[email protected]>
* surfaceless: Fix swrast-path segfault when loader doesn't know driver name.Eric Anholt2019-08-131-2/+3
| | | | | | | | | If we're hitting the swrast fallback path here, it's probably because we stumbled across a KMS-only device (such as the ASpeed that some of our CI runners have) that will then return a NULL driver_name. Don't crash in that case. Reviewed-by: Eric Engestrom <[email protected]>
* surfaceless: Fix swrast path.Eric Anholt2019-08-134-33/+26
| | | | | | | | | We get a getDrawableInfo() call in the MakeCurrent path, which platform_device was handling correctly by returning the pbuffer's width/height but platform_surfaceless segfaulted for. Reuse platform_device's implementation. Reviewed-by: Gurchetan Singh <[email protected]>
* gitlab-ci: Move around which builds cover which swrast.Eric Anholt2019-08-131-14/+15
| | | | | | | | | | I want to enable CI of llvmpipe out of the meson-main build. So, kick classic swrast/osmesa to meson-i386, then promote llvmpipe to meson-main (along with nine, now that classic osmesa isn't keeping it out of there). Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Don't require DRI classic swrast for OSMesa.Eric Anholt2019-08-131-3/+0
| | | | | | | OSMesa doesn't care about this build option, it links against src/mesa/swrast regardless. Reviewed-by: Michel Dänzer <[email protected]>
* panfrost: Implement transform feedbackAlyssa Rosenzweig2019-08-131-37/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Midgard has no hardware support for transform feedback, so we simulate it in software. Lucky us. What Midgard does do is write out vertex shader outputs to main memory unconditonally. Fragment shaders read varyings back from main memory; there's no on-chip storage for varyings. Whether this was a reasonable design is a question I will not be engaging in this commit message. What that does mean is that, in some sense, Midgard *always* does transform feedback uncondtionally, and there's no way to turn off transform feedback. Normally, we would allocate some scratch memory every frame to store the varyings in an arbitrary format (interleaved for simplicity), and then feed that scratch to the fragment shader and discard when the rendering completes. The only difference now is that sometimes, for some buffers, we use a BO provided to us by Gallium and a format provided by Gallium, instead of allocating the memory and choosing the format ourselves. This has some limitations -- in particular, it only works at vec4 granularity, so a corresponding GLSL linkage patch is needed to correctly implement transform feedback for non-vec4 types. Nevertheless, given the hardware already works in this admittedly-bizarre fashion, transform feedback is "free". Or, at least, it's no more expensive than any other rendering. Specifically not implemented is dynamically-sized transform feedback (i.e. with geometry/tesselation shaders). Spoiler alert: Midgard has no support for geometry *or* tessellation shaders, despite advertising support. They get compiled to *massive* compute shaders. How's that for checkbox compliance? Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Increment offsets[] per drawAlyssa Rosenzweig2019-08-132-0/+11
| | | | | | | We have to maintain the internal offset ourselves. Per v3d. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Fixup stream out information per variantAlyssa Rosenzweig2019-08-132-0/+9
| | | | | | | | We could probably get away with doing this once per pipe_shader_state but let's not jump down that rabbit hole quite yet. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Route outputs_written through the compilerAlyssa Rosenzweig2019-08-134-4/+12
| | | | | | | It's there in shader_info, but we need to access it from pan_context.c Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Import stream out utility from irisAlyssa Rosenzweig2019-08-131-0/+40
| | | | | | | | | We'll need this in a moment. Ken's implementation, lightly edited for Panfrost. Signed-off-by: Alyssa Rosenzweig <[email protected]> Suggested-by: Kenneth Graunke <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Flush when using transform feedbackAlyssa Rosenzweig2019-08-131-0/+1
| | | | | | | | | This is a huge hack to workaround incomplete BO flushing logic, but it's enough for the dEQP transform feedback tests, and doing the resource management to get this right is out-of-scope for this patch series. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Set PIPE_CAP_TGSI_TEXCOORDAlyssa Rosenzweig2019-08-132-1/+6
| | | | | | | | | It doesn't really make sense, since we don't have special texture coordinate varyings, but it'll make some code simpler for XFB and it doesn't hurt us, even if I lose a bit of my soul setting it. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Wire up statistics for primitivesAlyssa Rosenzweig2019-08-131-0/+26
| | | | | | | GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN should now be handled. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* panfrost: Implement callbacks for PRIMITIVES queriesAlyssa Rosenzweig2019-08-132-15/+52
| | | | | | | | We're just going to compute them in the driver but let's get the structures setup to handle them. Implementation from v3d. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
* freedreno/a6xx: move SSBO/image consts to IBO stateobjRob Clark2019-08-131-13/+10
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: move VS driverparams to it's own stateobjRob Clark2019-08-132-5/+15
| | | | | | | | | If driver-params are required, we really should emit it on every draw for correctness. And if not required, we should emit a DISABLE so that un-applied state updates from previous draws don't corrupt the const state. Signed-off-by: Rob Clark <[email protected]>
* freedreno/ir3+a6xx: same VBO state for draw/binningRob Clark2019-08-138-22/+150
| | | | | | Worth ~+20% on gl_driver2 Signed-off-by: Rob Clark <[email protected]>
* freedreno/a6xx: add fd_emit_take_group()Rob Clark2019-08-132-19/+17
| | | | | | | | | Which takes ownership of the stateobj. Useful for streaming state- objs, to avoid an extra ref/unref Worth ~5% at gl_driver2 Signed-off-by: Rob Clark <[email protected]>