summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium: add AMD-specific compute TGSI enumsMarek Olšák2019-08-126-11/+9
| | | | for tgsi_to_nir
* gallium: add TGSI_PROPERTY_VS_BLIT_SGPRS_AMD for tgsi_to_nirMarek Olšák2019-08-127-15/+14
| | | | needed by radeonsi NIR support
* etnaviv: fix compile warnings in release buildChristian Gmeiner2019-08-122-2/+2
| | | | | | | | | | | | | | | | | [27/31] Compiling C object 'src/gallium/drivers/etnaviv/df32d18@@etnaviv@sta/etnaviv_compiler_nir.c.o'. In file included from ../../src/gitlab_mesa/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c:552: ../../src/gitlab_mesa/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.h: In function 'ra_assign': ../../src/gitlab_mesa/src/gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.h:903:9: warning: unused variable 'ok' [-Wunused-variable] bool ok = ra_allocate(g); ^~ ../../src/gitlab_mesa/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c: In function 'etna_compile_shader_nir': ../../src/gitlab_mesa/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c:663:9: warning: unused variable 'ok' [-Wunused-variable] bool ok = emit_shader(c->nir, &options, &v->num_temps, &num_consts); ^~ Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* iris: reorder arguments as expected by the functionTapani Pälli2019-08-121-2/+2
| | | | | | | | CID: 1452262 Fixes: b4c54894bba "iris: Handle vertex shader with window space position" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Danylo Piliaiev <[email protected]>
* iris/android: move iris_query.c to 'per gen' LIBIRIS_SRC_FILESTapani Pälli2019-08-122-1/+1
| | | | | | | Fixes Iris build on Android. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* iris: Free query on error pathKenneth Graunke2019-08-111-1/+3
| | | | CID: 1452276
* iris: Add missing 'break'Kenneth Graunke2019-08-111-0/+1
| | | | | | We don't want to fall through to unreachable(). CID: 1452277
* spirv: Drop lower_workgroup_access_to_offsetsCaio Marcelo de Oliveira Filho2019-08-101-1/+0
| | | | | | | | Intel drivers are not using this anymore, and turnip still don't have Compute Shaders, so won't make a difference to stop using this option. Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Rob Clark <[email protected]>
* iris: minor restylingKenneth Graunke2019-08-102-35/+42
|
* iris/query: enable amd performance monitorsMark Janes2019-08-091-1/+39
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* iris/perf: get monitor resultsMark Janes2019-08-092-0/+66
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* iris/perf: add begin/end hooksMark Janes2019-08-092-0/+28
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* iris/perf: add delete queryMark Janes2019-08-092-0/+16
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* iris/perf: implement iris_create_monitor_objectMark Janes2019-08-094-0/+110
| | | | | | | | This is the first call that provides the iris context to the monitor implementation. On the first call, use the iris context to initialize the monitor context. Reviewed-by: Kenneth Graunke <[email protected]>
* iris/perf: implement routines to return counter infoMark Janes2019-08-097-1/+360
| | | | | | | With this commit, Iris will report that AMD_performance_monitor is supported, and will allow the caller to query the available metrics. Reviewed-by: Kenneth Graunke <[email protected]>
* vc4: prepare for p_compiler.h dependency removalLionel Landwerlin2019-08-091-0/+2
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* panfrost: Assign varying buffers dynamicallyAlyssa Rosenzweig2019-08-092-36/+23
| | | | | | | | Rather than hardcoding certain varying buffer indices "by convention", work it out at draw time. This added flexibility is needed for futureproofing and will be enable streamout. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Assign indices at draw-timeAlyssa Rosenzweig2019-08-091-8/+63
| | | | | | This will allow us to shuffle buffers. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Break out pan_varyings.cAlyssa Rosenzweig2019-08-094-156/+190
| | | | | | | This code is fairly self-contained, so let's factor it out of the giant pan_context.c monster. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Enable PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERSAlyssa Rosenzweig2019-08-091-0/+2
| | | | | | Just as easy/hard as the rest of XFB. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Import streamout data structuresAlyssa Rosenzweig2019-08-092-1/+24
| | | | | | Pretty much copypasted from v3d to jumpstart us. 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]
* 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]>
* 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]>
* 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]>
* meson: define ETIME to ETIMEDOUT if not presentGreg V2019-08-081-3/+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]>
* anv,i965,iris: deduplicate setting of total_sharedRhys Perry2019-08-081-2/+0
| | | | | | | | 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]>
* 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]>
* 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]>
* 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-087-16/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* v3d: generate packet unpack functionsIago Toral Quiroga2019-08-081-0/+10
| | | | | | | | | These were not being compiled because of the lack of __gen_unpack_address. v2: - Shift raw address correctly (Eric). Reviewed-by: Eric Anholt <[email protected]>
* panfrost: Print errors from kernelTomeu Vizoso2019-08-081-5/+5
| | | | | Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Mark buffers as PANFROST_BO_HEAPTomeu Vizoso2019-08-081-0/+6
| | | | | | | | | | | | What we call GROWABLE in Mesa corresponds to the HEAP BO flag in the kernel. These buffers cannot be memory mapped in the CPU side at the moment, so make sure they are also marked INVISIBLE. This allows us to allocate a big heap upfront (16MB) without actually reserving space unless it's needed. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Mark BOs as NOEXECTomeu Vizoso2019-08-083-2/+10
| | | | | | | | | Unless a BO has the EXECUTABLE flag, mark it as NOEXEC. v2: - Rework version detection (Alyssa). Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Take into account flags when looking up in the BO cacheTomeu Vizoso2019-08-083-3/+5
| | | | | | | | | | | | This will be useful right now so we avoid retrieving a non-executable buffer when a executable one is needed. As we support more flags, this logic will need to be extended to consider the different trade-offs to be made when matching BO specifications to BOs in the cache. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>