Beispiel #1
0
        public void GetPhysicalDeviceMemoryProperties(out MgPhysicalDeviceMemoryProperties pMemoryProperties)
        {
            // TODO : overwrite here to shift memory based on which type
            // 0 : buffer based
            // 1 : host defined (for INDIRECT)
            pMemoryProperties = new MgPhysicalDeviceMemoryProperties();
            var slots = new MgMemoryType[8];

            const uint allOn = (uint)(
                MgMemoryPropertyFlagBits.DEVICE_LOCAL_BIT |
                MgMemoryPropertyFlagBits.HOST_CACHED_BIT |
                MgMemoryPropertyFlagBits.HOST_COHERENT_BIT |
                MgMemoryPropertyFlagBits.LAZILY_ALLOCATED_BIT |
                MgMemoryPropertyFlagBits.HOST_VISIBLE_BIT);

            // THE NUMBER OF SLOTS DETERMINE THE DIFFERENT BUFFER TYPES = no of GLMemoryBufferType enums
            slots [0] = new MgMemoryType {
                PropertyFlags = allOn
            };
            slots [1] = new MgMemoryType {
                PropertyFlags = allOn
            };
            slots [2] = new MgMemoryType {
                PropertyFlags = allOn
            };
            slots [3] = new MgMemoryType {
                PropertyFlags = allOn
            };
            slots [4] = new MgMemoryType {
                PropertyFlags = allOn
            };
            slots [5] = new MgMemoryType {
                PropertyFlags = allOn
            };
            slots [6] = new MgMemoryType {
                PropertyFlags = allOn
            };
            slots [7] = new MgMemoryType {
                PropertyFlags = allOn
            };

            pMemoryProperties.MemoryTypes = slots;
        }
Beispiel #2
0
        public void GetPhysicalDeviceMemoryProperties(out MgPhysicalDeviceMemoryProperties pMemoryProperties)
        {
            pMemoryProperties = new MgPhysicalDeviceMemoryProperties();

            const uint allOn = (uint)(
                MgMemoryPropertyFlagBits.DEVICE_LOCAL_BIT |
                MgMemoryPropertyFlagBits.HOST_CACHED_BIT |
                MgMemoryPropertyFlagBits.HOST_COHERENT_BIT |
                MgMemoryPropertyFlagBits.LAZILY_ALLOCATED_BIT |
                MgMemoryPropertyFlagBits.HOST_VISIBLE_BIT);

            // THE NUMBER OF SLOTS DETERMINE THE DIFFERENT BUFFER TYPES
            var slots = new MgMemoryType[1];

            slots[0] = new MgMemoryType {
                PropertyFlags = allOn
            };

            pMemoryProperties.MemoryTypes = slots;
        }