iris: Make an iris_genx_protos.h header for prototypes.
This lets us specify the prototypes once, instead of cut and pasting them per generation. isl uses a similar approach (isl_genX_priv.h). Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:
parent
068093e84c
commit
204a3bb816
|
@ -42,6 +42,7 @@ IRIS_C_SOURCES = \
|
||||||
iris_fence.c \
|
iris_fence.c \
|
||||||
iris_fence.h \
|
iris_fence.h \
|
||||||
iris_formats.c \
|
iris_formats.c \
|
||||||
|
iris_genx_protos.h \
|
||||||
iris_pipe.h \
|
iris_pipe.h \
|
||||||
iris_pipe_control.c \
|
iris_pipe_control.c \
|
||||||
iris_program.c \
|
iris_program.c \
|
||||||
|
|
|
@ -779,12 +779,6 @@ void iris_emit_end_of_pipe_sync(struct iris_batch *batch,
|
||||||
|
|
||||||
void iris_init_flush_functions(struct pipe_context *ctx);
|
void iris_init_flush_functions(struct pipe_context *ctx);
|
||||||
|
|
||||||
/* iris_blorp.c */
|
|
||||||
void gen8_init_blorp(struct iris_context *ice);
|
|
||||||
void gen9_init_blorp(struct iris_context *ice);
|
|
||||||
void gen10_init_blorp(struct iris_context *ice);
|
|
||||||
void gen11_init_blorp(struct iris_context *ice);
|
|
||||||
|
|
||||||
/* iris_border_color.c */
|
/* iris_border_color.c */
|
||||||
|
|
||||||
void iris_init_border_color_pool(struct iris_context *ice);
|
void iris_init_border_color_pool(struct iris_context *ice);
|
||||||
|
@ -793,28 +787,6 @@ void iris_border_color_pool_reserve(struct iris_context *ice, unsigned count);
|
||||||
uint32_t iris_upload_border_color(struct iris_context *ice,
|
uint32_t iris_upload_border_color(struct iris_context *ice,
|
||||||
union pipe_color_union *color);
|
union pipe_color_union *color);
|
||||||
|
|
||||||
/* iris_state.c */
|
|
||||||
void gen8_init_state(struct iris_context *ice);
|
|
||||||
void gen9_init_state(struct iris_context *ice);
|
|
||||||
void gen10_init_state(struct iris_context *ice);
|
|
||||||
void gen11_init_state(struct iris_context *ice);
|
|
||||||
void gen8_emit_urb_setup(struct iris_context *ice,
|
|
||||||
struct iris_batch *batch,
|
|
||||||
const unsigned size[4],
|
|
||||||
bool tess_present, bool gs_present);
|
|
||||||
void gen9_emit_urb_setup(struct iris_context *ice,
|
|
||||||
struct iris_batch *batch,
|
|
||||||
const unsigned size[4],
|
|
||||||
bool tess_present, bool gs_present);
|
|
||||||
void gen10_emit_urb_setup(struct iris_context *ice,
|
|
||||||
struct iris_batch *batch,
|
|
||||||
const unsigned size[4],
|
|
||||||
bool tess_present, bool gs_present);
|
|
||||||
void gen11_emit_urb_setup(struct iris_context *ice,
|
|
||||||
struct iris_batch *batch,
|
|
||||||
const unsigned size[4],
|
|
||||||
bool tess_present, bool gs_present);
|
|
||||||
|
|
||||||
/* iris_program.c */
|
/* iris_program.c */
|
||||||
void iris_upload_ubo_ssbo_surf_state(struct iris_context *ice,
|
void iris_upload_ubo_ssbo_surf_state(struct iris_context *ice,
|
||||||
struct pipe_shader_buffer *buf,
|
struct pipe_shader_buffer *buf,
|
||||||
|
@ -922,4 +894,37 @@ void iris_depth_cache_add_bo(struct iris_batch *batch, struct iris_bo *bo);
|
||||||
void gen9_toggle_preemption(struct iris_context *ice,
|
void gen9_toggle_preemption(struct iris_context *ice,
|
||||||
struct iris_batch *batch,
|
struct iris_batch *batch,
|
||||||
const struct pipe_draw_info *draw);
|
const struct pipe_draw_info *draw);
|
||||||
|
|
||||||
|
#ifdef genX
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
#else
|
||||||
|
# define genX(x) gen4_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen5_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen6_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen7_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen75_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen8_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen9_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen10_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
# define genX(x) gen11_##x
|
||||||
|
# include "iris_genx_protos.h"
|
||||||
|
# undef genX
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright © 2019 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 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* GenX-specific function declarations.
|
||||||
|
*
|
||||||
|
* Don't include this directly, it will be included by iris_context.h.
|
||||||
|
*
|
||||||
|
* NOTE: This header can be included multiple times, from the same file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* iris_state.c */
|
||||||
|
void genX(init_state)(struct iris_context *ice);
|
||||||
|
void genX(emit_urb_setup)(struct iris_context *ice,
|
||||||
|
struct iris_batch *batch,
|
||||||
|
const unsigned size[4],
|
||||||
|
bool tess_present, bool gs_present);
|
||||||
|
|
||||||
|
/* iris_blorp.c */
|
||||||
|
void genX(init_blorp)(struct iris_context *ice);
|
||||||
|
|
|
@ -35,6 +35,7 @@ files_libiris = files(
|
||||||
'iris_fence.c',
|
'iris_fence.c',
|
||||||
'iris_fence.h',
|
'iris_fence.h',
|
||||||
'iris_formats.c',
|
'iris_formats.c',
|
||||||
|
'iris_genx_protos.h',
|
||||||
'iris_pipe.h',
|
'iris_pipe.h',
|
||||||
'iris_pipe_control.c',
|
'iris_pipe_control.c',
|
||||||
'iris_program.c',
|
'iris_program.c',
|
||||||
|
|
Loading…
Reference in New Issue