mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 08:44:08 +00:00
hal/egl: add coherence preference, hook up EGL_KHR_debug message callbacks
This commit is contained in:
parent
8fd6b36e6c
commit
cf10138c64
@ -36,7 +36,8 @@ impl CompilationContext<'_> {
|
||||
let slot = self.layout.get_slot(br);
|
||||
|
||||
let name = reflection_info.uniforms[&handle].clone();
|
||||
log::debug!("Rebind buffer: {:?} -> {}", var.name.as_ref(), &name);
|
||||
log::debug!("Rebind buffer: {:?} -> {}, register={:?}, slot={}",
|
||||
var.name.as_ref(), &name, register, slot);
|
||||
self.name_binding_map.insert(name, (register, slot));
|
||||
}
|
||||
|
||||
@ -200,10 +201,7 @@ impl super::Device {
|
||||
log::warn!("\tLink: {}", msg);
|
||||
}
|
||||
|
||||
if !self
|
||||
.shared
|
||||
.private_caps
|
||||
.contains(super::PrivateCapability::EXPLICIT_LAYOUTS_IN_SHADER)
|
||||
//TODO: check for `PrivateCapability::EXPLICIT_LAYOUTS_IN_SHADER`?
|
||||
{
|
||||
gl.use_program(Some(program));
|
||||
for (ref name, (register, slot)) in name_binding_map {
|
||||
|
@ -557,6 +557,7 @@ impl crate::Device<super::Api> for super::Device {
|
||||
.intersects(crate::BufferUse::MAP_READ | crate::BufferUse::MAP_WRITE)
|
||||
{
|
||||
let mut flags = gpu_alloc::UsageFlags::HOST_ACCESS;
|
||||
//TODO: find a way to use `crate::MemoryFlag::PREFER_COHERENT`
|
||||
flags.set(
|
||||
gpu_alloc::UsageFlags::COHERENT,
|
||||
desc.memory_flags
|
||||
|
Loading…
Reference in New Issue
Block a user