static qboolean BuildXImages(int w, int h)
{
int i;
+ if(DefaultDepth(vidx11_display, vidx11_screen) != 32 && DefaultDepth(vidx11_display, vidx11_screen) != 24)
+ {
+ Con_Printf("Sorry, we only support 24bpp and 32bpp modes\n");
+ VID_Shutdown();
+ return false;
+ }
+ // match to dpsoftrast's specs
+ if(vidx11_visual->red_mask != 0x00FF0000)
+ {
+ Con_Printf("Sorry, we only support BGR visuals\n");
+ VID_Shutdown();
+ return false;
+ }
+ if(vidx11_visual->green_mask != 0x0000FF00)
+ {
+ Con_Printf("Sorry, we only support BGR visuals\n");
+ VID_Shutdown();
+ return false;
+ }
+ if(vidx11_visual->blue_mask != 0x000000FF)
+ {
+ Con_Printf("Sorry, we only support BGR visuals\n");
+ VID_Shutdown();
+ return false;
+ }
if(vidx11_shmevent >= 0)
{
for(i = 0; i < 2; ++i)
VID_Shutdown();
return false;
}
+ if(vidx11_ximage[i]->bytes_per_line != w * 4)
+ {
+ Con_Printf("Sorry, we only support linear pixel layout\n");
+ VID_Shutdown();
+ return false;
+ }
vidx11_shminfo[i].shmid = shmget(IPC_PRIVATE, vidx11_ximage[i]->bytes_per_line * vidx11_ximage[i]->height, IPC_CREAT|0777);
if(vidx11_shminfo[i].shmid < 0)
{
VID_Shutdown();
return false;
}
+ if(vidx11_ximage[i]->bytes_per_line != w * 4)
+ {
+ Con_Printf("Sorry, we only support linear pixel layout\n");
+ VID_Shutdown();
+ return false;
+ }
}
}
return true;