1
0
Fork 0
forked from wry/wry

gfx: add GfxBlendBuffer

This commit is contained in:
Julian Orth 2025-02-20 18:29:48 +01:00
parent 446779ab83
commit a7cb2ee42a
14 changed files with 107 additions and 23 deletions

View file

@ -24,9 +24,9 @@ use {
cpu_worker::{CpuWorker, jobs::read_write::ReadWriteJobError},
format::Format,
gfx_api::{
AsyncShmGfxTexture, GfxContext, GfxError, GfxFormat, GfxImage, GfxInternalFramebuffer,
GfxStagingBuffer, ResetStatus, STAGING_DOWNLOAD, STAGING_UPLOAD, ShmGfxTexture,
StagingBufferUsecase,
AsyncShmGfxTexture, GfxBlendBuffer, GfxContext, GfxError, GfxFormat, GfxImage,
GfxInternalFramebuffer, GfxStagingBuffer, ResetStatus, STAGING_DOWNLOAD,
STAGING_UPLOAD, ShmGfxTexture, StagingBufferUsecase,
},
gfx_apis::vulkan::{
image::VulkanImageMemory, instance::VulkanInstance, renderer::VulkanRenderer,
@ -204,6 +204,8 @@ pub enum VulkanError {
UndefinedContents,
#[error("The framebuffer is being used by the transfer queue")]
BusyInTransfer,
#[error("Vulkan does not support blend buffers")]
NoBlendBuffer,
}
impl From<VulkanError> for GfxError {
@ -350,6 +352,14 @@ impl GfxContext for Context {
.device
.create_staging_shell(size as u64, upload, download)
}
fn acquire_blend_buffer(
&self,
_width: i32,
_height: i32,
) -> Result<Rc<dyn GfxBlendBuffer>, GfxError> {
Err(GfxError(Box::new(VulkanError::NoBlendBuffer)))
}
}
impl Drop for Context {