예제 #1
0
 private SoftwareCommandBuffer(SoftwareDevice device, VkCommandBufferAllocateInfo allocInfo)
 {
     this.m_device    = device;
     this.m_allocInfo = allocInfo;
     this.m_Commands  = new List <SoftwareBufferCommand>();
     this.m_State     = CommandBufferState.Initial;
 }
예제 #2
0
 public SoftwareSwapchain(SoftwareDevice device, VkSwapchainCreateInfoKHR createInfo)
 {
     this.m_device     = device;
     this.m_surface    = (BaseSoftwareSurface)createInfo.surface;
     this.m_createInfo = createInfo;
     this.m_Images     = new List <SoftwareImage>();
 }
예제 #3
0
        private SoftwareImage(SoftwareDevice device, VkFormat format, VkExtent3D imageExtent, VkColorSpaceKHR colorSpace, out VkResult result)
        {
            this.m_device          = device;
            this.m_imageFormat     = format;
            this.m_imageExtent     = imageExtent;
            this.m_imageColorSpace = colorSpace;

            Initialize(out result);
        }
예제 #4
0
        private SoftwareImage(SoftwareDevice device, VkSwapchainCreateInfoKHR createInfo, out VkResult result)
        {
            this.m_device = device;

            this.m_imageFormat     = createInfo.imageFormat;
            this.m_imageExtent     = VkExtent3D.Create(createInfo.imageExtent.width, createInfo.imageExtent.height, 1);
            this.m_imageColorSpace = createInfo.imageColorSpace;

            Initialize(out result);
        }
예제 #5
0
        private SoftwareImage(SoftwareDevice device, VkImageCreateInfo pCreateInfo, out VkResult result)
        {
            this.m_device     = device;
            this.m_createInfo = pCreateInfo;

            this.m_imageFormat     = pCreateInfo.format;
            this.m_imageExtent     = pCreateInfo.extent;
            this.m_imageColorSpace = VkColorSpaceKHR.VK_COLOR_SPACE_SRGB_NONLINEAR_KHR;

            Initialize(out result);
        }
예제 #6
0
        public SoftwareExecutionContext(SoftwareDevice device, SoftwareCommandBuffer commandBuffer)
        {
            this.m_Device        = device;
            this.m_CommandBuffer = commandBuffer;

            this.m_VertexBuffers        = new SoftwareBuffer[P_MAX_VERTEX_BUFFERS];
            this.m_VertexBuffersOffsets = new int[P_MAX_VERTEX_BUFFERS];

            this.m_DescriptorSets = new SoftwareDescriptorSet[P_MAX_DESCRIPTOR_SETS];

            this.RenderPassScope = RenderPassScopeEnum.Outside;
        }
예제 #7
0
        public static SoftwareImage CreateSwapchainImage(SoftwareDevice device, VkSwapchainCreateInfoKHR swapchainInfo, out VkResult result)
        {
            VkImageCreateInfo createInfo = new VkImageCreateInfo();

            createInfo.extent        = VkExtent3D.Create(swapchainInfo.imageExtent.width, swapchainInfo.imageExtent.height, 1);
            createInfo.format        = swapchainInfo.imageFormat;
            createInfo.imageType     = VkImageType.VK_IMAGE_TYPE_2D;
            createInfo.arrayLayers   = swapchainInfo.imageArrayLayers;
            createInfo.sharingMode   = swapchainInfo.imageSharingMode;
            createInfo.usage         = VkImageUsageFlags.VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VkImageUsageFlags.VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
            createInfo.samples       = VkSampleCountFlagBits.VK_SAMPLE_COUNT_1_BIT;
            createInfo.mipLevels     = 1;
            createInfo.initialLayout = VkImageLayout.VK_IMAGE_LAYOUT_UNDEFINED;

            return(new SoftwareImage(device, createInfo, out result));
        }
예제 #8
0
        public static VkResult Create(SoftwareDevice device, VkSwapchainCreateInfoKHR createInfo, out VkSwapchainKHR swapChain)
        {
            SoftwareSwapchain retVal = new SoftwareSwapchain(device, createInfo);

            retVal.m_Images.Clear();

            while (retVal.m_Images.Count < createInfo.minImageCount)
            {
                VkResult      resultCode;
                SoftwareImage image = SoftwareImage.CreateSwapchainImage(device, createInfo, out resultCode);
                if (resultCode != VkResult.VK_SUCCESS)
                {
                    swapChain = default(VkSwapchainKHR);
                    return(resultCode);
                }
                retVal.m_Images.Add(image);
            }

            swapChain = retVal;
            return(VkResult.VK_SUCCESS);
        }
예제 #9
0
 public SoftwareSemaphore(SoftwareDevice device, VkSemaphoreCreateInfo semaphoreCreateInfo)
 {
     this.m_Event  = new AutoResetEvent(false);
     this.m_device = device;
     this.m_semaphoreCreateInfo = semaphoreCreateInfo;
 }
예제 #10
0
 internal SoftwareImageView(SoftwareDevice device, VkImageViewCreateInfo createInfo)
 {
     this.m_device     = device;
     this.m_createInfo = createInfo;
     this.m_image      = (SoftwareImage)createInfo.image;
 }
예제 #11
0
 public SoftwarePipelineLayout(SoftwareDevice device, VkPipelineLayoutCreateInfo createInfo)
 {
     this.m_device     = device;
     this.m_createInfo = createInfo;
 }
예제 #12
0
 public static VkResult Create(SoftwareDevice softwareDevice, VkGraphicsPipelineCreateInfo graphicsPipelineCreateInfo, out VkPipeline pipeline)
 {
     pipeline = new SoftwareGraphicsPipeline(softwareDevice, graphicsPipelineCreateInfo);
     return(VkResult.VK_SUCCESS);
 }
예제 #13
0
 private SoftwareGraphicsPipeline(SoftwareDevice softwareDevice, VkGraphicsPipelineCreateInfo graphicsPipelineCreateInfo)
 {
     this.m_softwareDevice             = softwareDevice;
     this.m_graphicsPipelineCreateInfo = graphicsPipelineCreateInfo;
 }
예제 #14
0
 public static VkResult Create(SoftwareDevice device, VkCommandBufferAllocateInfo commandBufferAllocateInfo, out VkCommandBuffer commandBuffer)
 {
     commandBuffer = new SoftwareCommandBuffer(device, commandBufferAllocateInfo);
     return(VkResult.VK_SUCCESS);
 }
예제 #15
0
 public SoftwareRenderPass(SoftwareDevice device, VkRenderPassCreateInfo createInfo)
 {
     this.m_device     = device;
     this.m_createInfo = createInfo;
 }
예제 #16
0
 public static SoftwareImage CreateImage(SoftwareDevice device, VkImageCreateInfo createInfo, out VkResult result)
 {
     return(new SoftwareImage(device, createInfo, out result));
 }
예제 #17
0
 public SoftwareCommandPool(SoftwareDevice softwareDevice, VkCommandPoolCreateInfo commandPoolCreateInfo)
 {
     this.softwareDevice        = softwareDevice;
     this.commandPoolCreateInfo = commandPoolCreateInfo;
 }
예제 #18
0
 public SoftwareFramebuffer(SoftwareDevice device, VkFramebufferCreateInfo createInfo)
 {
     this.m_device     = device;
     this.m_createInfo = createInfo;
 }
예제 #19
0
 internal static VkResult Create(SoftwarePhysicalDevice softwarePhysicalDevice, VkDeviceCreateInfo createInfo, out VkDevice device)
 {
     device = new SoftwareDevice(softwarePhysicalDevice, createInfo);
     return(VkResult.VK_SUCCESS);
 }
예제 #20
0
		public SoftwareDescriptorPool(SoftwareDevice device, VkDescriptorPoolCreateInfo createinfo)
		{
			this.m_device = device;
			this.m_createinfo = createinfo;
			this.m_DescriptorSets = new List<SoftwareDescriptorSet>();
		}
예제 #21
0
 public static VkResult Create(SoftwareDevice device, VkSemaphoreCreateInfo semaphoreCreateInfo, out VkSemaphore semaphore)
 {
     semaphore = new SoftwareSemaphore(device, semaphoreCreateInfo);
     return(VkResult.VK_SUCCESS);
 }
예제 #22
0
 public SoftwareDeviceMemory(SoftwareDevice device, VkMemoryAllocateInfo allocateInfo)
 {
     this.m_device       = device;
     this.m_allocateInfo = allocateInfo;
     this.m_bytes        = new byte[m_allocateInfo.allocationSize];
 }
예제 #23
0
 public SoftwareShaderModule(SoftwareDevice device, VkShaderModuleCreateInfo createInfo)
 {
     this.m_createInfo    = createInfo;
     this.m_codeClassType = createInfo.pCode;
 }
예제 #24
0
 public SoftwareSampler(SoftwareDevice device, VkSamplerCreateInfo pCreateInfo)
 {
     this.m_device     = device;
     this.m_createInfo = pCreateInfo;
 }
예제 #25
0
 public SoftwareQueue(SoftwareDevice device, int queueFamilyIndex)
 {
     this.m_device           = device;
     this.m_queueFamiliIndex = queueFamilyIndex;
 }
예제 #26
0
 public override VkResult CreateDevice(VkDeviceCreateInfo createInfo, out VkDevice device)
 {
     return(SoftwareDevice.Create(this, createInfo, out device));
 }
예제 #27
0
 public SoftwareDescriptorSetLayout(SoftwareDevice device, VkDescriptorSetLayoutCreateInfo createInfo)
 {
     this.m_device     = device;
     this.m_createInfo = createInfo;
 }
예제 #28
0
 public SoftwareBuffer(SoftwareDevice device, VkBufferCreateInfo pCreateInfo)
 {
     this.m_device   = device;
     this.createInfo = pCreateInfo;
 }