rt: the refill tests' hooks build only with a device cfg
Pushed::bytes, Building::pushed and both encoders' refilled hooks (Filled, Refilled, DispatchFilled, DispatchRefilled) serve tests/refill.rs alone, which builds under m2v_gpu or m2v_cpu_icd; a test build without either left them unused (clippy, -D warnings: 8 dead-code errors, job m3-max-57025). They now take #[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))], as the other device-test hooks do.
This commit is contained in:
1 parent
5b164777bd
commit
71ef1ba14b
3 files changed
+8
-8
No files matched your search
@@ -245,7 +245,7 @@ impl Pushed {
|
||||
}
|
||||
|
||||
/// The bytes held.
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn bytes(&self) -> &[u8] {
|
||||
&self.bytes
|
||||
}
|
||||
@@ -1226,7 +1226,7 @@ impl Building {
|
||||
}
|
||||
|
||||
/// The push bytes the current command buffer holds.
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) fn pushed(&self) -> &[u8] {
|
||||
self.pushed.bytes()
|
||||
}
|
||||
|
||||
@@ -1560,7 +1560,7 @@ struct Parameters {
|
||||
/// A dispatch's facts and fields: the slots that reach a device copy and that write what the host
|
||||
/// reads, the push bytes with the block's address zeroed (each fill writes its own block), and
|
||||
/// the block's bytes.
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub(crate) struct DispatchFilled {
|
||||
facts: [Slots; 2],
|
||||
@@ -1570,7 +1570,7 @@ pub(crate) struct DispatchFilled {
|
||||
|
||||
/// An encoder's facts and fields beside a find and fill of every slot
|
||||
/// ([`ComputeCommandEncoder::refilled`]).
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) struct DispatchRefilled {
|
||||
/// The facts and fields the encoder's dispatches left, found and filled slot by slot since
|
||||
/// the pipeline state was set.
|
||||
@@ -1584,7 +1584,7 @@ pub(crate) struct DispatchRefilled {
|
||||
pub(crate) held: Vec<u8>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
impl ComputeCommandEncoder {
|
||||
/// Its facts and fields beside a find and fill of every slot of what is bound now, after a
|
||||
/// dispatch filled its parameters.
|
||||
|
||||
@@ -2682,7 +2682,7 @@ impl Drop for RenderCommandEncoder {
|
||||
/// What a draw's facts and fields hold: the vertex buffers it binds, whether it reads an
|
||||
/// attachment, reaches a device copy and writes what the host reads, its push bytes with each
|
||||
/// parameter block's address zeroed, and its blocks.
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub(crate) struct Filled {
|
||||
vertex: Vec<(u32, vk::Buffer, u64)>,
|
||||
@@ -2692,7 +2692,7 @@ pub(crate) struct Filled {
|
||||
}
|
||||
|
||||
/// An encoder's facts and fields beside a find and fill of every slot ([`RenderCommandEncoder::refilled`]).
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
pub(crate) struct Refilled {
|
||||
/// The facts and fields the encoder's draws left, found and filled slot by slot since the
|
||||
/// pipeline state was set.
|
||||
@@ -2706,7 +2706,7 @@ pub(crate) struct Refilled {
|
||||
pub(crate) held: Vec<u8>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
|
||||
impl RenderCommandEncoder {
|
||||
/// Its facts and fields beside a find and fill of every slot of what is bound now.
|
||||
pub(crate) fn refilled(&self) -> Refilled {
|
||||
|
||||
Reference in new issue
Block a user