mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
rusticl/mesa/screen: handle get_timestamp not set by driver
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25362>
This commit is contained in:
parent
bb33dbeeaa
commit
39721a7476
2 changed files with 2 additions and 3 deletions
|
|
@ -389,11 +389,10 @@ impl PipeScreen {
|
|||
}
|
||||
|
||||
pub fn get_timestamp(&self) -> u64 {
|
||||
// We have get_timestamp in has_required_cbs, so it will exist
|
||||
unsafe {
|
||||
self.screen()
|
||||
.get_timestamp
|
||||
.expect("get_timestamp should be required")(self.screen.as_ptr())
|
||||
.unwrap_or(u_default_get_timestamp)(self.screen.as_ptr())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -478,7 +477,6 @@ fn has_required_cbs(screen: *mut pipe_screen) -> bool {
|
|||
& has_required_feature!(screen, get_name)
|
||||
& has_required_feature!(screen, get_param)
|
||||
& has_required_feature!(screen, get_shader_param)
|
||||
& has_required_feature!(screen, get_timestamp)
|
||||
& has_required_feature!(screen, is_format_supported)
|
||||
& has_required_feature!(screen, resource_create)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include "util/u_upload_mgr.h"
|
||||
#include "util/u_printf.h"
|
||||
#include "util/u_sampler.h"
|
||||
#include "util/u_screen.h"
|
||||
#include "util/u_surface.h"
|
||||
#include "util/u_transfer.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue