lavapipe: Move nir passes to a new directory

The number of lavapipe nir passes keeps growing so it's a good idea to
add some separation before it becomes a mess.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32963>
This commit is contained in:
Konstantin Seurer
2024-11-05 16:19:47 +01:00
committed by Marge Bot
parent 2208379628
commit 66b3879618
12 changed files with 31 additions and 71 deletions
@@ -1,36 +0,0 @@
/*
* Copyright © 2019 Red Hat.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifndef LVP_LOWER_VULKAN_RESOURCE_H
#define LVP_LOWER_VULKAN_RESOURCE_H
struct lvp_pipeline_layout;
struct lvp_device;
void lvp_lower_pipeline_layout(const struct lvp_device *device,
struct lvp_pipeline_layout *layout,
nir_shader *shader);
bool
lvp_lower_input_attachments(nir_shader *shader, bool use_fragcoord_sysval);
#endif
@@ -31,7 +31,7 @@
#include "spirv/nir_spirv.h"
#include "nir/nir_builder.h"
#include "nir/nir_serialize.h"
#include "lvp_lower_vulkan_resource.h"
#include "nir/lvp_nir.h"
#include "pipe/p_state.h"
#include "pipe/p_context.h"
#include "nir/nir_xfb_info.h"
+1 -7
View File
@@ -577,9 +577,6 @@ struct lvp_exec_graph_internal_data {
struct lvp_exec_graph_shader_output outputs[LVP_MAX_EXEC_GRAPH_PAYLOADS];
};
bool
lvp_lower_exec_graph(struct lvp_pipeline *pipeline, nir_shader *nir);
void
lvp_pipeline_shaders_compile(struct lvp_pipeline *pipeline, bool locked);
@@ -821,10 +818,7 @@ void
lvp_inline_uniforms(nir_shader *nir, const struct lvp_shader *shader, const uint32_t *uniform_values, uint32_t ubo);
void *
lvp_shader_compile(struct lvp_device *device, struct lvp_shader *shader, nir_shader *nir, bool locked);
bool
lvp_nir_lower_ray_queries(struct nir_shader *shader);
bool
lvp_nir_lower_sparse_residency(struct nir_shader *shader);
enum vk_cmd_type
lvp_nv_dgc_token_to_cmd_type(const VkIndirectCommandsLayoutTokenNV *token);
@@ -6,13 +6,10 @@
#include "lvp_private.h"
#include "lvp_acceleration_structure.h"
#include "lvp_nir_ray_tracing.h"
#include "nir/lvp_nir.h"
#include "vk_pipeline.h"
#include "nir.h"
#include "nir_builder.h"
#include "spirv/spirv.h"
#include "util/mesa-sha1.h"
+6 -8
View File
@@ -12,6 +12,12 @@ lvp_entrypoints = custom_target(
)
liblvp_files = files(
'nir/lvp_nir_lower_exec_graph.c',
'nir/lvp_nir_lower_input_attachments.c',
'nir/lvp_nir_lower_pipeline_layout.c',
'nir/lvp_nir_lower_ray_queries.c',
'nir/lvp_nir_lower_sparse_residency.c',
'nir/lvp_nir_ray_tracing.c',
'lvp_acceleration_structure.c',
'lvp_device.c',
'lvp_device_generated_commands.c',
@@ -22,14 +28,6 @@ liblvp_files = files(
'lvp_image.c',
'lvp_formats.c',
'lvp_inline_uniforms.c',
'lvp_lower_exec_graph.c',
'lvp_lower_vulkan_resource.c',
'lvp_lower_vulkan_resource.h',
'lvp_lower_input_attachments.c',
'lvp_nir_lower_ray_queries.c',
'lvp_nir_lower_sparse_residency.c',
'lvp_nir_ray_tracing.c',
'lvp_nir_ray_tracing.h',
'lvp_pipe_sync.c',
'lvp_pipeline.c',
'lvp_pipeline_cache.c',
@@ -102,4 +102,20 @@ struct lvp_ray_traversal_args {
*/
nir_def *lvp_build_ray_traversal(nir_builder *b, const struct lvp_ray_traversal_args *args);
struct lvp_device;
struct lvp_pipeline;
struct lvp_pipeline_layout;
bool lvp_lower_exec_graph(struct lvp_pipeline *pipeline, nir_shader *nir);
bool lvp_lower_input_attachments(nir_shader *shader, bool use_fragcoord_sysval);
void lvp_lower_pipeline_layout(const struct lvp_device *device,
struct lvp_pipeline_layout *layout,
nir_shader *shader);
bool lvp_nir_lower_ray_queries(struct nir_shader *shader);
bool lvp_nir_lower_sparse_residency(struct nir_shader *shader);
#endif
@@ -5,9 +5,7 @@
*/
#include "lvp_private.h"
#include "nir.h"
#include "nir_builder.h"
#include "lvp_nir.h"
#define lvp_load_internal_field(b, bit_size, field) \
nir_load_ssbo(b, 1, bit_size, nir_imm_int(b, 0), \
@@ -21,9 +21,7 @@
* IN THE SOFTWARE.
*/
#include "nir.h"
#include "nir_builder.h"
#include "lvp_lower_vulkan_resource.h"
#include "lvp_nir.h"
static nir_def *
load_frag_coord(nir_builder *b)
@@ -22,9 +22,7 @@
*/
#include "lvp_private.h"
#include "nir.h"
#include "nir_builder.h"
#include "lvp_lower_vulkan_resource.h"
#include "lvp_nir.h"
static bool
lower_vulkan_resource_index(const nir_instr *instr, const void *data_cb)
@@ -3,10 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#include "nir/nir.h"
#include "nir/nir_builder.h"
#include "lvp_nir_ray_tracing.h"
#include "lvp_nir.h"
#include "lvp_acceleration_structure.h"
#include "lvp_private.h"
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: MIT
*/
#include "lvp_private.h"
#include "lvp_nir.h"
#include "nir.h"
#include "nir_builder.h"
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: MIT
*/
#include "lvp_nir_ray_tracing.h"
#include "lvp_nir.h"
#include "lvp_acceleration_structure.h"
#include "lvp_private.h"