summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: Refactor blend infrastructureAlyssa Rosenzweig2019-07-109-202/+455
| | | | | | | We would like to permit keying blend shaders against the framebuffer format, which requires some new blending abstractions. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Use unsigned blend patch offsetAlyssa Rosenzweig2019-07-101-1/+1
| | | | | | | We would like the offset field to be unsigned, letting 0 represent "no offset" and positive represent an offset. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Handle pure int formatsAlyssa Rosenzweig2019-07-101-14/+26
| | | | | | | | | | | | | I'm not sure I'm totally comfortable with this, but conceptually neither float nor pure-int formats require any format conversion, except size conversion. Going from a shaderable format (fp32 or i16, for instance) into a blendable format (fp16) is a separate question, one we can defer momentarily while we're not interested in actually blending. As an aside, I'd be fascinated by an integer-based blending implementation. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/mfbd: Handle pure int formatsAlyssa Rosenzweig2019-07-101-4/+16
| | | | | | | We see that the render target itself turns out to be typeless (surprise!) Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Set rt_count_2 for bpp>4 formatsAlyssa Rosenzweig2019-07-101-0/+7
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Implement preliminary float convertersAlyssa Rosenzweig2019-07-101-7/+33
| | | | | | | We'll need some careful handling, but for now, get some baseline code out for handling float formats in a blend shader. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Skip blend for REPLACE (shader)Alyssa Rosenzweig2019-07-101-0/+23
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Handle "blend disabled" blend shadersAlyssa Rosenzweig2019-07-101-12/+22
| | | | | | | | Normally, disabled blend can definitely be fixed-function'd away, but if a blend shader is used merely for format conversion rather than blending, this code path can be nevertheless hit. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Route format through fixed-function blendingAlyssa Rosenzweig2019-07-103-8/+51
| | | | | | Not all framebuffer formats are supported by the fixed-function blender. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Pipe framebuffer format aroundAlyssa Rosenzweig2019-07-105-7/+21
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Use Gallium framebuffer formatsAlyssa Rosenzweig2019-07-101-4/+37
| | | | | | | | | Ideally, we would keep Galliumisms far away from the compiler; unfortunately, Mesa hasn't standardized on system of format codes to be shared across APIs and across drivers, so using Gallium formats is our best bet in the short run. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Use fp16 exclusively while blendingAlyssa Rosenzweig2019-07-102-9/+9
| | | | | | | | | We now have some preliminary fp16 support available. We're not able to expose this for GLSL quite yet, but for internal blend shaders, we're able to do control bitness ourselves just fine. So let's fp16 that stuff! Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Remove opt_copy_prop_texAlyssa Rosenzweig2019-07-101-50/+0
| | | | | | | | Eventually this should be replaced by proper tex RA / not emitting so many silly moves to begin with / better general copy prop. For now remove it since it breaks things. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Fix scalarificationAlyssa Rosenzweig2019-07-102-5/+25
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Handle fp16 in embedded_to_inline_constantsAlyssa Rosenzweig2019-07-101-1/+8
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Eliminate redundant type convertAlyssa Rosenzweig2019-07-101-0/+3
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Fix fp16 embedded constantsAlyssa Rosenzweig2019-07-101-0/+19
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Hoist mask fieldAlyssa Rosenzweig2019-07-107-80/+70
| | | | | | | | | | Share a single mask field in midgard_instruction with a unified format, rather than using separate masks for each instruction tag with hardware-specific formats. Eliminates quite a bit of duplicated code and will enable vec8/vec16 masks as well (which don't map as cleanly to the hardware as we might like). Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Allow fp16 in scalar ALUAlyssa Rosenzweig2019-07-102-16/+52
| | | | | | The packing is a little different, so implement that. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Implement f2u16 and friendsAlyssa Rosenzweig2019-07-102-1/+6
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Implement f2f16/f2f32Alyssa Rosenzweig2019-07-103-3/+27
| | | | | | These conversions handle half-floats within the shader. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Verify src_bitsize == dst_bitsizeAlyssa Rosenzweig2019-07-101-4/+5
| | | | | | | We can handle differing, but we'd prefer not to because there are restrictions on sizing which aren't accounted for yet. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Simplify blend readAlyssa Rosenzweig2019-07-101-23/+5
| | | | | | | It's not clear where the extra indirection was from (older hardware or just older blobs?) Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: NIRify blend load scale/convertAlyssa Rosenzweig2019-07-102-54/+8
| | | | | | | | The scale and type-convert can now be expressed in NIR, rather than MIR, which is significantly more maintainable and demonstrates correctness of the type conversion patches. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Fix blend constant scheduling bugAlyssa Rosenzweig2019-07-101-0/+4
| | | | | | Blend constant conflicts run in two directions. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Implement upscaling type convertsAlyssa Rosenzweig2019-07-101-14/+59
| | | | | | | | Rather than using a dest_override, we upscale integers by using a half field with a sign-extend bit. A variant of this trick should also work for floats, but one step at a time! Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Move blend load/store into NIRAlyssa Rosenzweig2019-07-102-78/+65
| | | | | | | | | We have dedicated intrinsics to access the raw contents of the tile buffer so we can use a dedicated NIR pass to lower appropriately for blend shaders, rather than introducing a bizarre hardcoded blend epilogue that only works for RGBA8_UNORM. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Use nir_dest_num_componentsAlyssa Rosenzweig2019-07-101-1/+1
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Implement integer downsize opsAlyssa Rosenzweig2019-07-102-3/+62
| | | | | | | | | | | | | | | | | | Oh, dear. No turning back now. We begin implementing non-32-bit types, using downsizing integer type conversions as the initial instructions. We implement them naively as type-converting moves; substantially more efficient operation is possible by copypropping the type conversion modifier, but this optimization is not implemented here. Size converting modifiers on Midgard allow an instruction to write to a destination 1/2 the size, or to read from a source 1/2 the size. If we need an extreme conversion (32-bit to 8-bit, for instance), multiple type converting ops are chained together, which here is handled via an algebraic pass. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Move scale from MIR to NIRAlyssa Rosenzweig2019-07-102-10/+7
| | | | | | | This begins the process of removing blend shader specific MIR into a more general NIR lowering pass for formats. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/midgard: Passthrough nir_lower_framebufferAlyssa Rosenzweig2019-07-104-0/+108
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Extend clear colour packingAlyssa Rosenzweig2019-07-104-26/+94
| | | | | | | | | | | Eventually, this will allow packing clear colours for all formats, including floating-point framebuffers, pure integer buffers, and special formats. Currently, a few of these formats are supported, and many more are handled through a generic Gallium colour packing path (which is not a perfect fit for the hardware, but works for many formats and is a sane default for the moment.) Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost/mfbd: Include codes for float framebuffersAlyssa Rosenzweig2019-07-101-1/+28
| | | | | | | | | We see the hardware doesn't actually support float framebuffers in the native sense -- rather, it just allows higher bpp framebuffers and lets a blend shader / additional clear_color fields sort out the formats. This will be.. interesting. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Prepare some code for MRTAlyssa Rosenzweig2019-07-101-26/+13
| | | | | | | | Full MRT support is a while away, but in the mean time, we can remove code that explicitly assumes nr_cbufs <= 0, to minimize the obstacles we'll face later when we add the whole thing. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Use standard ALIGN_POT/INFINITY macrosAlyssa Rosenzweig2019-07-105-25/+19
| | | | | | We had vendored duplicates from pre-Mesa days; clean that up. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* egl: add glvnd symbols checkEric Engestrom2019-07-102-1/+2
| | | | | | | | | | | | | According to the spec [1], `__egl_Main` is the only symbol that needs to be exported. We don't want applications directly linking against libEGL_mesa.so (apps should always go through libEGL.so, regardless of who is providing it), so we shouldn't export any other symbols either. [1] https://github.com/NVIDIA/libglvnd/blob/master/include/glvnd/libeglabi.h (this header is the closest there is to a spec) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: rewrite entrypoints checkEric Engestrom2019-07-103-13/+38
| | | | | | | | | | Part of the effort to replace shell scripts with portable python scripts. I could've used a trivial `assert lines == sorted(lines)`, but this way the caller is shown which entrypoint is out of order. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mapi: add shared glapi symbols checkEric Engestrom2019-07-102-0/+31
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* tu: add exported symbols checkEric Engestrom2019-07-101-0/+13
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* vulkan: add symbols fileEric Engestrom2019-07-102-0/+15
| | | | | | | | | | | | | | | According to the Vulkan ICD spec [1], these two symbols must be exposed: - vk_icdGetInstanceProcAddr - vk_icdNegotiateLoaderICDInterfaceVersion and this one is optional: - vk_icdGetPhysicalDeviceProcAddr [1] https://github.com/KhronosGroup/Vulkan-Loader/blob/master/loader/LoaderAndLayerInterface.md Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gles: use new symbols check scriptEric Engestrom2019-07-104-62/+14
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: sort symbolsEric Engestrom2019-07-101-22/+22
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* gbm: use new symbols check scriptEric Engestrom2019-07-102-22/+6
| | | | | | | | | Note: the list in gbm-symbols.txt is the same as the one that was in gbm-symbols-check, I just took the opportunity to sort it. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: use new symbols check scriptEric Engestrom2019-07-102-30/+10
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* nv50/ir/nir: implement load/store_globalKarol Herbst2019-07-101-0/+36
| | | | | | | | | required by OpenCL v2: fix setting globalAccess Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: handle kernel inputsKarol Herbst2019-07-101-3/+18
| | | | | | | required by OpenCL Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: don't assert on !mainKarol Herbst2019-07-101-2/+0
| | | | | | | required for OpenCL Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nv50/ir/nir: parse system values first and stop for compute shadersKarol Herbst2019-07-101-29/+32
| | | | | | | required by OpenCL Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Pierre Moreau <[email protected]>
* nir/lower_io: Don't use variable to get deref modeConnor Abbott2019-07-101-2/+3
| | | | | | | | | | | | | | | Drivers only use lower_io for modes where pointers don't have a meaningful value, and dereferences can always be traced back to a variable. But there can be other modes, like global mode with VK_EXT_buffer_device_address, where pointers cannot be traced back to a variable, and lower_io would segfault on loads/stores of these since nir_deref_instr_get_variable() would return NULL. Just use the mode on the deref itself to filter out these modes before we try to get the variable. Fixes: 118a66df990 ("radv: Use NIR barycentric coordinates") Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Don't optimize after lowering FS inputsConnor Abbott2019-07-101-1/+0
| | | | | | | | | | | | | | | | | Currently this is done rather late in radv, after lowering booleans, so it isn't safe to run additional optimizations that may add e.g. 1-bit booleans. We could move the lowering parts earlier, but since right now we only lower FS inputs and by this point all indirects have been lowered away, there's no reason we should need to optimize anything. One shader from Devil May Cry 5 was getting optimized, but only because the optimization loop was working on 32-bit booleans which revealed an opportunity that was hidden with 1-bit booleans, and we generated a 1-bit boolean which is invalid. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111092 Fixes: 118a66df9907772bb9e5503b736c95d7bb62d52c Reviewed-by: Bas Nieuwenhuizen <[email protected]>