diff options
author | Kenneth Graunke <[email protected]> | 2016-11-29 02:47:15 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-07-13 20:18:30 -0700 |
commit | 4f586cd8f19a598a0f61f361840a358a7f99eaa0 (patch) | |
tree | 48b56301fd1bf422d1a554f402211c7015bc789b /src/intel/compiler | |
parent | 6834b1ebe34aaa4b65e342556894e88826c839da (diff) |
i965: Push UBO data, but don't use it just yet.
This patch starts uploading UBO data via 3DSTATE_CONSTANT_* packets,
and updates the compiler to know that there's extra payload data, so
things continue working. However, it still issues pull loads for all
data. I wanted to separate the two aspects for greater bisectability.
v2: Update for new intel_bufferobj_buffer parameter.
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 9 | ||||
-rw-r--r-- | src/intel/compiler/brw_vec4.cpp | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index a2a99b72096..ba1fc66e138 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -1383,7 +1383,14 @@ fs_visitor::emit_gs_thread_end() void fs_visitor::assign_curb_setup() { - prog_data->curb_read_length = ALIGN(stage_prog_data->nr_params, 8) / 8; + unsigned uniform_push_length = DIV_ROUND_UP(stage_prog_data->nr_params, 8); + + unsigned ubo_push_length = 0; + for (int i = 0; i < 4; i++) { + ubo_push_length += stage_prog_data->ubo_ranges[i].length; + } + + prog_data->curb_read_length = uniform_push_length + ubo_push_length; /* Map the offsets in the UNIFORM file to fixed HW regs. */ foreach_block_and_inst(block, fs_inst, inst, cfg) { diff --git a/src/intel/compiler/brw_vec4.cpp b/src/intel/compiler/brw_vec4.cpp index 3de7d931dde..410922c62b2 100644 --- a/src/intel/compiler/brw_vec4.cpp +++ b/src/intel/compiler/brw_vec4.cpp @@ -1776,6 +1776,9 @@ vec4_visitor::setup_uniforms(int reg) reg += ALIGN(uniforms, 2) / 2; } + for (int i = 0; i < 4; i++) + reg += stage_prog_data->ubo_ranges[i].length; + stage_prog_data->nr_params = this->uniforms * 4; prog_data->base.curb_read_length = |