summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: update headers from rnndbChristian GMEINER2019-08-1913-115/+204
| | | | | | | | Update to etna_viv commit c51353e. Signed-off-by: Christian GMEINER <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* gallium: Remove manual defining of PIPE_FORMAT enum values.Eric Anholt2019-08-191-357/+357
| | | | | | | | | Now that SVGA doesn't have a table that has to be in PIPE_FORMAT order, we can let the enums have whatever values they naturally would without worrying about holes. Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: Drop unsupported formats from the format table.Eric Anholt2019-08-191-170/+0
| | | | | | | | | | | Now that we're using the array initializers, we don't need to manually fill out all these stub entries. Produced with "sed -i '/.*INVALID.*INVALID.*INVALID/d' src/gallium/drivers/svga/svga_format.c" Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: Remove duplication in the format table.Eric Anholt2019-08-191-329/+322
| | | | | | | | | | | | | By using the [ ] = {} array initializer syntax, we no longer need the entries to be listed in PIPE_FORMAT_* value order. This means that people adding new gallium formats don't need to cargo-cult changes to this driver or regress that non-unit-tested requirement. While I'm here, drop the lines for formats that no longer exist (the numbered ones in the table). Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: Factor out the format conversion table entry lookup.Eric Anholt2019-08-191-16/+25
| | | | | | | | | | | Seemed like a sensible cleanup, while I was looking at whether I could make the table sparse. To make the svga table not require fixups on every new gallium format, we may want to change how it's populated. Acked-by: Jose Fonseca <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* iris: Only request an input mask if the shader needs itJason Ekstrand2019-08-161-1/+3
| | | | | Fixes: aebca3961b "iris: Fix handling of SIMD32 fragment shaders" Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: add back YVU supportXiong, James2019-08-161-5/+5
| | | | | | | | PIPE_FORMAT_YV12 is not handled so switching to PIPE_FORMAT_IYUV and adding back YVU support. Signed-off-by: James Xiong <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* lima: actually wait for bo in lima_bo_waitErico Nunes2019-08-162-0/+5
| | | | | | | | | | | | | | | PIPE_TIMEOUT_INFINITE is unsigned and gets assigned to signed fields where it ends up as -1. When this reaches the kernel as a timeout it gets translated as no timeout, which cause the waiting functions to return immediately and not actually wait for a completion. This seems to cause unstable results with lima where even piglit tests randomly fail. Handle this by setting the signed max value in case of infinite timeout. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Qiang Yu <[email protected]>
* lima: fix compilation of standalone compilerVasily Khoruzhick2019-08-151-2/+2
| | | | | | Fixes: e0aeee946004("lima: add summary report for shader-db") Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* gallium/util: widen type before multiplicationErik Faye-Lund2019-08-151-1/+1
| | | | | | | | | | This method returns size_t, but the multiplication multiplies two integers, leading to overflow rather than type widening. Noticed by compiling with MSVC, which emits a warning. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: avoid warning on WindowsErik Faye-Lund2019-08-151-1/+1
| | | | | | | | | | On Windows, p_atomic_inc_return returns an unsigned long long rather than the type the pointer refers to, so let's make sure we cast the result to the right type. Otherwise, we'll trigger a warning about the wrong format-string for the type. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* win32: unify strcasecmp definitionsErik Faye-Lund2019-08-153-0/+3
| | | | | | | | | There was two incompatible definitions of strcasecmp, which lead to a compiler warning. Let's clean this up by only leaving one of them, and using that one all the time. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* panfrost: Add R10G10B10A2_SSCALED vertex formatAlyssa Rosenzweig2019-08-141-0/+4
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Extend blending to MRTAlyssa Rosenzweig2019-08-143-44/+58
| | | | | | | Our hardware supports independent (per-RT) blending, but we need to route those settings through from Gallium. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/mfbd: Stuff in RT countAlyssa Rosenzweig2019-08-141-8/+10
| | | | | | | | | Fixes DATA_INVALID_FAULTs with multiple render targets. We do always allocate space for 4 cbufs just to keep things sane. This may not be strictly necessary. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Note "MFBD preload disable" bitAlyssa Rosenzweig2019-08-141-2/+2
| | | | | | It's a chicken bit, as far as I can tell. Buck buck. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Ensure we upload at least 1 blend RTAlyssa Rosenzweig2019-08-141-1/+1
| | | | | | Otherwise we'll get memory junk. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Zero tripipe on initializeAlyssa Rosenzweig2019-08-141-1/+1
| | | | | | | I don't think the hardware cares, but this adds a lot of noise to traces that we would rather not need to look at. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Remove panfrost_add_dependency assertsAlyssa Rosenzweig2019-08-141-4/+0
| | | | | | | | It doesn't... make a ton of sense to need to assert and this routine is hotter than you might expect. Doesn't matter for release builds, of course. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* radeonsi: add support for RenoirMarek Olšák2019-08-142-1/+4
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* etnaviv: fix weird indentationChristian Gmeiner2019-08-141-7/+3
| | | | | | Fixes: 797a2e4fd03 ("etnaviv: update logic to determine uniform limits") Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[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]>
* 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-142-1/+30
| | | | | | | | | | | | | | 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]>
* 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]>
* 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]>