aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: Implement remaining texture wrap modesAlyssa Rosenzweig2019-12-273-6/+24
| | | | | | | | Somehow we have native hardware for all of these. Suspected by staring at the bit pattern; confirmed by poking in various texture wrap modes into the textures mesa demo and seeing what happens. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Inline away MALI_NEGATIVEAlyssa Rosenzweig2019-12-272-9/+5
| | | | | | It's an awfully fancy way to add one... Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Remove MALI_ATTR_INTERNALAlyssa Rosenzweig2019-12-272-3/+0
| | | | | | | It's a relic from before we understood the varying builtins. It should never actually come up if the builtins are decoded correctly. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Update information on fixed attributes/varyingsAlyssa Rosenzweig2019-12-271-3/+2
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Remove MALI_SPECIAL_ATTRIBUTE_BASE definesAlyssa Rosenzweig2019-12-271-5/+0
| | | | | | | | | These are conventions by the blob (a convention we happent to follow). They are not at all intrinsic to the hardware, so now that the convention is implemented within the Midgard stack, these defines are wholly unused. Remove them. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Fix minor typoAlyssa Rosenzweig2019-12-271-1/+1
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Reported-by: Erik Faye-Lund <[email protected]>
* android: radv: build radv_shader_args.cMauro Rossi2019-12-271-0/+2
| | | | | | | | | | | | Updates radv Makefile.sources and fixes the following building error: external/mesa/src/amd/vulkan/radv_shader.c:1122: error: undefined reference to 'radv_declare_shader_args' Fixes: 3b14336 ("ac/nir, radv, radeonsi: Switch to using ac_shader_args") Fixes: 66c703b ("radv: Move argument declaration out of nir_to_llvm") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* android: radeonsi,ac: fix building error due to ac changesMauro Rossi2019-12-271-0/+2
| | | | | | | | | | | | | Updates amd Makefile.sources and fixes the following building errors: external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:338: error: undefined reference to 'ac_add_arg' external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:340: error: undefined reference to 'ac_add_arg' external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:341: error: undefined reference to 'ac_add_arg' external/mesa/src/gallium/drivers/radeonsi/si_compute_prim_discard.c:342: error: undefined reference to 'ac_add_arg' Fixes: 9885af3 ("ac: Add a shared interface between radv, radeonsi, LLVM and ACO") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* android: radv: fix vk_format_table.c generated source buildMauro Rossi2019-12-271-0/+1
| | | | | | | | | | | | | | | | | | | | | RADV Android build rules are now getting the wrong vk_format.h from src/vulkan/util include, the simplest way to fix is to add src/amd/vulkan include prior to src/vulkan/util include Fixes the following building errors: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_radv_common_intermediates/vk_format_table.c:39:4: error: use of undeclared identifier 'VK_FORMAT_LAYOUT_PLAIN' ... out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_radv_common_intermediates/vk_format_table.c:131:8: error: use of undeclared identifier 'VK_FORMAT_TYPE_UNSIGNED'; did you mean 'UTIL_FORMAT_TYPE_UNSIGNED'? {VK_FORMAT_TYPE_UNSIGNED, true, false, false, 4, 0}, /* x = a */ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. Fixes: 3a28281 ("util: Add a mapping from VkFormat to PIPE_FORMAT.") Signed-off-by: Mauro Rossi <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* android: util: Add a mapping from VkFormat to PIPE_FORMAT.Mauro Rossi2019-12-272-1/+3
| | | | | | | | | | | | | | | Updates Makefile.sources and fixes the following building error: In file included from external/mesa/src/vulkan/util/vk_format.c:24: In file included from external/mesa/src/vulkan/util/vk_format.h:28: external/mesa/src/util/format/u_format.h:33:10: fatal error: 'pipe/p_format.h' file not found #include "pipe/p_format.h" ^~~~~~~~~~~~~~~~~ 1 error generated. Fixes: 3a28281 ("util: Add a mapping from VkFormat to PIPE_FORMAT.") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* android: nir: add a load/store vectorization passMauro Rossi2019-12-271-0/+1
| | | | | | | | | | | Fixes the following aco building error: external/mesa/src/amd/compiler/aco_instruction_selection_setup.cpp:846: error: undefined reference to 'nir_opt_load_store_vectorize' Fixes: ce9205c ("nir: add a load/store vectorization pass") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* llvmpipe: add debug option to enable OpenCL support.Dave Airlie2019-12-272-2/+5
| | | | | | LP_DEBUG=cl will enable CL support for now. Acked-by: Roland Scheidegger <[email protected]>
* gallivm/nir: add vec8/16 supportDave Airlie2019-12-271-2/+4
| | | | Acked-by: Roland Scheidegger <[email protected]>
* gallivm/nir: lower packingDave Airlie2019-12-271-0/+1
| | | | | | | This fixes some CL upsample tests, which lower into packing that needs lowering. Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe: lower hadd/add_satDave Airlie2019-12-271-0/+2
| | | | | | Fixes some CL piglits. Acked-by: Roland Scheidegger <[email protected]>
* gallivm: handle non-32 bit undefinedDave Airlie2019-12-271-1/+2
| | | | | | other sized undefs caused llvm asserts Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe/nir: use nir_max_vec_components in more placesDave Airlie2019-12-273-46/+46
| | | | | | This is prep work for when vec8/16 have landed. Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe: add support for compute shader paramsDave Airlie2019-12-271-5/+55
| | | | Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe: handle serialized nir as a shader type.Dave Airlie2019-12-272-4/+19
| | | | Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for global operations.Dave Airlie2019-12-276-0/+332
| | | | Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for block size intrinsicDave Airlie2019-12-274-3/+24
| | | | | | | We have to pass the main block size into the coroutine and into the shader. Acked-by: Roland Scheidegger <[email protected]>
* gallivm/llvmpipe: add support for work dimension intrinsic.Dave Airlie2019-12-275-16/+31
| | | | | | We have to pass the work_dim given by the user into the shader. Acked-by: Roland Scheidegger <[email protected]>
* tgsi/mesa: handle KERNEL caseDave Airlie2019-12-271-0/+1
| | | | | | Translate to compute for now. Acked-by: Roland Scheidegger <[email protected]>
* gallivm/nir: allow 8/16-bit conversion and comparison.Dave Airlie2019-12-271-3/+29
| | | | | | This adds the convert to 8/16 and support for 8/16 comparsions Acked-by: Roland Scheidegger <[email protected]>
* gallivm: pick integer builders for alu instructions.Dave Airlie2019-12-271-17/+46
| | | | | | This allows these to be used with non 32-bit types. Acked-by: Roland Scheidegger <[email protected]>
* gallivm: add support for 8-bit/16-bit integer buildersDave Airlie2019-12-273-14/+68
| | | | Acked-by: Roland Scheidegger <[email protected]>
* llvmpipe/gallivm: add kernel inputsDave Airlie2019-12-278-3/+90
| | | | | | compute shaders need kernel input support Acked-by: Roland Scheidegger <[email protected]>
* gallivm: add 64-bit const int creator.Dave Airlie2019-12-271-0/+5
| | | | Acked-by: Roland Scheidegger <[email protected]>
* nir: sanitize work group intrinsics to always be 32-bit.Dave Airlie2019-12-271-0/+4
| | | | | | This saves handling them in the backend later. Reviewed-by: Karol Herbst <[email protected]>
* radv: Expose all sample counts for integer formats as well.Bas Nieuwenhuizen2019-12-261-1/+1
| | | | | | | | Things work the same between float and integer. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2261 CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* panfrost: Route gl_VertexID through cmdstreamAlyssa Rosenzweig2019-12-244-4/+60
| | | | | | | | | | | It shows up as a special (magic?) attribute. We could try to be clever and only include the extra record if gl_VertexID is actually read, but honestly that's just extra complexity for no good reason. Might as well just always include it; this won't be a real bottleneck, I don't think. Fixes dEQP-GLES3.functional.shaders.builtin_variable.vertex_id. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Extend attribute_count for vertex builtinsAlyssa Rosenzweig2019-12-241-0/+10
| | | | | | | They stretch beyond the usual limit for attributes so are included implicitly. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Lower gl_VertexID/gl_InstanceID to attributesAlyssa Rosenzweig2019-12-242-0/+35
| | | | | | | We have special records for these, put in a fixed location by convention per the blob. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Factor out emit_attr_readAlyssa Rosenzweig2019-12-241-24/+33
| | | | | | We will load attributes directly for gl_VertexID. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Unset vertex_id_zero_basedAlyssa Rosenzweig2019-12-242-2/+0
| | | | | | We don't want the lowering; we have native gl_VertexID. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Handle gl_VertexID/gl_InstanceIDAlyssa Rosenzweig2019-12-243-23/+47
| | | | | | | | | Just like varyings have special records for point coordinates (etc), attributes have special records for vertex/instance ID. We can parse these fairly easily, although they don't line up exactly with normal attribute records. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Remove pan_shift_oddAlyssa Rosenzweig2019-12-243-95/+22
| | | | | | | | | | | | | | | | | Padded counts are numbers of the form: n = (2k + 1) * 2^s for k, s integers. Rather than explicitly store k and s separately and then compute this formula on demand, it's much cleaner to store the padded number itself, which is what you manipulate most of the time. When you do need k,s it is easy to factor by noticing the bitwise representation: s = ctz(n) k = n >> (s + 1) Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Slight cleanup of Gallium's pan_attribute.cAlyssa Rosenzweig2019-12-241-5/+2
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Fix reference computation for invocationsAlyssa Rosenzweig2019-12-241-4/+3
| | | | | | | Slight bug with instancing. No harm done but let's get rid of the pandecode warning, it's just noise. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Fix off-by-one in pan_invocation.cAlyssa Rosenzweig2019-12-241-13/+9
| | | | | | When instance_count=2, the packing code was broken. Fixes a dEQP test. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Factor out panfrost_compute_magic_divisorAlyssa Rosenzweig2019-12-241-30/+41
| | | | | | | | The algorithm doesn't need to be tangled up in details about the attribute records themselves. We'll need to compute magic divisors for gl_InstanceID in a second. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Move instancing routines to encoder/Alyssa Rosenzweig2019-12-246-238/+257
| | | | | | Nothing Gallium specific or stateful about them. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Factor batch/resource out of instancing routinesAlyssa Rosenzweig2019-12-241-19/+10
| | | | | | | They don't need them; this will allow us to move the code into encoder/ which in turn will make the messy Gallium code less scary. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Rename pan_instancing.c -> pan_attributes.cAlyssa Rosenzweig2019-12-243-2/+2
| | | | | | | Let's follow the naming convention that panfrost command stream code is organized by command stream structure. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Compute destination overrideAlyssa Rosenzweig2019-12-241-7/+25
| | | | | | We shift over the mask in this case. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Add mir_upper_override helperAlyssa Rosenzweig2019-12-242-0/+30
| | | | | | Checks if we should emit a dest_override=upper, given a mask. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Support loads from R11G11B10 in a blend shaderAlyssa Rosenzweig2019-12-241-3/+27
| | | | Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/midgard: Enable lower_(un)pack_* loweringAlyssa Rosenzweig2019-12-242-2/+13
| | | | | | | These show up in some blend shaders. Let's use the shared lowering and remove our own. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Increase PIPE_SHADER_CAP_MAX_OUTPUTS to 16Tomeu Vizoso2019-12-241-1/+1
| | | | | | | | GL ES 3.0 requires it to be higher, and stuff seems to work just fine. Fixes: dEQP-GLES3.functional.implementation_limits.max_vertex_output_components Signed-off-by: Tomeu Vizoso <[email protected]>
* panfrost: Handle Z24_UNORM_S8_UINT as MALI_Z32_UNORMTomeu Vizoso2019-12-241-0/+1
| | | | | | Fixes dEQP-GLES3.functional.texture.format.sized.2d.depth24_stencil8_pot Signed-off-by: Tomeu Vizoso <[email protected]>