radv: add radv_printf.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28551>
This commit is contained in:

committed by
Marge Bot

parent
d1adbf0e53
commit
9a7afbfa13
@@ -146,6 +146,7 @@ libradv_files = files(
|
||||
'radv_pipeline_rt.c',
|
||||
'radv_pipeline_rt.h',
|
||||
'radv_printf.c',
|
||||
'radv_printf.h',
|
||||
'radv_private.h',
|
||||
'radv_queue.c',
|
||||
'radv_queue.h',
|
||||
|
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include "radv_meta.h"
|
||||
#include "radv_printf.h"
|
||||
|
||||
#include "vk_common_entrypoints.h"
|
||||
#include "vk_pipeline_cache.h"
|
||||
|
@@ -49,6 +49,7 @@
|
||||
#include "radv_cs.h"
|
||||
#include "radv_debug.h"
|
||||
#include "radv_formats.h"
|
||||
#include "radv_printf.h"
|
||||
#include "radv_private.h"
|
||||
#include "radv_rmv.h"
|
||||
#include "radv_shader.h"
|
||||
|
@@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "radv_printf.h"
|
||||
#include "radv_private.h"
|
||||
|
||||
#include "util/hash_table.h"
|
||||
|
57
src/amd/vulkan/radv_printf.h
Normal file
57
src/amd/vulkan/radv_printf.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright © 2016 Red Hat.
|
||||
* Copyright © 2016 Bas Nieuwenhuizen
|
||||
*
|
||||
* based in part on anv driver which is:
|
||||
* Copyright © 2015 Intel Corporation
|
||||
*
|
||||
* 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 RADV_PRINTF_H
|
||||
#define RADV_PRINTF_H
|
||||
|
||||
#include "radv_device.h"
|
||||
|
||||
typedef struct nir_builder nir_builder;
|
||||
typedef struct nir_def nir_def;
|
||||
|
||||
struct radv_printf_format {
|
||||
char *string;
|
||||
uint32_t divergence_mask;
|
||||
uint8_t element_sizes[32];
|
||||
};
|
||||
|
||||
struct radv_printf_buffer_header {
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
VkResult radv_printf_data_init(struct radv_device *device);
|
||||
|
||||
void radv_printf_data_finish(struct radv_device *device);
|
||||
|
||||
void radv_build_printf(nir_builder *b, nir_def *cond, const char *format, ...);
|
||||
|
||||
void radv_dump_printf_data(struct radv_device *device, FILE *out);
|
||||
|
||||
void radv_device_associate_nir(struct radv_device *device, nir_shader *nir);
|
||||
|
||||
#endif /* RADV_PRINTF_H */
|
@@ -214,32 +214,6 @@ struct radv_shader_binary_part;
|
||||
|
||||
struct radv_ray_tracing_pipeline;
|
||||
|
||||
|
||||
|
||||
struct radv_printf_format {
|
||||
char *string;
|
||||
uint32_t divergence_mask;
|
||||
uint8_t element_sizes[32];
|
||||
};
|
||||
|
||||
VkResult radv_printf_data_init(struct radv_device *device);
|
||||
|
||||
void radv_printf_data_finish(struct radv_device *device);
|
||||
|
||||
struct radv_printf_buffer_header {
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
typedef struct nir_builder nir_builder;
|
||||
typedef struct nir_def nir_def;
|
||||
|
||||
void radv_build_printf(nir_builder *b, nir_def *cond, const char *format, ...);
|
||||
|
||||
void radv_dump_printf_data(struct radv_device *device, FILE *out);
|
||||
|
||||
void radv_device_associate_nir(struct radv_device *device, nir_shader *nir);
|
||||
|
||||
void radv_emit_graphics(struct radv_device *device, struct radeon_cmdbuf *cs);
|
||||
void radv_emit_compute(struct radv_device *device, struct radeon_cmdbuf *cs);
|
||||
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "radv_debug.h"
|
||||
#include "radv_device_memory.h"
|
||||
#include "radv_image.h"
|
||||
#include "radv_printf.h"
|
||||
#include "radv_private.h"
|
||||
#include "radv_rmv.h"
|
||||
#include "vk_semaphore.h"
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include "util/u_atomic.h"
|
||||
#include "radv_cs.h"
|
||||
#include "radv_debug.h"
|
||||
#include "radv_printf.h"
|
||||
#include "radv_private.h"
|
||||
#include "radv_sdma.h"
|
||||
#include "radv_shader_args.h"
|
||||
|
Reference in New Issue
Block a user