4#ifndef QWINDOWSD3D11TESTDEVICECONTEXT_P_H
5#define QWINDOWSD3D11TESTDEVICECONTEXT_P_H
18#include <QtCore/qbytearray.h>
19#include <QtCore/qbytearrayview.h>
20#include <QtCore/qsize.h>
21#include <QtCore/private/qcomptr_p.h>
22#include <QtCore/private/qexpected_p.h>
23#include <QtGui/qcolor.h>
34using ComResult = q23::expected<T, HRESULT>;
49 const std::vector<QColor> &colors)
const;
61 quint8 chromaUValue, quint8 chromaVValue, UINT arraySlice = 0)
const;
74 quint16 chromaUValue, quint16 chromaVValue, UINT arraySlice = 0)
const;
79 DXGI_FORMAT format)
const;
83 QByteArrayView texel, UINT arraySlice = 0)
const;
90 int width,
int height,
int texelSize,
91 UINT arraySlice = 0)
const;
95 HRESULT fillTextureWithColors(
const ComPtr<ID3D11Texture2D> &texture,
96 const std::vector<QColor> &colors)
const;
102 ComResult<ComPtr<ID3D11Texture2D>>
103 createStagingSliceCopy(
const ComPtr<ID3D11Texture2D> &texture, UINT arraySlice,
104 UINT cpuAccessFlags)
const;
ComResult< QWindowsD3D11TestDeviceContext > wrapRhiD3D11Device(QRhi &rhi)
ComResult< QWindowsD3D11TestDeviceContext > createD3D11TestDeviceContext()
static ComResult< QWindowsD3D11TestDeviceContext > createD3D11TestDeviceContextImpl(D3D_DRIVER_TYPE driverType, UINT flags)
ComResult< QWindowsD3D11TestDeviceContext > createWarpD3D11TestDeviceContext()
ComResult< ComPtr< ID3D11Texture2D > > createSinglePlaneTexture(QSize size, DXGI_FORMAT format) const
ComPtr< ID3D11Device1 > device
ComResult< ComPtr< ID3D11Texture2D > > createFilledNV12Texture(QSize size, quint8 lumaValue, quint8 chromaU, quint8 chromaV) const
ComResult< ComPtr< ID3D11Texture2D > > createNV12Texture(QSize size) const
ComPtr< ID3D11DeviceContext > context
bool isTextureFormatSupported(DXGI_FORMAT format) const
HRESULT fillNV12Texture(const ComPtr< ID3D11Texture2D > &texture, QSize size, quint8 lumaValue, quint8 chromaUValue, quint8 chromaVValue, UINT arraySlice=0) const
ComResult< QColor > getFirstPixelColorBGRA(const ComPtr< ID3D11Texture2D > &texture) const
ComResult< ComPtr< ID3D11Texture2D > > createP010Texture(QSize size) const
ComResult< QByteArray > readPlaneRows(const ComPtr< ID3D11Texture2D > &texture, int rowOffset, int width, int height, int texelSize, UINT arraySlice=0) const
HRESULT fillP010Texture(const ComPtr< ID3D11Texture2D > &texture, QSize size, quint16 lumaValue, quint16 chromaUValue, quint16 chromaVValue, UINT arraySlice=0) const
ComResult< ComPtr< ID3D11Texture2D > > createTextureArray(QSize size, const std::vector< QColor > &colors) const
HRESULT fillSinglePlaneTexture(const ComPtr< ID3D11Texture2D > &texture, QSize size, QByteArrayView texel, UINT arraySlice=0) const
ComResult< QColor > getFirstPixelColor(const ComPtr< ID3D11Texture2D > &texture) const