i965: Move some helpers from brw_context.h to brw_shader.h

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
Jason Ekstrand 2017-02-28 16:12:22 -08:00
parent b97782c364
commit f9c9d551ea
3 changed files with 18 additions and 16 deletions

View File

@ -23,6 +23,7 @@
#include "brw_compiler.h"
#include "brw_context.h"
#include "brw_shader.h"
#include "compiler/nir/nir.h"
#include "main/errors.h"
#include "util/debug.h"

View File

@ -1330,12 +1330,6 @@ key_debug(struct brw_context *brw, const char *name, int a, int b)
void brwInitFragProgFuncs( struct dd_function_table *functions );
/* Per-thread scratch space is a power-of-two multiple of 1KB. */
static inline int
brw_get_scratch_size(int size)
{
return MAX2(1024, util_next_power_of_two(size));
}
void brw_get_scratch_bo(struct brw_context *brw,
drm_intel_bo **scratch_bo, int size);
void brw_alloc_stage_scratch(struct brw_context *brw,
@ -1358,13 +1352,6 @@ void brw_upload_urb_fence(struct brw_context *brw);
*/
void brw_upload_cs_urb_state(struct brw_context *brw);
/* brw_fs_reg_allocate.cpp
*/
void brw_fs_alloc_reg_sets(struct brw_compiler *compiler);
/* brw_vec4_reg_allocate.cpp */
void brw_vec4_alloc_reg_set(struct brw_compiler *compiler);
/* brw_disasm.c */
int brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
struct brw_inst *inst, bool is_compacted);
@ -1628,9 +1615,6 @@ brw_program_reloc(struct brw_context *brw, uint32_t state_offset,
bool brw_do_cubemap_normalize(struct exec_list *instructions);
extern const char * const conditional_modifier[16];
extern const char *const pred_ctrl_align16[16];
static inline bool
brw_depth_writes_enabled(const struct brw_context *brw)
{

View File

@ -258,6 +258,23 @@ bool opt_predicated_break(struct backend_shader *s);
extern "C" {
#endif
/* brw_fs_reg_allocate.cpp */
void brw_fs_alloc_reg_sets(struct brw_compiler *compiler);
/* brw_vec4_reg_allocate.cpp */
void brw_vec4_alloc_reg_set(struct brw_compiler *compiler);
/* brw_disasm.c */
extern const char *const conditional_modifier[16];
extern const char *const pred_ctrl_align16[16];
/* Per-thread scratch space is a power-of-two multiple of 1KB. */
static inline int
brw_get_scratch_size(int size)
{
return MAX2(1024, util_next_power_of_two(size));
}
/**
* Scratch data used when compiling a GLSL geometry shader.
*/