asahi,agx: move texture lowering into the compiler
this untangles things for precomp. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32320>
This commit is contained in:
committed by
Marge Bot
parent
2c17df7010
commit
ae8e45e19c
@@ -8,6 +8,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
struct nir_shader;
|
||||
struct nir_instr;
|
||||
|
||||
bool agx_nir_lower_address(struct nir_shader *shader);
|
||||
bool agx_nir_lower_algebraic_late(struct nir_shader *shader);
|
||||
@@ -21,3 +22,8 @@ bool agx_nir_lower_layer(struct nir_shader *s);
|
||||
bool agx_nir_lower_clip_distance(struct nir_shader *s);
|
||||
bool agx_nir_lower_subgroups(struct nir_shader *s);
|
||||
bool agx_nir_lower_fminmax(struct nir_shader *s);
|
||||
|
||||
bool agx_nir_lower_texture_early(struct nir_shader *s, bool support_lod_bias);
|
||||
bool agx_nir_lower_texture(struct nir_shader *s, bool support_rgb32);
|
||||
bool agx_nir_lower_multisampled_image_store(struct nir_shader *s);
|
||||
bool agx_nir_needs_texture_crawl(struct nir_instr *instr);
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
|
||||
#include "compiler/nir/nir.h"
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "libagx/libagx.h"
|
||||
#include "agx_nir_passes.h"
|
||||
#include "agx_nir.h"
|
||||
#include "agx_nir_texture.h"
|
||||
#include "glsl_types.h"
|
||||
#include "libagx.h"
|
||||
#include "nir_builder_opcodes.h"
|
||||
#include "nir_builtin_builder.h"
|
||||
#include "nir_intrinsics.h"
|
||||
@@ -1,18 +1,10 @@
|
||||
/*
|
||||
* Copyright 2024 Alyssa Rosenzweig
|
||||
* Copyright 2023 Alyssa Rosenzweig
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "agx_pack.h"
|
||||
#include "shader_enums.h"
|
||||
|
||||
struct nir_shader;
|
||||
struct nir_instr;
|
||||
|
||||
/* Texture backend flags */
|
||||
#define AGX_TEXTURE_FLAG_NO_CLAMP (1 << 0)
|
||||
|
||||
@@ -24,8 +16,3 @@ struct nir_instr;
|
||||
#define AGX_TEXTURE_BUFFER_MAX_HEIGHT 16384
|
||||
#define AGX_TEXTURE_BUFFER_MAX_SIZE \
|
||||
(AGX_TEXTURE_BUFFER_WIDTH * AGX_TEXTURE_BUFFER_MAX_HEIGHT)
|
||||
|
||||
bool agx_nir_lower_texture_early(struct nir_shader *s, bool support_lod_bias);
|
||||
bool agx_nir_lower_texture(struct nir_shader *s, bool support_rgb32);
|
||||
bool agx_nir_lower_multisampled_image_store(struct nir_shader *s);
|
||||
bool agx_nir_needs_texture_crawl(struct nir_instr *instr);
|
||||
@@ -16,6 +16,7 @@ libasahi_agx_files = files(
|
||||
'agx_nir_lower_interpolation.c',
|
||||
'agx_nir_lower_shared_bitsize.c',
|
||||
'agx_nir_lower_subgroups.c',
|
||||
'agx_nir_lower_texture.c',
|
||||
'agx_nir_opt_preamble.c',
|
||||
'agx_lower_64bit.c',
|
||||
'agx_lower_divergent_shuffle.c',
|
||||
@@ -94,7 +95,7 @@ idep_agx_builder_h = declare_dependency(
|
||||
libasahi_compiler = static_library(
|
||||
'asahi_compiler',
|
||||
[libasahi_agx_files, agx_opcodes_c, agx_nir_algebraic_c],
|
||||
dependencies: [idep_nir, idep_agx_opcodes_h, idep_agx_builder_h, idep_mesautil],
|
||||
dependencies: [idep_nir, idep_agx_opcodes_h, idep_agx_builder_h, idep_mesautil, idep_libagx],
|
||||
c_args : [no_override_init_args, '-Wno-c2x-extensions'],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
build_by_default : false,
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
|
||||
#include "agx_bg_eot.h"
|
||||
#include "agx_compile.h"
|
||||
#include "agx_device.h" /* for AGX_MEMORY_TYPE_SHADER */
|
||||
#include "agx_nir_passes.h"
|
||||
#include "agx_device.h"
|
||||
#include "agx_nir.h"
|
||||
#include "agx_nir_texture.h"
|
||||
#include "agx_tilebuffer.h"
|
||||
#include "nir.h"
|
||||
#include "nir_builder.h"
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include "util/format/u_formats.h"
|
||||
#include "agx_abi.h"
|
||||
#include "agx_linker.h"
|
||||
#include "agx_nir.h"
|
||||
#include "agx_nir_lower_gs.h"
|
||||
#include "agx_nir_lower_vbo.h"
|
||||
#include "agx_nir_passes.h"
|
||||
#include "agx_pack.h"
|
||||
#include "agx_tilebuffer.h"
|
||||
#include "nir.h"
|
||||
|
||||
@@ -19,7 +19,6 @@ libasahi_lib_files = files(
|
||||
'agx_nir_lower_msaa.c',
|
||||
'agx_nir_lower_sample_intrinsics.c',
|
||||
'agx_nir_lower_tess.c',
|
||||
'agx_nir_lower_texture.c',
|
||||
'agx_nir_lower_tilebuffer.c',
|
||||
'agx_nir_lower_uvs.c',
|
||||
'agx_nir_lower_vbo.c',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "util/format/u_formats.h"
|
||||
|
||||
#include "agx_helpers.h"
|
||||
#include "agx_nir_passes.h"
|
||||
#include "agx_nir_texture.h"
|
||||
#include "agx_pack.h"
|
||||
#include "hk_buffer.h"
|
||||
#include "hk_device.h"
|
||||
@@ -20,8 +20,6 @@
|
||||
#include "hk_image.h"
|
||||
#include "hk_physical_device.h"
|
||||
|
||||
#include "vk_format.h"
|
||||
|
||||
VkFormatFeatureFlags2
|
||||
hk_get_buffer_format_features(struct hk_physical_device *pdev,
|
||||
VkFormat vk_format)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "vulkan/vulkan_core.h"
|
||||
|
||||
#include "agx_helpers.h"
|
||||
#include "agx_nir_passes.h"
|
||||
#include "agx_nir_texture.h"
|
||||
#include "agx_pack.h"
|
||||
#include "hk_device.h"
|
||||
#include "hk_entrypoints.h"
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
*/
|
||||
#include "pipe/p_defines.h"
|
||||
#include "vulkan/vulkan_core.h"
|
||||
#include "agx_nir_passes.h"
|
||||
#include "agx_pack.h"
|
||||
#include "agx_nir_texture.h"
|
||||
#include "hk_cmd_buffer.h"
|
||||
#include "hk_descriptor_set.h"
|
||||
#include "hk_descriptor_set_layout.h"
|
||||
@@ -16,7 +15,6 @@
|
||||
#include "nir.h"
|
||||
#include "nir_builder.h"
|
||||
#include "nir_builder_opcodes.h"
|
||||
#include "nir_deref.h"
|
||||
#include "nir_intrinsics.h"
|
||||
#include "nir_intrinsics_indices.h"
|
||||
#include "shader_enums.h"
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
#include "hk_physical_device.h"
|
||||
|
||||
#include "asahi/compiler/agx_nir_texture.h"
|
||||
#include "asahi/lib/agx_device.h"
|
||||
#include "asahi/lib/agx_nir_lower_vbo.h"
|
||||
#include "asahi/lib/agx_nir_passes.h"
|
||||
#include "util/disk_cache.h"
|
||||
#include "util/mesa-sha1.h"
|
||||
#include "git_sha1.h"
|
||||
@@ -21,10 +21,8 @@
|
||||
#include "hk_wsi.h"
|
||||
|
||||
#include "util/simple_mtx.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "vulkan/vulkan_core.h"
|
||||
#include "vulkan/wsi/wsi_common.h"
|
||||
#include "vk_device.h"
|
||||
#include "vk_drm_syncobj.h"
|
||||
#include "vk_shader_module.h"
|
||||
|
||||
|
||||
@@ -36,9 +36,10 @@
|
||||
#include "vk_ycbcr_conversion.h"
|
||||
|
||||
#include "asahi/compiler/agx_compile.h"
|
||||
#include "asahi/compiler/agx_nir.h"
|
||||
#include "asahi/compiler/agx_nir_texture.h"
|
||||
#include "asahi/lib/agx_abi.h"
|
||||
#include "asahi/lib/agx_linker.h"
|
||||
#include "asahi/lib/agx_nir_passes.h"
|
||||
#include "asahi/lib/agx_tilebuffer.h"
|
||||
#include "asahi/lib/agx_uvs.h"
|
||||
#include "compiler/spirv/nir_spirv.h"
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "asahi/compiler/agx_nir_texture.h"
|
||||
#include "asahi/layout/layout.h"
|
||||
#include "asahi/lib/agx_nir_passes.h"
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "compiler/nir/nir_format_convert.h"
|
||||
#include "gallium/auxiliary/util/u_blitter.h"
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "asahi/lib/agx_nir_passes.h"
|
||||
#include "compiler/glsl_types.h"
|
||||
#include "asahi/compiler/agx_nir.h"
|
||||
#include "compiler/nir/nir_builder.h"
|
||||
#include "util/bitset.h"
|
||||
#include "agx_state.h"
|
||||
@@ -12,7 +11,6 @@
|
||||
#include "nir_builder_opcodes.h"
|
||||
#include "nir_intrinsics.h"
|
||||
#include "nir_intrinsics_indices.h"
|
||||
#include "shader_enums.h"
|
||||
|
||||
/*
|
||||
* Lower binding table textures and images to texture state registers and (if
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include "asahi/compiler/agx_compile.h"
|
||||
#include "asahi/compiler/agx_nir.h"
|
||||
#include "asahi/genxml/agx_pack.h"
|
||||
#include "asahi/layout/layout.h"
|
||||
#include "asahi/lib/agx_abi.h"
|
||||
#include "asahi/lib/agx_helpers.h"
|
||||
#include "asahi/lib/agx_nir_passes.h"
|
||||
#include "asahi/lib/agx_ppp.h"
|
||||
#include "asahi/lib/agx_usc.h"
|
||||
#include "asahi/libagx/compression.h"
|
||||
@@ -41,17 +41,13 @@
|
||||
#include "util/compiler.h"
|
||||
#include "util/format/u_format.h"
|
||||
#include "util/format/u_formats.h"
|
||||
#include "util/format_srgb.h"
|
||||
#include "util/half_float.h"
|
||||
#include "util/hash_table.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/ralloc.h"
|
||||
#include "util/u_dump.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_prim.h"
|
||||
#include "util/u_resource.h"
|
||||
#include "util/u_transfer.h"
|
||||
#include "util/u_upload_mgr.h"
|
||||
#include "agx_bg_eot.h"
|
||||
@@ -67,7 +63,6 @@
|
||||
#include "nir_builder_opcodes.h"
|
||||
#include "nir_intrinsics.h"
|
||||
#include "nir_intrinsics_indices.h"
|
||||
#include "nir_lower_blend.h"
|
||||
#include "nir_xfb_info.h"
|
||||
#include "pool.h"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "util/u_range.h"
|
||||
#include "agx_bg_eot.h"
|
||||
#include "agx_helpers.h"
|
||||
#include "agx_nir_passes.h"
|
||||
#include "agx_nir_texture.h"
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#include <errno.h>
|
||||
|
||||
Reference in New Issue
Block a user