summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* turnip: Add a .editorconfig and .dir-locals.elEric Anholt2019-09-273-1/+13
| | | | | | | | | I was inheriting the one from src/freedreno with funny tabs, while this driver is written with normal Mesa 3-space indents. Unfortunately I have to add both files, because I use emacs and emacs prefers .dir-locals to .editorconfig :( Reviewed-by: Kristian H. Kristensen <[email protected]>
* shader_enums: Move MAX_DRAW_BUFFERS to this file.Eric Anholt2019-09-272-7/+4
| | | | | | | | | We include shader_enums.h from freedreno's compiler for both GL and Vulkan, and the main/config.h include resulted in polluting the namespace with things like MAX_VIEWPORTS that other Vulkan drivers use as their driver-specific maximums. Reviewed-by: Kristian H. Kristensen <[email protected]>
* intel/fs: Fix fs_inst::flags_read for ANY/ALL predicatesJason Ekstrand2019-09-271-6/+28
| | | | | | | | | Without this, we were DCEing flag writes because we didn't think their results were used because we didn't understand that an ANY32 predicate actually read all the flags. Fixes: df1aec763eb "i965/fs: Define methods to calculate the flag..." Reviewed-by: Matt Turner <[email protected]>
* etnaviv: support ARB_framebuffer_objectChristian Gmeiner2019-09-271-0/+1
| | | | | | | | Passes most of piglit's tests regarding arb_framebuffer_object and unlocks some more piglit tests. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* etnaviv: etna_resource_copy_region(..): drop assertChristian Gmeiner2019-09-271-3/+0
| | | | | | | | | We are using util_resource_copy_region(..) as fallback which supports different formats for src and dst. Improves the experience when running deqp or piglit with a debug build. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
* meson: Link xvmc with libxvDylan Baker2019-09-272-4/+10
| | | | | | | | | | | Prior to xvmc 1.0.12 libxvmc incorrectly required libxv, but that was fixed. This results in compilation failures for the gallium xvmc tracker and tools. This patch fixes that by explicitly linking to libxv. Fixes: 22a817af8a89eb3c762fc3e07b443a3ce37d7416 ("meson: build gallium xvmc state tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1844 Reviewed-by: Adam Jackson <[email protected]>
* meson: Try finding libxvmcw via pkg-config before using find_libraryDylan Baker2019-09-271-2/+7
| | | | | | | | | | | | This fixes cross compiling issues, because pkg-config is less likely to get the wrong libs. v2: - Fix typo in comment Fixes: 22a817af8a89eb3c762fc3e07b443a3ce37d7416 ("meson: build gallium xvmc state tracker") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/939 Reviewed-by: Adam Jackson <[email protected]>
* drisw: Fix shared memory leak on drawable resizeAndreas Gottschling2019-09-271-0/+2
| | | | | | | | | XDestroyImage will mark the segment as to-be-destroyed, but it will persist until we detach it, and we weren't doing so. Cc: [email protected] Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/121 Reviewed-by: Adam Jackson <[email protected]>
* drisw: Fix and simplify drawable setupAdam Jackson2019-09-272-36/+7
| | | | | | | | | | | | | | | | | | We don't want to require a visual for the drawable, because there exist fbconfigs that don't correspond to any visual (say a 565 pixmap|pbuffer config on a depth-24 display). Fortunately, we don't need one either. Passing the visual to XCreateImage serves only to fill in the XImage's {red,green,blue}_mask fields, which libX11 itself never uses, they exist only for the client's convenience, and we don't care. And we already have the drawable depth in glx_config::rgbBits. So replace the XVisualInfo field in the drawable private with a pointer to the glx_config. Having done that driswCreateGCs becomes trivial, so inline it into its caller. Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1194 Reviewed-by: Eric Anholt <[email protected]>
* drisw: Simplify GC setupAdam Jackson2019-09-272-26/+4
| | | | | | | | | | There's no reason to have two GCs here. The only difference between them is that swapgc would generate graphics exposures, except we only ever use this GC for PutImage, and PutImage doesn't generate graphics exposures. We also don't need to explicitly ChangeGC to GXCopy, because that's the default. Reviewed-by: Eric Anholt <[email protected]>
* turnip: Add todo for d24_s8 copiesBas Nieuwenhuizen2019-09-271-0/+1
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Disallow NPoT formats.Bas Nieuwenhuizen2019-09-271-10/+18
| | | | | | | Copying is a mess for these formats for now. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Always use UINT formats for copies.Bas Nieuwenhuizen2019-09-271-3/+29
| | | | | | | | | | | | | | Looks like r16_unorm might have precision issues. dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.r16_unorm.r16_unorm.general_general fails, but the dumped images in the xml are the same so I'd guess the low bits are the issue. r8_unorm and r16_uint work. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Add image->image blitting.Bas Nieuwenhuizen2019-09-271-14/+165
| | | | | | | 3D blits & format reinterpretation are still TBD. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* aco: don't remove the loop exec mask in transition_to_Exact()Rhys Perry2019-09-271-1/+5
| | | | | | | No pipeline-db changes. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: set loop_info::has_discard for demotesRhys Perry2019-09-273-5/+9
| | | | | | | | We need the loop header phis for the outer exec masks. Needed for dEQP-VK.glsl.demote.dynamic_loop_texture Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* iris: Only resolve for image levels/layers which are actually in use.Kenneth Graunke2019-09-262-17/+12
| | | | There's no need to resolve everything.
* lima/ppir: add NIR pass to split varying loadsVasily Khoruzhick2019-09-265-0/+127
| | | | | | | | | | | | | | | NIR may emit a single instrinsic to load several packed varyings, but that's suboptimal for Utgard PP for several reasons: - varyings that are used as sampler inputs can be passed using pipeline register with increased precision - we have small number of regs, so using a vec4 regs for storing two vec2 varyings increases reg pressure. Add NIR pass to split a single load into several loads and utilize it in lima. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* radv: Fix L2 cache rinse programming.Timur Kristóf2019-09-261-5/+9
| | | | | | | | According to radeonsi, GLM doesn't support WB alone, so we have to set INV too when WB is set. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* turnip: emit texture and uniform stateJonathan Marek2019-09-262-15/+339
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: add some shader information in pipeline stateJonathan Marek2019-09-262-0/+32
| | | | | | | | This information is needed by texture/uniform descriptors. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: use nir_opt_copy_prop_varsJonathan Marek2019-09-261-0/+2
| | | | | | | | | | | Avoids getting a "load_output" in a case like this: gl_Position = ubuf.MVP * ubuf.position[gl_VertexIndex]; frag_pos = gl_Position.xyz; Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: lower samplers and uniform buffer indicesJonathan Marek2019-09-262-0/+147
| | | | | | | | | Lower these to something compatible with ir3, and save the descriptor set and binding information. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: basic descriptor sets (uniform buffer and samplers)Jonathan Marek2019-09-262-102/+430
| | | | | | | | Mostly copy-paste from radv, with a few modifications. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: enable linear filteringJonathan Marek2019-09-261-2/+2
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: align layer_sizeJonathan Marek2019-09-261-1/+1
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: use linear tiling for scanout imageJonathan Marek2019-09-261-2/+9
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: implement image view descriptorJonathan Marek2019-09-262-2/+90
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: implement sampler stateJonathan Marek2019-09-262-0/+73
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: fix vertex_idJonathan Marek2019-09-261-1/+1
| | | | | | | | ir3 uses non-zero based vertex id for a6xx Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* turnip: emit shader immediatesJonathan Marek2019-09-261-0/+37
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]>
* util/rb_tree: Stop relying on &iter->field != NULLJason Ekstrand2019-09-261-41/+28
| | | | | | | | | | | | The old version of the iterators relies on a &iter->field != NULL check which works fine on older GCC but newer GCC versions and clang have optimizations that break if you do pointer math on a null pointer. The correct solution to this is to do the null comparisons before we do any sort of &iter->field or use rb_node_data to do the reverse operation. Acked-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* util/rb_tree: Also test _safe iteratorsJason Ekstrand2019-09-261-0/+42
| | | | | | Acked-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* freedreno/a3xx: Mostly fix min-vs-mag filtering decisions on non-mipmap tex.Eric Anholt2019-09-262-73/+12
| | | | | | | | | This is based on the fix I used for the same problem on V3D. In this case, it fixes all but the the dEQP-GLES2.functional.texture.filtering.2d.*_npot cases of dEQP-GLES2.functional.texture.filtering.2d.*'s failures. Acked-by: Rob Clark <[email protected]>
* intel/compiler: avoid truncating int64_t to intMaya Rashish2019-09-261-1/+1
| | | | | Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Maya Rashish <[email protected]>
* lima: support rectangle textureIcenowy Zheng2019-09-264-3/+9
| | | | | | | | | | | | | | As Vasily discovered, the bit 7 of the word 1 of the texture descriptor is set when reloading the framebuffer, to use framebuffer-based offset rather than normalized one. This bit also works for regular textures to enable accessing with non-normalized offset. Add support for rectangle texture by setting this bit for PIPE_TEXTURE_RECT. Suggested-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* loader: Avoid use-after-free / use of uninitialized local variablesMichel Dänzer2019-09-261-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the valgrind output below, we were returning the pointer to freed memory if none of the later conditional pointer assignments were executed. This caused dEQP CI jobs to crash on certain runners, presumably due to a double-free down the line. Also, we were skipping to the out: label before the vendor_id & chip_id variables used by it were initialized, resulting in broken LIBGL_DEBUG=verbose output such as libGL: pci id for fd 4: 51108f00:51108f00, driver radeonsi Fixes: 5a545e355b23 "loader: always map the "amdgpu" kernel driver name to radeonsi (v2)" ==403== Invalid read of size 1 ==403== at 0x4AFD576: surfaceless_probe_device (platform_surfaceless.c:316) ==403== by 0x4AFD915: dri2_initialize_surfaceless (platform_surfaceless.c:391) ==403== by 0x4AF5EEA: dri2_initialize (egl_dri2.c:984) ==403== by 0x4AF5EEA: dri2_initialize (egl_dri2.c:958) ==403== by 0x4AF1EEC: _eglMatchAndInitialize (egldriver.c:75) ==403== by 0x4AF1F3B: _eglMatchDriver (egldriver.c:96) ==403== by 0x4AE9367: eglInitialize (eglapi.c:617) ==403== by 0x1D99C9: tcu::surfaceless::EglRenderContext::EglRenderContext(glu::RenderConfig const&, tcu::CommandLine const&) [clone .constprop.57] (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x1DABB0: tcu::surfaceless::ContextFactory::createContext(glu::RenderConfig const&, tcu::CommandLine const&, glu::RenderContext const*) const (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x53EBD1: glu::createRenderContext(tcu::Platform&, tcu::CommandLine const&, glu::RenderConfig const&, glu::RenderContext const*) (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x53EFE9: glu::createDefaultRenderContext(tcu::Platform&, tcu::CommandLine const&, glu::ApiType) (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x1DE07A: deqp::gles2::Context::Context(tcu::TestContext&) (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x1DB5EF: deqp::gles2::TestPackage::init() (in /deqp/modules/gles2/deqp-gles2) ==403== Address 0x56bd340 is 0 bytes inside a block of size 4 free'd ==403== at 0x48369AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==403== by 0x4B01767: loader_get_driver_for_fd (loader.c:464) ==403== by 0x4AFD553: surfaceless_probe_device (platform_surfaceless.c:308) ==403== by 0x4AFD915: dri2_initialize_surfaceless (platform_surfaceless.c:391) ==403== by 0x4AF5EEA: dri2_initialize (egl_dri2.c:984) ==403== by 0x4AF5EEA: dri2_initialize (egl_dri2.c:958) ==403== by 0x4AF1EEC: _eglMatchAndInitialize (egldriver.c:75) ==403== by 0x4AF1F3B: _eglMatchDriver (egldriver.c:96) ==403== by 0x4AE9367: eglInitialize (eglapi.c:617) ==403== by 0x1D99C9: tcu::surfaceless::EglRenderContext::EglRenderContext(glu::RenderConfig const&, tcu::CommandLine const&) [clone .constprop.57] (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x1DABB0: tcu::surfaceless::ContextFactory::createContext(glu::RenderConfig const&, tcu::CommandLine const&, glu::RenderContext const*) const (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x53EBD1: glu::createRenderContext(tcu::Platform&, tcu::CommandLine const&, glu::RenderConfig const&, glu::RenderContext const*) (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x53EFE9: glu::createDefaultRenderContext(tcu::Platform&, tcu::CommandLine const&, glu::ApiType) (in /deqp/modules/gles2/deqp-gles2) ==403== Block was alloc'd at ==403== at 0x483577F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==403== by 0x4EE5E09: strndup (strndup.c:43) ==403== by 0x4B010B1: loader_get_kernel_driver_name (loader.c:101) ==403== by 0x4B016AF: loader_get_driver_for_fd (loader.c:462) ==403== by 0x4AFD553: surfaceless_probe_device (platform_surfaceless.c:308) ==403== by 0x4AFD915: dri2_initialize_surfaceless (platform_surfaceless.c:391) ==403== by 0x4AF5EEA: dri2_initialize (egl_dri2.c:984) ==403== by 0x4AF5EEA: dri2_initialize (egl_dri2.c:958) ==403== by 0x4AF1EEC: _eglMatchAndInitialize (egldriver.c:75) ==403== by 0x4AF1F3B: _eglMatchDriver (egldriver.c:96) ==403== by 0x4AE9367: eglInitialize (eglapi.c:617) ==403== by 0x1D99C9: tcu::surfaceless::EglRenderContext::EglRenderContext(glu::RenderConfig const&, tcu::CommandLine const&) [clone .constprop.57] (in /deqp/modules/gles2/deqp-gles2) ==403== by 0x1DABB0: tcu::surfaceless::ContextFactory::createContext(glu::RenderConfig const&, tcu::CommandLine const&, glu::RenderContext const*) const (in /deqp/modules/gles2/deqp-gles2) Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* Revert "glx: Lift sending the MakeCurrent request to top-level code"Adam Jackson2019-09-262-187/+167
| | | | | | | | | Apparently this provokes crashes elsewhere in code unrelated to MakeCurrent. I hate GLX so very very much. This reverts commit 999c2aed8826f403b071f52b040ce25b56d35f9d. Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1207
* Revert "glx: Implement GLX_EXT_no_config_context"Adam Jackson2019-09-2612-65/+26
| | | | | | This reverts commit 0d635ccc912d7122f35f81eec27d8b2c0a2a7a28. Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1207
* radv: Add debug option to dump meta shaders.Timur Kristóf2019-09-263-2/+6
| | | | | | | | This new option can help debug shader compiler problems when there are issues with the meta shaders. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: Introduce ac_get_fs_input_vgpr_cnt.Timur Kristóf2019-09-264-73/+63
| | | | | | | | | | | Add a function called ac_get_fs_input_vgpr_cnt which will return the number of input VGPRs used by an AMD shader. Previously, radv and radeonsi had the same code duplicated, but this commit also allows them to share this code. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radv: Set shared VGPR count in radv_postprocess_config.Timur Kristóf2019-09-262-2/+18
| | | | | | | | This commit allows RADV to set the shared VGPR count according to the shader config. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* amd/common: Add num_shared_vgprs to ac_shader_config for GFX10.Timur Kristóf2019-09-262-0/+20
| | | | | | | | | In GFX10 wave64 mode, shared VGPRs allow the two wave halves to share some data with each other. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: Extract some helper functions to ac_shader_util.Timur Kristóf2019-09-265-117/+131
| | | | | | | | | | This commit moves ac_get_tbuffer_format, ac_get_sampler_dim and ac_get_image_dim into ac_shader_util, thus enabling them to be used by compilers other than LLVM. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* amd/common: Move ac_export_mrt_z to ac_llvm_build.Timur Kristóf2019-09-264-75/+76
| | | | | | | | | The aim of this commit is to keep ac_shader_util LLVM-free, since we would like to use it in ACO later. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* aco: CSE readlane/readfirstlane/permute/reduce with the same exec maskRhys Perry2019-09-262-9/+37
| | | | | | | | | | v2: rename pass_temp to pass_flags v2: also CSE reductions v3: add ds_swizzle_b32 support v3: check gds/offset0/offset1 fields Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: don't CSE v_readlane_b32/v_readfirstlane_b32Rhys Perry2019-09-261-0/+4
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco,radv: rename record_llvm_ir/llvm_ir_string to record_ir/ir_stringRhys Perry2019-09-266-18/+18
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/aco: return a correct name and description for the backend IRRhys Perry2019-09-263-2/+9
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* aco: store printed backend IR in binaryRhys Perry2019-09-261-4/+21
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>