mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-23 10:30:23 +00:00
GPUDevice: Remove unused fields
This commit is contained in:
parent
5c7a599cad
commit
8ca68a052a
@ -855,10 +855,8 @@ std::unique_ptr<GPUTextureBuffer> OpenGLDevice::CreateTextureBuffer(GPUTextureBu
|
|||||||
}
|
}
|
||||||
|
|
||||||
OpenGLDownloadTexture::OpenGLDownloadTexture(u32 width, u32 height, GPUTexture::Format format, bool imported,
|
OpenGLDownloadTexture::OpenGLDownloadTexture(u32 width, u32 height, GPUTexture::Format format, bool imported,
|
||||||
GLuint buffer_id, u8* cpu_buffer, u32 buffer_size, const u8* map_ptr,
|
GLuint buffer_id, u8* cpu_buffer, const u8* map_ptr, u32 map_pitch)
|
||||||
u32 map_pitch)
|
: GPUDownloadTexture(width, height, format, imported), m_buffer_id(buffer_id), m_cpu_buffer(cpu_buffer)
|
||||||
: GPUDownloadTexture(width, height, format, imported), m_buffer_id(buffer_id), m_buffer_size(buffer_size),
|
|
||||||
m_cpu_buffer(cpu_buffer)
|
|
||||||
{
|
{
|
||||||
m_map_pointer = map_ptr;
|
m_map_pointer = map_ptr;
|
||||||
m_current_pitch = map_pitch;
|
m_current_pitch = map_pitch;
|
||||||
@ -922,8 +920,8 @@ std::unique_ptr<OpenGLDownloadTexture> OpenGLDownloadTexture::Create(u32 width,
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::unique_ptr<OpenGLDownloadTexture>(new OpenGLDownloadTexture(
|
return std::unique_ptr<OpenGLDownloadTexture>(
|
||||||
width, height, format, false, buffer_id, nullptr, buffer_size, buffer_map, buffer_pitch));
|
new OpenGLDownloadTexture(width, height, format, false, buffer_id, nullptr, buffer_map, buffer_pitch));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback to glReadPixels() + CPU buffer.
|
// Fallback to glReadPixels() + CPU buffer.
|
||||||
@ -937,7 +935,7 @@ std::unique_ptr<OpenGLDownloadTexture> OpenGLDownloadTexture::Create(u32 width,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return std::unique_ptr<OpenGLDownloadTexture>(
|
return std::unique_ptr<OpenGLDownloadTexture>(
|
||||||
new OpenGLDownloadTexture(width, height, format, imported, 0, cpu_buffer, buffer_size, cpu_buffer, buffer_pitch));
|
new OpenGLDownloadTexture(width, height, format, imported, 0, cpu_buffer, cpu_buffer, buffer_pitch));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenGLDownloadTexture::CopyFromTexture(u32 dst_x, u32 dst_y, GPUTexture* src, u32 src_x, u32 src_y, u32 width,
|
void OpenGLDownloadTexture::CopyFromTexture(u32 dst_x, u32 dst_y, GPUTexture* src, u32 src_x, u32 src_y, u32 width,
|
||||||
|
@ -133,10 +133,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
OpenGLDownloadTexture(u32 width, u32 height, GPUTexture::Format format, bool imported, GLuint buffer_id,
|
OpenGLDownloadTexture(u32 width, u32 height, GPUTexture::Format format, bool imported, GLuint buffer_id,
|
||||||
u8* cpu_buffer, u32 buffer_size, const u8* map_ptr, u32 map_pitch);
|
u8* cpu_buffer, const u8* map_ptr, u32 map_pitch);
|
||||||
|
|
||||||
GLuint m_buffer_id = 0;
|
GLuint m_buffer_id = 0;
|
||||||
u32 m_buffer_size = 0;
|
|
||||||
|
|
||||||
GLsync m_sync = {};
|
GLsync m_sync = {};
|
||||||
|
|
||||||
|
@ -986,9 +986,9 @@ std::unique_ptr<GPUTextureBuffer> VulkanDevice::CreateTextureBuffer(GPUTextureBu
|
|||||||
|
|
||||||
VulkanDownloadTexture::VulkanDownloadTexture(u32 width, u32 height, GPUTexture::Format format, VmaAllocation allocation,
|
VulkanDownloadTexture::VulkanDownloadTexture(u32 width, u32 height, GPUTexture::Format format, VmaAllocation allocation,
|
||||||
VkDeviceMemory memory, VkBuffer buffer, VkDeviceSize memory_offset,
|
VkDeviceMemory memory, VkBuffer buffer, VkDeviceSize memory_offset,
|
||||||
VkDeviceSize buffer_size, const u8* map_ptr, u32 map_pitch)
|
const u8* map_ptr, u32 map_pitch)
|
||||||
: GPUDownloadTexture(width, height, format, (memory != VK_NULL_HANDLE)), m_allocation(allocation), m_memory(memory),
|
: GPUDownloadTexture(width, height, format, (memory != VK_NULL_HANDLE)), m_allocation(allocation), m_memory(memory),
|
||||||
m_buffer(buffer), m_memory_offset(memory_offset), m_buffer_size(buffer_size)
|
m_buffer(buffer), m_memory_offset(memory_offset)
|
||||||
{
|
{
|
||||||
m_map_pointer = map_ptr;
|
m_map_pointer = map_ptr;
|
||||||
m_current_pitch = map_pitch;
|
m_current_pitch = map_pitch;
|
||||||
@ -1068,8 +1068,8 @@ std::unique_ptr<VulkanDownloadTexture> VulkanDownloadTexture::Create(u32 width,
|
|||||||
map_ptr = static_cast<u8*>(memory);
|
map_ptr = static_cast<u8*>(memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::unique_ptr<VulkanDownloadTexture>(new VulkanDownloadTexture(
|
return std::unique_ptr<VulkanDownloadTexture>(new VulkanDownloadTexture(width, height, format, allocation, dev_memory,
|
||||||
width, height, format, allocation, dev_memory, buffer, memory_offset, buffer_size, map_ptr, map_pitch));
|
buffer, memory_offset, map_ptr, map_pitch));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VulkanDownloadTexture::CopyFromTexture(u32 dst_x, u32 dst_y, GPUTexture* src, u32 src_x, u32 src_y, u32 width,
|
void VulkanDownloadTexture::CopyFromTexture(u32 dst_x, u32 dst_y, GPUTexture* src, u32 src_x, u32 src_y, u32 width,
|
||||||
|
@ -182,7 +182,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
VulkanDownloadTexture(u32 width, u32 height, GPUTexture::Format format, VmaAllocation allocation,
|
VulkanDownloadTexture(u32 width, u32 height, GPUTexture::Format format, VmaAllocation allocation,
|
||||||
VkDeviceMemory memory, VkBuffer buffer, VkDeviceSize memory_offset, VkDeviceSize buffer_size,
|
VkDeviceMemory memory, VkBuffer buffer, VkDeviceSize memory_offset,
|
||||||
const u8* map_ptr, u32 map_pitch);
|
const u8* map_ptr, u32 map_pitch);
|
||||||
|
|
||||||
VmaAllocation m_allocation = VK_NULL_HANDLE;
|
VmaAllocation m_allocation = VK_NULL_HANDLE;
|
||||||
@ -191,7 +191,6 @@ private:
|
|||||||
|
|
||||||
u64 m_copy_fence_counter = 0;
|
u64 m_copy_fence_counter = 0;
|
||||||
VkDeviceSize m_memory_offset = 0;
|
VkDeviceSize m_memory_offset = 0;
|
||||||
VkDeviceSize m_buffer_size = 0;
|
|
||||||
|
|
||||||
bool m_needs_cache_invalidate = false;
|
bool m_needs_cache_invalidate = false;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user