rusticl/mesa: remove ResourceType::Cb0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30082>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user