mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 12:43:44 -04:00
more intel resize fixes
This commit is contained in:
parent
739a4607e3
commit
ddad37725c
@ -2034,8 +2034,9 @@ void wdxGraphicsWindow::search_for_valid_displaymode(UINT RequestedXsize,UINT Re
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if(_dxgsg->scrn.bIsLowVidMemCard)
|
// no longer true, due to special_check_fullscreen_res, where lowvidmem cards are allowed higher resolutions
|
||||||
nassertv((RequestedXsize==640)&&(RequestedYsize==480));
|
// if(_dxgsg->scrn.bIsLowVidMemCard)
|
||||||
|
// nassertv((RequestedXsize==640)&&(RequestedYsize==480));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
*pSuggestedPixFmt = D3DFMT_UNKNOWN;
|
*pSuggestedPixFmt = D3DFMT_UNKNOWN;
|
||||||
@ -2075,13 +2076,14 @@ void wdxGraphicsWindow::search_for_valid_displaymode(UINT RequestedXsize,UINT Re
|
|||||||
wdxdisplay_cat.error() << "CheckDeviceFormat failed for device #" <<_dxgsg->scrn.CardIDNum << D3DERRORSTRING(hr);
|
wdxdisplay_cat.error() << "CheckDeviceFormat failed for device #" <<_dxgsg->scrn.CardIDNum << D3DERRORSTRING(hr);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bIs16bppRenderTgt = IS_16BPP_DISPLAY_FORMAT(dispmode.Format);
|
bool bIs16bppRenderTgt = IS_16BPP_DISPLAY_FORMAT(dispmode.Format);
|
||||||
float RendTgtMinMemReqmt;
|
float RendTgtMinMemReqmt;
|
||||||
|
|
||||||
// if we have a valid memavail value, try to determine if we have enough space
|
// if we have a valid memavail value, try to determine if we have enough space
|
||||||
if(_dxgsg->scrn.MaxAvailVidMem!=UNKNOWN_VIDMEM_SIZE) {
|
if( (_dxgsg->scrn.MaxAvailVidMem!=UNKNOWN_VIDMEM_SIZE) &&
|
||||||
|
(!(special_check_fullscreen_resolution(RequestedXsize,RequestedYsize)))) {
|
||||||
// assume user is testing fullscreen, not windowed, so use the dwTotal value
|
// assume user is testing fullscreen, not windowed, so use the dwTotal value
|
||||||
// see if 3 scrnbufs (front/back/z)at 16bpp at xsize*ysize will fit with a few
|
// see if 3 scrnbufs (front/back/z)at 16bpp at xsize*ysize will fit with a few
|
||||||
// extra megs for texmem
|
// extra megs for texmem
|
||||||
@ -2117,8 +2119,9 @@ void wdxGraphicsWindow::search_for_valid_displaymode(UINT RequestedXsize,UINT Re
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_dxgsg->scrn.MaxAvailVidMem!=UNKNOWN_VIDMEM_SIZE) {
|
if((_dxgsg->scrn.MaxAvailVidMem!=UNKNOWN_VIDMEM_SIZE) &&
|
||||||
// test memory
|
(!(special_check_fullscreen_resolution(RequestedXsize,RequestedYsize)))) {
|
||||||
|
// test memory again, this time including zbuf size
|
||||||
float zbytes_per_pixel = (IS_16BPP_ZBUFFER(zformat) ? 2 : 4);
|
float zbytes_per_pixel = (IS_16BPP_ZBUFFER(zformat) ? 2 : 4);
|
||||||
float MinMemReqmt = RendTgtMinMemReqmt + ((float)RequestedXsize)*((float)RequestedYsize)*zbytes_per_pixel;
|
float MinMemReqmt = RendTgtMinMemReqmt + ((float)RequestedXsize)*((float)RequestedYsize)*zbytes_per_pixel;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user