capi: swap width and height back

This commit is contained in:
chyyran 2023-01-27 18:17:35 -05:00
parent 1e99c169db
commit 7900f8538e
7 changed files with 27 additions and 24 deletions

View file

@ -149,10 +149,10 @@ typedef struct libra_source_image_gl_t {
uint32_t handle;
/// The format of the source image.
uint32_t format;
/// The height of the source image.
uint32_t height;
/// The width of the source image.
uint32_t width;
/// The height of the source image.
uint32_t height;
} libra_source_image_gl_t;
#endif
@ -162,10 +162,10 @@ typedef struct libra_viewport_t {
float x;
/// The y offset in the viewport framebuffer to begin rendering from.
float y;
/// The height of the viewport framebuffer.
uint32_t height;
/// The width of the viewport framebuffer.
uint32_t width;
/// The height of the viewport framebuffer.
uint32_t height;
} libra_viewport_t;
#if defined(LIBRA_RUNTIME_OPENGL)
@ -206,14 +206,14 @@ typedef struct _filter_chain_d3d11 *libra_d3d11_filter_chain_t;
#endif
#if defined(LIBRA_RUNTIME_D3D11)
/// OpenGL parameters for the source image.
/// Direct3D 11 parameters for the source image.
typedef struct libra_source_image_d3d11_t {
/// A shader resource view into the source image
const ID3D11ShaderResourceView * handle;
/// The height of the source image.
uint32_t height;
/// The width of the source image.
uint32_t width;
/// The height of the source image.
uint32_t height;
} libra_source_image_d3d11_t;
#endif
@ -267,10 +267,10 @@ typedef struct libra_image_vk_t {
VkImage handle;
/// The `VkFormat` of the source image.
VkFormat format;
/// The height of the source image.
uint32_t height;
/// The width of the source image.
uint32_t width;
/// The height of the source image.
uint32_t height;
} libra_image_vk_t;
#endif

View file

@ -33,8 +33,8 @@ pub struct libra_viewport_t {
pub x: f32,
/// The y offset in the viewport framebuffer to begin rendering from.
pub y: f32,
/// The height of the viewport framebuffer.
pub height: u32,
/// The width of the viewport framebuffer.
pub width: u32,
/// The height of the viewport framebuffer.
pub height: u32,
}

View file

@ -21,10 +21,10 @@ use librashader::runtime::{FilterChainParameters, Size, Viewport};
pub struct libra_source_image_d3d11_t {
/// A shader resource view into the source image
pub handle: ManuallyDrop<ID3D11ShaderResourceView>,
/// The height of the source image.
pub height: u32,
/// The width of the source image.
pub width: u32,
/// The height of the source image.
pub height: u32,
}
impl TryFrom<libra_source_image_d3d11_t> for D3D11InputView {

View file

@ -23,10 +23,10 @@ pub struct libra_source_image_gl_t {
pub handle: u32,
/// The format of the source image.
pub format: u32,
/// The height of the source image.
pub height: u32,
/// The width of the source image.
pub width: u32,
/// The height of the source image.
pub height: u32,
}
/// OpenGL parameters for the output framebuffer.

View file

@ -28,10 +28,10 @@ pub struct libra_image_vk_t {
pub handle: vk::Image,
/// The `VkFormat` of the source image.
pub format: vk::Format,
/// The height of the source image.
pub height: u32,
/// The width of the source image.
pub width: u32,
/// The height of the source image.
pub height: u32,
}
/// Handles required to instantiate vulkan

View file

@ -476,10 +476,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
deviceContext->CopyResource(framebufferCopy, framebufferTexture);
libra_source_image_d3d11_t input = {framebufferCopySRV, framebufferVP.Height,
framebufferVP.Width};
libra_source_image_d3d11_t input = {framebufferCopySRV,
framebufferVP.Width,
framebufferVP.Height
};
libra_viewport_t vp = {0, 0, framebufferVP.Height, framebufferVP.Width};
libra_viewport_t vp = {0, 0, framebufferVP.Width, framebufferVP.Height,};
frame_d3d11_opt_t frame_opt = {.clear_history = false,
.frame_direction = -1};

View file

@ -397,10 +397,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/,
assert(copySrv != nullptr);
libra_source_image_d3d11_t input = {copySrv, viewport.Height,
viewport.Width};
libra_source_image_d3d11_t input = {copySrv,
viewport.Width,
viewport.Height,};
libra_viewport_t vp = {0, 0, viewport.Height, viewport.Width};
libra_viewport_t vp = {0, 0, viewport.Width, viewport.Height, };
libra.d3d11_filter_chain_frame(&filter_chain, frameCount, input, vp,
d3d11FrameBufferView, NULL, NULL);