儲存庫 vbox 的更動 104780
- 時間撮記:
- 2024-5-24 下午02:15:44 (6 月 以前)
- 位置:
- trunk/src/VBox/Main
- 檔案:
-
- 修改 5 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/Makefile.kmk
r104683 r104780 212 212 VBOX_MAIN_DEFS += VBOX_WITH_NEW_SYS_V_KEYGEN 213 213 214 # Main graphics include paths. Used by VBoxC and VBoxSVC. 215 VBOX_MAIN_GRAPHICS_INCS = \ 216 $(PATH_ROOT)/src/VBox/Devices/Graphics/ \ 217 $(if $(VBOX_WITH_VMSVGA),$(PATH_ROOT)/src/VBox/Devices/Graphics/vmsvga_include,) \ 218 $(VBOX_GRAPHICS_INCS) 214 219 215 220 VBOX_IDL_FILE.MSCOM = $(VBOX_PATH_SDK)/bindings/mscom/idl/VirtualBox.idl … … 568 573 $(dir $(VBOX_XML_SCHEMADEFS_H)) \ 569 574 $(VBOX_MAIN_APIWRAPPER_INCS) \ 575 $(VBOX_MAIN_GRAPHICS_INCS) \ 570 576 . \ 571 $(VBOX_GRAPHICS_INCS)572 577 VBoxSVC_INCS.win = \ 573 578 $(VBoxCOM_0_OUTDIR) … … 1069 1074 $(dir $(VBOX_XML_SCHEMADEFS_H)) \ 1070 1075 $(VBOX_MAIN_APIWRAPPER_DIR)/dtrace \ 1071 $(VBOX_GRAPHICS_INCS)1076 $(VBOX_MAIN_GRAPHICS_INCS) 1072 1077 VBoxC_INCS.win = \ 1073 1078 $(VBoxCOM_0_OUTDIR) \ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r103553 r104780 12824 12824 name="IPlatformProperties" 12825 12825 extends="$unknown" 12826 uuid=" 45def725-ab32-4a0a-a85e-fae56249d547"12826 uuid="a23502e4-cc54-490f-a344-c8ca8813f906" 12827 12827 wsmap="managed" 12828 12828 rest="managed" … … 13081 13081 <param name="maxInstances" type="unsigned long" dir="return"> 13082 13082 <desc>The maximum number of instances for the given storage bus.</desc> 13083 </param> 13084 </method> 13085 13086 <method name="getSupportedVRAMRange"> 13087 <desc> 13088 Returns the VRAM range of a given graphics controller. 13089 </desc> 13090 13091 <param name="graphicsControllerType" type="GraphicsControllerType" dir="in"> 13092 <desc>Graphics controller type to return VRAM range for.</desc> 13093 </param> 13094 13095 <param name="accelerate3DEnabled" type="boolean" dir="in"> 13096 <desc>Whether 3D acceleration for the graphics controller type is enabled or not. 13097 Ignored if the given graphics controller does not support 3D acceleration.</desc> 13098 </param> 13099 13100 <param name="minMB" type="unsigned long" dir="out"> 13101 <desc>The minimum size (in MB) the graphics controller supports.</desc> 13102 </param> 13103 13104 <param name="maxMB" type="unsigned long" dir="out"> 13105 <desc>The maximum size (in MB) the graphics controller supports.</desc> 13106 </param> 13107 13108 <param name="strideSizeMB" type="unsigned long" dir="return"> 13109 <desc>The stride size the graphics controller supports. This marks the allowed steps between the values 13110 when increasing / decreasing the VRAM size.</desc> 13083 13111 </param> 13084 13112 </method> -
trunk/src/VBox/Main/include/PlatformPropertiesImpl.h
r103977 r104780 108 108 StorageBus_T aBus, 109 109 ULONG *aMaxInstances) RT_OVERRIDE; 110 HRESULT getSupportedVRAMRange(GraphicsControllerType_T aGraphicsControllerType, BOOL fAccelerate3DEnabled, 111 ULONG *aMinMB, ULONG *aMaxMB, ULONG *aStrideSizeMB) RT_OVERRIDE; 110 112 HRESULT getDeviceTypesForStorageBus(StorageBus_T aBus, 111 113 std::vector<DeviceType_T> &aDeviceTypes) RT_OVERRIDE; -
trunk/src/VBox/Main/src-all/PlatformPropertiesImpl.cpp
r102113 r104780 32 32 #include "Global.h" 33 33 34 #include "VBox/vmm/pdmcritsect.h" /* required by DevVGA.h */ 35 #include "VBox/param.h" /* Ditto. */ 36 #include "DevVGA.h" 37 34 38 #include <iprt/cpp/utils.h> 35 39 … … 821 825 } 822 826 827 HRESULT PlatformProperties::getSupportedVRAMRange(GraphicsControllerType_T aGraphicsControllerType, BOOL fAccelerate3DEnabled, 828 ULONG *aMinMB, ULONG *aMaxMB, ULONG *aStrideSizeMB) 829 { 830 #if !defined(VBOX_WITH_VMSVGA) || !defined(VBOX_WITH_VMSVGA3D) 831 RT_NOREF(fAccelerate3DEnabled); 832 #endif 833 834 size_t cbMin; 835 size_t cbMax; 836 size_t cbStride = _1M; /* Default stride for all controllers. */ 837 838 switch (aGraphicsControllerType) 839 { 840 case GraphicsControllerType::VBoxVGA: 841 { 842 cbMin = VGA_VRAM_MIN; 843 cbMax = VGA_VRAM_MAX; 844 break; 845 } 846 847 case GraphicsControllerType::VMSVGA: 848 { 849 cbMin = VGA_VRAM_MIN; 850 cbMax = VGA_VRAM_MAX; 851 break; 852 } 853 854 case GraphicsControllerType::VBoxSVGA: 855 { 856 #ifdef VBOX_WITH_VMSVGA 857 # ifdef VBOX_WITH_VMSVGA3D 858 if (fAccelerate3DEnabled) 859 cbMin = SVGA_VRAM_MIN_SIZE_3D; 860 else 861 # endif /* VBOX_WITH_VMSVGA3D */ 862 cbMin = SVGA_VRAM_MIN_SIZE; 863 cbMax = SVGA_VRAM_MAX_SIZE; 864 #else 865 return setError(VBOX_E_NOT_SUPPORTED, tr("Support for SVGA not available in this version")); 866 #endif 867 break; 868 } 869 870 case GraphicsControllerType::QemuRamFB: 871 { 872 /* We seem to hardcode 32-bit (4 bytes) as BPP, see RAMFB_BPP in QemuRamfb.c. */ 873 cbMin = 4 /* BPP in bytes */ * 16 * 16; /* Values taken from qemu/hw/display/ramfb.c */ 874 cbMax = 4 /* BPP in bytes */ * 16000 * 12000; /* Values taken from bochs-vbe.h. */ 875 break; 876 } 877 878 default: 879 return setError(E_INVALIDARG, tr("The graphics controller type (%d) is invalid"), aGraphicsControllerType); 880 } 881 882 *aMinMB = (ULONG)(RT_ALIGN_64(cbMin, cbStride) / _1M); 883 *aMaxMB = (ULONG)(RT_ALIGN_64(cbMax, cbStride) / _1M); 884 *aStrideSizeMB = (ULONG)cbStride / _1M; 885 886 #define MAKE_POWER_OF_TWO(a_MB) \ 887 while (!RT_IS_POWER_OF_TWO(a_MB)) \ 888 a_MB = a_MB + 1; \ 889 890 MAKE_POWER_OF_TWO(*aMinMB); 891 MAKE_POWER_OF_TWO(*aMaxMB); 892 MAKE_POWER_OF_TWO(*aStrideSizeMB); 893 894 #undef MAKE_POWER_OF_TWO 895 896 return S_OK; 897 } 898 823 899 HRESULT PlatformProperties::getSupportedAudioControllerTypes(std::vector<AudioControllerType_T> &aSupportedAudioControllerTypes) 824 900 { -
trunk/src/VBox/Main/testcase/tstAPI.cpp
r99775 r104780 1148 1148 RTPrintf("\n"); 1149 1149 #endif 1150 1151 do { 1152 PlatformArchitecture_T platformArch = PlatformArchitecture_x86; 1153 ComPtr<IPlatformProperties> platformProperties; 1154 CHECK_ERROR_BREAK(virtualBox, GetPlatformProperties(platformArch, platformProperties.asOutParam())); 1155 ULONG uMinMB, uMaxMB, uStrideMB; 1156 CHECK_ERROR_BREAK(platformProperties, GetSupportedVRAMRange(GraphicsControllerType_VBoxVGA, TRUE /* fAccelerate3DEnabled */, &uMinMB, &uMaxMB, &uStrideMB)); 1157 ASSERT_BREAK(uMinMB && RT_IS_POWER_OF_TWO(uMinMB)); 1158 ASSERT_BREAK(uMaxMB && RT_IS_POWER_OF_TWO(uMaxMB)); 1159 ASSERT_BREAK(uStrideMB && RT_IS_POWER_OF_TWO(uStrideMB)); 1160 } while (0); 1150 1161 1151 1162 #if 1
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器