mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 16:38:09 +02:00
rusticl/mesa: remove ResourceType::Cb0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30082>
This commit is contained in:
parent
91cd3295d8
commit
e4456b2399
1 changed files with 3 additions and 8 deletions
|
|
@ -74,21 +74,16 @@ impl ComputeParam<Vec<u64>> for PipeScreen {
|
|||
pub enum ResourceType {
|
||||
Normal,
|
||||
Staging,
|
||||
Cb0,
|
||||
}
|
||||
|
||||
impl ResourceType {
|
||||
fn apply(&self, tmpl: &mut pipe_resource, screen: &PipeScreen) {
|
||||
fn apply(&self, tmpl: &mut pipe_resource) {
|
||||
match self {
|
||||
Self::Staging => {
|
||||
tmpl.set_usage(pipe_resource_usage::PIPE_USAGE_STAGING);
|
||||
tmpl.flags |= PIPE_RESOURCE_FLAG_MAP_PERSISTENT | PIPE_RESOURCE_FLAG_MAP_COHERENT;
|
||||
tmpl.bind |= PIPE_BIND_LINEAR;
|
||||
}
|
||||
Self::Cb0 => {
|
||||
tmpl.flags |= screen.param(pipe_cap::PIPE_CAP_CONSTBUF0_FLAGS) as u32;
|
||||
tmpl.bind |= PIPE_BIND_CONSTANT_BUFFER;
|
||||
}
|
||||
Self::Normal => {}
|
||||
}
|
||||
}
|
||||
|
|
@ -159,7 +154,7 @@ impl PipeScreen {
|
|||
tmpl.array_size = 1;
|
||||
tmpl.bind = pipe_bind;
|
||||
|
||||
res_type.apply(&mut tmpl, self);
|
||||
res_type.apply(&mut tmpl);
|
||||
|
||||
self.resource_create(&tmpl)
|
||||
}
|
||||
|
|
@ -207,7 +202,7 @@ impl PipeScreen {
|
|||
tmpl.bind |= PIPE_BIND_SHADER_IMAGE;
|
||||
}
|
||||
|
||||
res_type.apply(&mut tmpl, self);
|
||||
res_type.apply(&mut tmpl);
|
||||
|
||||
self.resource_create(&tmpl)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue