diff options
author | Jason Ekstrand <[email protected]> | 2017-02-28 18:52:29 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-03-01 16:14:02 -0800 |
commit | 760c8a1d950ddc178a6a7dc9c092790ca36e8e76 (patch) | |
tree | 5e34c9f633ca9e8e1259b8e631e743d395d09e11 /src/mesa/drivers | |
parent | f33d2b5d055d550b9d33547d76d353457d397fc1 (diff) |
i965: Make mark_surface_used a static inline in brw_compiler.h
One of these days, I'd like to see this function go away all together
but for now, let's at least put it near the struct it updates.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_compiler.h | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 13 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h index c48c3ad2dae..85257d494af 100644 --- a/src/mesa/drivers/dri/i965/brw_compiler.h +++ b/src/mesa/drivers/dri/i965/brw_compiler.h @@ -443,6 +443,19 @@ struct brw_stage_prog_data { struct brw_image_param *image_param; }; +static inline void +brw_mark_surface_used(struct brw_stage_prog_data *prog_data, + unsigned surf_index) +{ + /* A binding table index is 8 bits and the top 3 values are reserved for + * special things (stateless and SLM). + */ + assert(surf_index <= 252); + + prog_data->binding_table.size_bytes = + MAX2(prog_data->binding_table.size_bytes, (surf_index + 1) * 4); +} + /* Data about a particular attempt to compile a program. Note that * there can be many of these, each in a different GL state * corresponding to a different brw_wm_prog_key struct, with different diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 8b852d52721..47ea9c10a6d 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -29,19 +29,6 @@ #include "brw_vec4_tes.h" #include "main/uniforms.h" -extern "C" void -brw_mark_surface_used(struct brw_stage_prog_data *prog_data, - unsigned surf_index) -{ - /* A binding table index is 8 bits and the top 3 values are reserved for - * special things (stateless and SLM). - */ - assert(surf_index <= 252); - - prog_data->binding_table.size_bytes = - MAX2(prog_data->binding_table.size_bytes, (surf_index + 1) * 4); -} - enum brw_reg_type brw_type_for_base_type(const struct glsl_type *type) { |