summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_surface_builder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* i965/vec4: Replace vec4_instruction::regs_written with ::size_written field ↵Francisco Jerez2016-09-141-1/+1
| | | | | | | | | | | | | | | | in bytes. The previous regs_written field can be recovered by rewriting each rvalue reference of regs_written like 'x = i.regs_written' to 'x = DIV_ROUND_UP(i.size_written, reg_unit)', and each lvalue reference like 'i.regs_written = x' to 'i.size_written = x * reg_unit'. For the same reason as in the previous patches, this doesn't attempt to be particularly clever about simplifying the result in the interest of keeping the rather lengthy patch as obvious as possible. I'll come back later to clean up any ugliness introduced here. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
* i965/vec4: pass the correct src_sz to emit_send at emit_untyped_atomicAlejandro Piñeiro2016-03-081-1/+1
| | | | | | | | | | | | If the src is invalid, so src size is zero, the src_sz passed to emit send should be zero too, instead of a default 1 if we are in a simd4x2 case. This can happens if using emit_untyped_atomic for an atomic dec/inc. v2: use the proper src_sz when calling emit_send, instead of just avoid loading src at emit_send if BAD_FILE (Francisco Jerez) Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* i965/vec4: Replace src_reg(imm) constructors with brw_imm_*().Matt Turner2015-11-191-4/+4
| | | | | | | Cuts 1.5k of .text. Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/vec4: Import surface message builder functions.Francisco Jerez2015-09-251-0/+234
| | | | | | | | | | | Implement helper functions that can be used to construct and send untyped and typed surface read, write and atomic messages to the shared dataport unit. v2: Split from the FS implementation. v3: Rewrite to avoid evil array_reg, emit_collect and emit_zip. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* i965/vec4: Import helpers to convert vectors into arrays and back.Francisco Jerez2015-09-251-0/+98
These functions handle the conversion of a vec4 into the form expected by the dataport unit in message and message return payloads. The conversion is not always trivial because some messages don't support SIMD4x2 for some generations, in which case a strided copy may be necessary. v2: Split from the FS implementation. v3: Rewrite to avoid evil array_reg, emit_collect and emit_zip. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>