diff options
author | Jason Ekstrand <[email protected]> | 2017-02-28 16:12:22 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-03-01 16:13:24 -0800 |
commit | f9c9d551eac918375c172ae271eab31779d87a81 (patch) | |
tree | e7372b89f924bb83329015b34cb0b3dc62286d0a /src/mesa/drivers | |
parent | b97782c364cfc15a8136032805975fd72266d14c (diff) |
i965: Move some helpers from brw_context.h to brw_shader.h
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_compiler.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.h | 17 |
3 files changed, 18 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.c b/src/mesa/drivers/dri/i965/brw_compiler.c index f3dafecae04..18ca4446e3e 100644 --- a/src/mesa/drivers/dri/i965/brw_compiler.c +++ b/src/mesa/drivers/dri/i965/brw_compiler.c @@ -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" diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index c9a931ce05f..eda5c32377a 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -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) { diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index 60f498f0ebb..2ec70b496f7 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -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. */ |