Changeset 104864 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jun 7, 2024 8:45:19 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
r104851 r104864 836 836 ULONG *aMinMB, ULONG *aMaxMB, ULONG *aStrideSizeMB) 837 837 { 838 #if !defined(VBOX_WITH_VMSVGA) || !defined(VBOX_WITH_VMSVGA3D)839 RT_NOREF(fAccelerate3DEnabled);840 #endif841 842 838 size_t cbMin; 843 839 size_t cbMax; … … 847 843 { 848 844 case GraphicsControllerType_VBoxVGA: 845 { 849 846 cbMin = VGA_VRAM_MIN; 850 847 cbMax = VGA_VRAM_MAX; 851 848 break; 849 } 852 850 853 851 case GraphicsControllerType_VMSVGA: 854 cbMin = VGA_VRAM_MIN; 855 cbMax = VGA_VRAM_MAX; 856 break; 857 852 RT_FALL_THROUGH(); 858 853 case GraphicsControllerType_VBoxSVGA: 859 #ifdef VBOX_WITH_VMSVGA 860 # ifdef VBOX_WITH_VMSVGA3D 854 { 861 855 if (fAccelerate3DEnabled) 862 856 cbMin = VBOX_SVGA_VRAM_MIN_SIZE_3D; 863 857 else 864 # endif865 858 cbMin = VBOX_SVGA_VRAM_MIN_SIZE; 866 859 /* We don't want to limit ourselves to VBOX_SVGA_VRAM_MAX_SIZE, 867 * so we use VGA_VRAM_MAX (as we do for VBoxVGA + VMSVGA) here as well. */860 * so we use VGA_VRAM_MAX for all controllers. */ 868 861 cbMax = VGA_VRAM_MAX; 869 862 break; 870 #else 871 return VBOX_E_NOT_SUPPORTED; 872 #endif 863 } 873 864 874 865 case GraphicsControllerType_QemuRamFB: 866 { 875 867 /* We seem to hardcode 32-bit (4 bytes) as BPP, see RAMFB_BPP in QemuRamfb.c. */ 876 868 cbMin = 4 /* BPP in bytes */ * 16 * 16; /* Values taken from qemu/hw/display/ramfb.c */ 877 869 cbMax = 4 /* BPP in bytes */ * 16000 * 12000; /* Values taken from bochs-vbe.h. */ 878 break; 870 /* Make the maximum value a power of two. */ 871 cbMax = RT_BIT_64(ASMBitLastSetU64(cbMax)); 872 break; 873 } 879 874 880 875 default: 881 876 return E_INVALIDARG; 882 877 } 878 879 /* Sanity. We want all max values to be a power of two. */ 880 AssertMsg(RT_IS_POWER_OF_TWO(cbMax), ("Maximum VRAM value is not a power of two!\n")); 883 881 884 882 /* Convert bytes -> MB, align to stride. */
Note:
See TracChangeset
for help on using the changeset viewer.