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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user