mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 12:20:10 +01:00
gfxstream: move isHostVisible function
It's separable from the rest of CoherentMemory class. Reviewed-by: Marcin Radomski <dextero@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32015>
This commit is contained in:
parent
5d299a0bd4
commit
6a9eb986c2
3 changed files with 4 additions and 6 deletions
|
|
@ -16,10 +16,6 @@ using android::base::SubAllocator;
|
|||
namespace gfxstream {
|
||||
namespace vk {
|
||||
|
||||
bool isHostVisible(const VkPhysicalDeviceMemoryProperties* memoryProps, uint32_t index) {
|
||||
return memoryProps->memoryTypes[index].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
}
|
||||
|
||||
CoherentMemory::CoherentMemory(VirtGpuResourceMappingPtr blobMapping, uint64_t size,
|
||||
VkDevice device, VkDeviceMemory memory)
|
||||
: mSize(size), mBlobMapping(blobMapping), mDevice(device), mMemory(memory) {
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@ constexpr uint64_t kHostVisibleHeapSize = 512 * kMegaByte; // 512 mb
|
|||
namespace gfxstream {
|
||||
namespace vk {
|
||||
|
||||
bool isHostVisible(const VkPhysicalDeviceMemoryProperties* memoryProps, uint32_t index);
|
||||
|
||||
using GoldfishAddressSpaceBlockPtr = std::shared_ptr<GoldfishAddressSpaceBlock>;
|
||||
using SubAllocatorPtr = std::unique_ptr<android::base::SubAllocator>;
|
||||
|
||||
|
|
|
|||
|
|
@ -268,6 +268,10 @@ bool descriptorBindingIsImmutableSampler(VkDescriptorSet dstSet, uint32_t dstBin
|
|||
return as_goldfish_VkDescriptorSet(dstSet)->reified->bindingIsImmutableSampler[dstBinding];
|
||||
}
|
||||
|
||||
static bool isHostVisible(const VkPhysicalDeviceMemoryProperties* memoryProps, uint32_t index) {
|
||||
return memoryProps->memoryTypes[index].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
}
|
||||
|
||||
VkDescriptorImageInfo ResourceTracker::filterNonexistentSampler(
|
||||
const VkDescriptorImageInfo& inputInfo) {
|
||||
VkSampler sampler = inputInfo.sampler;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue