mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 09:50:36 +02:00
nak: Rename num_barriers to num_control_barriers
Hopefully this is a little more clear. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30180>
This commit is contained in:
parent
aac97b22ae
commit
2f49284cfa
6 changed files with 14 additions and 8 deletions
|
|
@ -98,8 +98,14 @@ struct nak_shader_info {
|
|||
/** Number of GPRs used */
|
||||
uint8_t num_gprs;
|
||||
|
||||
/** Number of barriers used */
|
||||
uint8_t num_barriers;
|
||||
/**
|
||||
* Number of control barriers used
|
||||
*
|
||||
* These are barriers in the sense of glsl barrier(), not reconvergence
|
||||
* barriers. In CUDA, these barriers have an index, but we currently
|
||||
* only use index zero for vulkan, which means this will be at most 1.
|
||||
*/
|
||||
uint8_t num_control_barriers;
|
||||
|
||||
uint8_t _pad0;
|
||||
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ pub extern "C" fn nak_compile_shader(
|
|||
} else {
|
||||
max(4, s.info.num_gprs)
|
||||
},
|
||||
num_barriers: s.info.num_barriers,
|
||||
num_control_barriers: s.info.num_control_barriers,
|
||||
_pad0: Default::default(),
|
||||
num_instrs: s.info.num_instrs,
|
||||
slm_size: s.info.slm_size,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ fn init_info_from_nir(nir: &nir_shader) -> ShaderInfo {
|
|||
ShaderInfo {
|
||||
num_gprs: 0,
|
||||
num_instrs: 0,
|
||||
num_barriers: 0,
|
||||
num_control_barriers: 0,
|
||||
slm_size: nir.scratch_size,
|
||||
uses_global_mem: false,
|
||||
writes_global_mem: false,
|
||||
|
|
@ -2761,7 +2761,7 @@ impl<'a> ShaderFromNir<'a> {
|
|||
self.nir.info.stage() == MESA_SHADER_COMPUTE
|
||||
|| self.nir.info.stage() == MESA_SHADER_KERNEL
|
||||
);
|
||||
self.info.num_barriers = 1;
|
||||
self.info.num_control_barriers = 1;
|
||||
b.push_op(OpBar {});
|
||||
}
|
||||
_ => panic!("Unhandled execution scope"),
|
||||
|
|
|
|||
|
|
@ -6353,7 +6353,7 @@ pub enum ShaderIoInfo {
|
|||
#[derive(Debug)]
|
||||
pub struct ShaderInfo {
|
||||
pub num_gprs: u8,
|
||||
pub num_barriers: u8,
|
||||
pub num_control_barriers: u8,
|
||||
pub num_instrs: u32,
|
||||
pub slm_size: u32,
|
||||
pub uses_global_mem: bool,
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@ fn fill_qmd<Q: QMD>(info: &nak_shader_info, qmd_info: &nak_qmd_info) -> Q {
|
|||
|
||||
let mut qmd = Q::new();
|
||||
|
||||
qmd.set_barrier_count(info.num_barriers);
|
||||
qmd.set_barrier_count(info.num_control_barriers);
|
||||
qmd.set_global_size(
|
||||
qmd_info.global_size[0],
|
||||
qmd_info.global_size[1],
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ nvk_cg_compile_nir(struct nvk_physical_device *pdev, nir_shader *nir,
|
|||
shader->info.num_gprs = MAX2(4, info_out.bin.maxGPR + 3);
|
||||
else
|
||||
shader->info.num_gprs = MAX2(4, info_out.bin.maxGPR + 1);
|
||||
shader->info.num_barriers = info_out.numBarriers;
|
||||
shader->info.num_control_barriers = info_out.numBarriers;
|
||||
|
||||
if (info_out.bin.tlsSpace) {
|
||||
assert(info_out.bin.tlsSpace < (1 << 24));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue