summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* pan/decode: Resolve crash with NULL attr/varyingsAlyssa Rosenzweig2019-08-091-0/+5
| | | | | | | This case needs more investigation, but this was found with geometry shaders. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* gallium/swr: Fix glClear when it's used with glEnable/glDisable GL_SCISSOR_TESTKrzysztof Raszkowski2019-08-091-64/+5
| | | | | | | When GL_SCISSOR_TEST is enabled glClear is handled by state tracker and there is no need to do this in gallium driver. Reviewed-by: Alok Hota [email protected]
* util: Revert "util: added missing headers in anon-file"Gurchetan Singh2019-08-091-2/+0
| | | | | | | | | | This reverts commit c73988300f943e185a50aaba015f2f114ffcb262. Reason: Made a fix for this, then saw @eric's change ("util/anon_file: add missing"), but some sequence of events I don't really remember caused this to get merged. So revert ;-) Reviewed-by: Eric Engestrom <[email protected]>
* etnaviv: Remove etna_bo_from_handle() prototypeMarek Vasut2019-08-091-2/+0
| | | | | | | Remove etna_bo_from_handle() as there are no known users. Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: Lucas Stach <[email protected]>
* anv: drop unused codeLionel Landwerlin2019-08-091-17/+0
| | | | | | | We stopped using this when we moved to Jason's mi_builder. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* etnaviv: fix typoChristian Gmeiner2019-08-091-3/+3
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: add gpu_supports_texture_target(..)Christian Gmeiner2019-08-091-8/+18
| | | | | | | | | | | | | | | | Currently I am seeing a handful of the following debug message: translate_texture_target:495: Unhandled texture target: 0 PIPE_BUFFER is not handled in translate_texture_target(..) which makes sense as it is used to translate from PIPE_XXX to GPU specific value during etna_create_sampler_view_state(..). To fix this problem introduce gpu_supports_texture_target(..) which just checks if the texture target is supported. Fixes: dfe048058fa ("etnaviv: support 3D and 2D array textures") Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* util: Cygwin has linux-style pthread_setname_npJon Turney2019-08-091-1/+1
| | | | Fixes: dcf9d91a ("util: Handle differences in pthread_setname_np")
* anv/android: disable shared representable image support explicitlyTapani Pälli2019-08-091-0/+10
| | | | | | | | | | | | Android 9 loader conditionally advertises VK_KHR_shared_presentable_image extension based on this property and it looks like it does not initialize the struct before query. Pragmas are added to ignore warnings with Android specific structure types in same manner as commit 8d386e6eef8 did. Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* lima: introduce a struct describing texture descriptorVasily Khoruzhick2019-08-083-56/+150
| | | | | | | | | | | | | Use a struct with bitfields to construct texture descriptor instead of poking bits in array of uint32_t. It improves code readability and makes it easier to experiment with unknown fields. Also fix mipmapping while we're at it - Utgard can have up to 13 levels, but 64 bytes is enough only for 10. Calculate descriptor size dynamically to account extra levels if we need them. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* lima: add texel format tableVasily Khoruzhick2019-08-083-51/+53
| | | | | | | | | Introduce a table for supported texel formats and use it to check whether format is supported and for converting pipe format to lima texel format. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* util: added missing headers in anon-fileGurchetan Singh2019-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | Otherwise I get: ../src/util/anon_file.c: In function ‘create_tmpfile_cloexec’: ../src/util/anon_file.c:75:9: error: implicit declaration of function ‘mkostemp’ [-Werror=implicit-function-declaration] fd = mkostemp(tmpname, O_CLOEXEC); ^~~~~~~~ ../src/util/anon_file.c:133:7: error: implicit declaration of function ‘asprintf’ [-Werror=implicit-function-declaration] asprintf(&name, "%s/mesa-shared-%s-XXXXXX", path, debug_name); ^~~~~~~~ ../src/util/anon_file.c:141:4: error: implicit declaration of function ‘free’ [-Werror=implicit-function-declaration] free(name) Fixes: c0376a ("util: add anon_file.h for all memfd/temp file usage")
* virgl: check scanout maskGurchetan Singh2019-08-082-0/+7
| | | | | | | | | Otherwise, virgl will report renderable or texturable formats as also scan-out formats. v2: drop host feature check (@kusma) Reviewed-by: Erik Faye-Lund <[email protected]>
* virgl: fixup_readback_format --> fixup_formatsGurchetan Singh2019-08-081-8/+7
| | | | | | | This function is generalizable. Suggested-by: Erik Faye-Lund <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]>
* virgl: access caps in a less verbose way in virgl_is_format_supportedGurchetan Singh2019-08-081-9/+9
| | | | Reviewed-by: Erik Faye-Lund <[email protected]>
* pan/midgard: Disassemble load/store barrel shiftAlyssa Rosenzweig2019-08-082-5/+30
| | | | | | Arm assembly intensifies. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* util/anon_file: const string paramEric Engestrom2019-08-082-2/+2
| | | | | | | Fixes: c0376a123418df0050dc ("util: add anon_file.h for all memfd/temp file usage") Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Eric Anholt <[email protected]> Tested-by: Andreas Baierl <[email protected]>
* util/anon_file: drop unused #includeEric Engestrom2019-08-081-1/+0
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Eric Anholt <[email protected]> Tested-by: Andreas Baierl <[email protected]>
* util/anon_file: add missing #includeEric Engestrom2019-08-081-0/+3
| | | | | | | Fixes: c0376a123418df0050dc ("util: add anon_file.h for all memfd/temp file usage") Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Eric Anholt <[email protected]> Tested-by: Andreas Baierl <[email protected]>
* intel/perf: use MAJOR_IN_SYSMACROS/MAJOR_IN_MKDEVGreg V2019-08-081-0/+4
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Fixes: 134e750e16bfc53480e0 ("i965: extract performance query metrics")
* util: fix cpuset support on FreeBSDGreg V2019-08-081-0/+7
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* i965/tiled_memcpy: avoid creating bswap32 if it exists as a macro (e.g. on ↵Greg V2019-08-081-0/+3
| | | | | | FreeBSD) Reviewed-by: Eric Engestrom <[email protected]>
* anv: add MAP_POPULATE fallback define for portabilityGreg V2019-08-081-0/+4
| | | | | | FreeBSD does not have MAP_POPULATE Reviewed-by: Eric Engestrom <[email protected]>
* anv: remove unused Linux-specific includeGreg V2019-08-081-1/+0
| | | | | | Fixes: 4201cc2dd3a ("anv: Implement VK_KHX_external_semaphore_fd") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: define ETIME to ETIMEDOUT if not presentGreg V2019-08-082-6/+0
| | | | Reviewed-by: Eric Engestrom <[email protected]>
* lima: Fix Android.mkRoman Stratiienko2019-08-082-4/+18
| | | | | | | | | | | | | | | 1. Update LOCAL_SRC_FILES according to commit 54434fe67068 ("lima/gpir: Rework the scheduler"). 2. Add libpanfrost_shared.a dependency. 3. Generate lima_nir_algebraic.c with Android.mk Fixes Android build error introduced by commit 5adfc8602c63 ("lima/ppir: move sin/cos input scaling into NIR") Signed-off-by: Roman Stratiienko <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Acked-by: Qiang Yu <[email protected]>
* Add libpanfrost_shared to Android buildRoman Stratiienko2019-08-081-1/+6
| | | | | | | | | | 1. Add missing directory to ./Android.mk 2. Fix ./src/panfrost/Android.shared.mk Signed-off-by: Roman Stratiienko <[email protected]> Reviewed-by: Icenowy Zheng <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Acked-by: Qiang Yu <[email protected]>
* anv,i965,iris: deduplicate setting of total_sharedRhys Perry2019-08-084-6/+1
| | | | | | | | v5: add patch Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: use derefs for shared memory accessRhys Perry2019-08-081-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vkpipeline-db for my Skylake GPU: total instructions in shared programs: 8847602 -> 8847896 (<.01%) instructions in affected programs: 10165 -> 10459 (2.89%) helped: 8 HURT: 2 total cycles in shared programs: 1606273555 -> 1606251634 (<.01%) cycles in affected programs: 2201803 -> 2179882 (-1.00%) helped: 7 HURT: 3 The shaders with more instructions is due to a loop over a shared array in Three Kingdoms being unrolled (and creating a lot of nested ifs). Not sure if that's good or bad. One of the shaders with worse cycles is only worse by 0.04% and the other two are the shaders with loops unrolled. v2: add patch v4: don't set spirv_options.shared_addr_format v4: move comment concerning the shared address format used and NULL v4: add vkpipeline-db results v5: rename to nir_lower_vars_to_explicit_types v5: move setting of total_shared to outside brw_compile_cs v6: set shared_addr_format v6: formatting changes Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> (v5) Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add nir_lower_to_explicit()Rhys Perry2019-08-086-3/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: use glsl_type_size_align_func v2: move get_explicit_type() to glsl_types.cpp/nir_types.cpp v2: use align() instead of util_align_npot() v2: pack arrays a bit tighter v2: rename mem_* to field_* v2: don't attempt to handle when struct offsets are already set v2: use column_type() instead of recreating it v2: use a branch instead of |= in nir_lower_to_explicit_impl() v2: assign locations to variables and update shared_size and num_shared v2: allow the pass to be used with nir_var_{shader_temp,function_temp} v4: rebase v5: add TODO v5: small formatting changes v5: remove incorrect assert in get_explicit_type() v5: rename to nir_lower_vars_to_explicit_types v5: correctly update progress when only variables are updated v5: rename get_explicit_type() to get_explicit_shared_type() v5: add comment explaining how get_explicit_shared_type() is different v5: update cast strides v6: update progress when lowering nir_var_function_temp variables v6: formatting changes v6: add more detailed documentation comment for get_explicit_shared_type v6: rename get_explicit_shared_type to get_explicit_type_for_size_align v7: fix comment in nir_lower_vars_to_explicit_types_impl() Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> (v5) Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_explicit_io: add nir_var_mem_shared supportRhys Perry2019-08-081-25/+52
| | | | | | | | | v2: require nir_address_format_32bit_offset instead v3: don't call nir_intrinsic_set_access() for shared atomics Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: avoid warning on WindowsErik Faye-Lund2019-08-081-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]> Acked-by: Eric Engestrom <[email protected]>
* mesa/main: cast away constnessErik Faye-Lund2019-08-081-1/+1
| | | | | | | | This avoids a warning about implicitly casting away the constness of the pointer. Signed-off-by: Erik Faye-Lund <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* spirv: fixup signatureErik Faye-Lund2019-08-082-3/+3
| | | | | | | | | This avoids a warning on some compiler, complaining about implicitly casting the function-pointer. Signed-off-by: Erik Faye-Lund <[email protected]> Fixes: d482a8f "spirv: Update the OpenCL.std.h header" Acked-by: Eric Engestrom <[email protected]>
* etnaviv: remember data offset into BOLucas Stach2019-08-081-0/+1
| | | | | | | | | | Imported resources might not start at offset 0 into the buffer object. Make sure to remember the offset that is provided with the handle on import. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* i965: Emit a dummy MEDIA_VFE_STATE before switching from GPGPU to 3DDanylo Piliaiev2019-08-081-0/+21
| | | | | | | | | | | | | There is an object-level preemption workaround which requires this. However, even without object-level preemption, we seem to have issues with geometry flickering when 3D and compute are combined in the same batch and this appears to fix it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110395 Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: [email protected]
* radv: Avoid VEGA/RAVEN scissor bug in binning.Bas Nieuwenhuizen2019-08-081-1/+2
| | | | | CC: <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Avoid binning RAVEN hangs.Bas Nieuwenhuizen2019-08-081-1/+2
| | | | | | | Mirroring radeonsi. CC: <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Fix off by one for S_028C48_MAX_ALLOC_COUNT.Bas Nieuwenhuizen2019-08-081-1/+1
| | | | Reviewed-by: Dave Airlie <[email protected]>
* swr/rasterizer: modernize thread TLBJan Zielinski2019-08-0814-30/+135
| | | | Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Refactor events collection mechanismJan Zielinski2019-08-0810-439/+382
| | | | | | Several improvements and cleanups in events and statstics mechanisms Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: improvements in simdlibJan Zielinski2019-08-0817-492/+49
| | | | | | | | | | | | | 1. fix build issues with MSVC 2019 compiler The MSVC 2019 compiler seems to have an issue with optimized code-gen when using the _mm256_and_si256() intrinsic. Only disable use of integer vpand on buggy versions MSVC 2019. Otherwise allow use of integer vpand intrinsic. 2. Remove unused vec/matrix functionality Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Events are now grouped and enabled by knobsJan Zielinski2019-08-0815-202/+372
| | | | | | | | | | | | | All events are now grouped as follows: -Framework (i.e. ThreadStart) [always ON] -Api (i.e. SwrSync) [always ON] -Pipeline [default ON] -Shader [default ON] -SWTag [default OFF] -Memory [default OFF] Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: do not mark tiles dirty until actually renderedJan Zielinski2019-08-0813-8/+72
| | | | Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: enable size accumulation in mem statsJan Zielinski2019-08-0811-104/+128
| | | | | | Small refactoring is also performed Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: enable using AOS vertex data formatJan Zielinski2019-08-083-21/+81
| | | | Reviewed-by: Alok Hota <[email protected]>
* v3d: handle wait requirement when retrieving query results correctlyIago Toral Quiroga2019-08-081-2/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* v3d: use the GPU to record primitives written to transform feedbackIago Toral Quiroga2019-08-088-16/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the PRIMITIVE_COUNTS_FEEDBACK packet to write various primitive counts to a buffer, including the number of primives written to transform feedback buffers, which will handle buffer overflow correctly. There are a couple of caveats with this: Primitive counters are reset when we emit a 'Tile Binning Mode Configuration' packet, which can happen in the middle of a primitives query, so we need to read the buffer when we submit a job and accumulate the counts in the context so we don't lose them. We also need to do the same when we switch primitive type during transform feedback so we can compute the correct number of recorded vertices from the number of primitives. This is necessary so we can provide an accurate vertex count for draw from transform feedback. v2: - When computing the number of vertices for a primitive, pass in the base primitive, since that is what the hardware will count. - No need to update primitive counts when switching primitive types if the base primitives are the same. - Log perf warning when mapping the primitive counts BO for readback (Eric). - Only emit the primitive counts packet once at job end (Eric). - Use u_upload mechanism for the primitive counts buffer (Eric). - Use the XML to generate indices into the primitive counters buffer (Eric). Fixes piglit tests: spec/ext_transform_feedback/overflow-edge-cases spec/ext_transform_feedback/query-primitives_written-bufferrange spec/ext_transform_feedback/query-primitives_written-bufferrange-discard spec/ext_transform_feedback/change-size base-shrink spec/ext_transform_feedback/change-size base-grow spec/ext_transform_feedback/change-size offset-shrink spec/ext_transform_feedback/change-size offset-grow spec/ext_transform_feedback/change-size range-shrink spec/ext_transform_feedback/change-size range-grow spec/ext_transform_feedback/intervening-read prims-written Reviewed-by: Eric Anholt <[email protected]>
* gallium/util: add a helper to compute vertex count from primitive countIago Toral Quiroga2019-08-083-1/+91
| | | | | | | | v2: - Only compute vertex counts for base primitives. - Add a unit test (Eric) Reviewed-by: Eric Anholt <[email protected]>
* v3d: be more explicit about the query types supportedIago Toral Quiroga2019-08-081-3/+11
| | | | Reviewed-by: Eric Anholt <[email protected]>