diff options
author | Jason Ekstrand <[email protected]> | 2014-09-11 22:33:52 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2014-09-30 10:29:14 -0700 |
commit | 6ba31cc000b096a3b1fe0e0a935a3ab2aa6803d2 (patch) | |
tree | a8d0e9af03a93d62e2680d516ced2618442c3a90 /src/mesa/drivers | |
parent | 071ac3a467479ce1ada1b86e2f65d4cc7d07753e (diff) |
i965/fs: Better guess the width of LOAD_PAYLOAD
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index ad61b33b754..3eb429f51ee 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -337,8 +337,15 @@ fs_visitor::CMP(fs_reg dst, fs_reg src0, fs_reg src1, fs_inst * fs_visitor::LOAD_PAYLOAD(const fs_reg &dst, fs_reg *src, int sources) { - fs_inst *inst = new(mem_ctx) fs_inst(SHADER_OPCODE_LOAD_PAYLOAD, dst, src, - sources); + uint8_t exec_size = dst.width; + for (int i = 0; i < sources; ++i) { + assert(src[i].width % dst.width == 0); + if (src[i].width > exec_size) + exec_size = src[i].width; + } + + fs_inst *inst = new(mem_ctx) fs_inst(SHADER_OPCODE_LOAD_PAYLOAD, exec_size, + dst, src, sources); inst->regs_written = 0; for (int i = 0; i < sources; ++i) { /* The LOAD_PAYLOAD instruction only really makes sense if we are |