DXGI_FORMAT texformat;
DXGI_FORMAT intformat;
bool m_tearingSupport;
- int texdepth;
int dmult, dmultx;
int xoffset, yoffset;
float xmult, ymult;
desc.Height = d3d->m_bitmapHeight;
desc.MipLevels = 1;
desc.ArraySize = 1;
- desc.Format = d3d->scrformat;
+ desc.Format = d3d->texformat;
desc.SampleDesc.Count = 1;
desc.SampleDesc.Quality = 0;
desc.Usage = D3D11_USAGE_STAGING;
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
srvDesc.Texture2D.MostDetailedMip = 0;
srvDesc.Texture2D.MipLevels = desc.MipLevels;
- srvDesc.Format = d3d->scrformat;
+ srvDesc.Format = d3d->texformat;
hr = d3d->m_device->CreateShaderResourceView(d3d->texture2d, &srvDesc, &d3d->texture2drv);
if (FAILED(hr)) {
d3d->delayedfs = 0;
d3d->device_errors = 0;
- if (depth != 32 && depth != 16)
+ if (depth != 32)
return 0;
if (!can_D3D11(false))
d3d->m_screenWidth = w_w;
d3d->m_screenHeight = w_h;
d3d->ahwnd = ahwnd;
- d3d->texformat = depth == 32 ? DXGI_FORMAT_B8G8R8A8_UNORM : DXGI_FORMAT_B5G6R5_UNORM;
+ d3d->texformat = DXGI_FORMAT_B8G8R8A8_UNORM;
d3d->intformat = DXGI_FORMAT_B8G8R8A8_UNORM; // _SRGB;
d3d->scrformat = DXGI_FORMAT_B8G8R8A8_UNORM;
- d3d->texdepth = depth;
d3d->dmultx = mmult;
struct MultiDisplay *md = getdisplay(&currprefs, monid);
}
}
+static bool canmatchdepth(void)
+{
+ if (!currprefs.win32_rtgmatchdepth)
+ return false;
+ if (currprefs.gfx_api >= 2)
+ return false;
+ return true;
+}
static void updatemodes(struct AmigaMonitor *mon)
{
#else
mon->currentmode.current_depth = currprefs.color_mode < 5 ? 16 : 32;
#endif
- if (mon->screen_is_picasso && currprefs.win32_rtgmatchdepth && isfullscreen () > 0) {
+ if (mon->screen_is_picasso && canmatchdepth() && isfullscreen () > 0) {
int pbits = state->BytesPerPixel * 8;
if (pbits <= 8) {
if (mon->currentmode.current_depth == 32)
if (!mon->scalepicasso && currprefs.win32_rtgscaleaspectratio)
mon->scalepicasso = -1;
} else if (isfullscreen () > 0) {
- if (!currprefs.win32_rtgmatchdepth) { // can't scale to different color depth
+ if (!canmatchdepth()) { // can't scale to different color depth
if (mon->currentmode.native_width > state->Width && mon->currentmode.native_height > state->Height) {
if (currprefs.gf[1].gfx_filter_autoscale)
mon->scalepicasso = 1;
if (isfullscreen () > 0) {
/* fullscreen to fullscreen */
if (mon->screen_is_picasso) {
- if (state->BytesPerPixel > 1 && state->BytesPerPixel * 8 != wc->current_depth && currprefs.win32_rtgmatchdepth)
+ if (state->BytesPerPixel > 1 && state->BytesPerPixel * 8 != wc->current_depth && canmatchdepth())
return -1;
if (state->Width < wc->current_width && state->Height < wc->current_height) {
- if ((currprefs.gf[1].gfx_filter_autoscale == 1 || (currprefs.gf[1].gfx_filter_autoscale == 2 && currprefs.win32_rtgallowscaling)) && !currprefs.win32_rtgmatchdepth)
+ if ((currprefs.gf[1].gfx_filter_autoscale == 1 || (currprefs.gf[1].gfx_filter_autoscale == 2 && currprefs.win32_rtgallowscaling)) && !canmatchdepth())
return 0;
}
if (state->Width != wc->current_width ||
state->Height == wc->current_height) {
if (state->BytesPerPixel * 8 == wc->current_depth || state->BytesPerPixel == 1)
return 0;
- if (!currprefs.win32_rtgmatchdepth)
+ if (!canmatchdepth())
return 0;
}
return 1;