コード例 #1
0
 public void CmdBindDescriptorSets(PipelineBindPoint pipelineBindPoint, PipelineLayout layout, UInt32 firstSet, DescriptorSet[] pDescriptorSets, UInt32[] pDynamicOffsets)
 {
     unsafe {
         var arraypDescriptorSets = pDescriptorSets == null ? IntPtr.Zero : Marshal.AllocHGlobal(pDescriptorSets.Length * sizeof(UInt64));
         var lenpDescriptorSets   = pDescriptorSets == null ? 0 : pDescriptorSets.Length;
         if (pDescriptorSets != null)
         {
             for (int i = 0; i < pDescriptorSets.Length; i++)
             {
                 ((UInt64 *)arraypDescriptorSets) [i] = (pDescriptorSets [i].m);
             }
         }
         var arraypDynamicOffsets = pDynamicOffsets == null ? IntPtr.Zero : Marshal.AllocHGlobal(pDynamicOffsets.Length * sizeof(UInt32));
         var lenpDynamicOffsets   = pDynamicOffsets == null ? 0 : pDynamicOffsets.Length;
         if (pDynamicOffsets != null)
         {
             for (int i = 0; i < pDynamicOffsets.Length; i++)
             {
                 ((UInt32 *)arraypDynamicOffsets) [i] = (pDynamicOffsets [i]);
             }
         }
         Interop.NativeMethods.vkCmdBindDescriptorSets(this.m, pipelineBindPoint, layout != null ? layout.m : default(UInt64), firstSet, (uint)lenpDescriptorSets, (UInt64 *)arraypDescriptorSets, (uint)lenpDynamicOffsets, (UInt32 *)arraypDynamicOffsets);
         Marshal.FreeHGlobal(arraypDescriptorSets);
         Marshal.FreeHGlobal(arraypDynamicOffsets);
     }
 }
コード例 #2
0
        public void CmdBindDescriptorSet(PipelineBindPoint pipelineBindPoint, PipelineLayout layout, UInt32 firstSet, DescriptorSet pDescriptorSet, UInt32?pDynamicOffset)
        {
            unsafe
            {
                fixed(UInt64 *ptrpDescriptorSet = &pDescriptorSet.m)
                {
                    UInt32  valpDynamicOffset = pDynamicOffset ?? default(UInt32);
                    UInt32 *ptrpDynamicOffset = pDynamicOffset != null ? &valpDynamicOffset : (UInt32 *)IntPtr.Zero;

                    Interop.NativeMethods.vkCmdBindDescriptorSets(this.m, pipelineBindPoint, layout != null ? layout.m : default(UInt64), firstSet, (UInt32)(pDescriptorSet != null ? 1 : 0), ptrpDescriptorSet, (UInt32)(pDynamicOffset != null ? 1 : 0), ptrpDynamicOffset);
                }
            }
        }
コード例 #3
0
 public void CmdPushDescriptorSetKHR(PipelineBindPoint pipelineBindPoint, PipelineLayout layout, UInt32 set, WriteDescriptorSet[] pDescriptorWrites)
 {
     unsafe {
         var arraypDescriptorWrites = pDescriptorWrites == null ? IntPtr.Zero : Marshal.AllocHGlobal(pDescriptorWrites.Length * sizeof(Interop.WriteDescriptorSet));
         var lenpDescriptorWrites   = pDescriptorWrites == null ? 0 : pDescriptorWrites.Length;
         if (pDescriptorWrites != null)
         {
             for (int i = 0; i < pDescriptorWrites.Length; i++)
             {
                 ((Interop.WriteDescriptorSet *)arraypDescriptorWrites) [i] = *(pDescriptorWrites [i].m);
             }
         }
         Interop.NativeMethods.vkCmdPushDescriptorSetKHR(this.m, pipelineBindPoint, layout != null ? layout.m : default(UInt64), set, (uint)lenpDescriptorWrites, (Interop.WriteDescriptorSet *)arraypDescriptorWrites);
         Marshal.FreeHGlobal(arraypDescriptorWrites);
     }
 }
コード例 #4
0
 public void CmdPushDescriptorSetWithTemplateKHR(DescriptorUpdateTemplateKHR descriptorUpdateTemplate, PipelineLayout layout, UInt32 set, IntPtr pData)
 {
     unsafe {
         Interop.NativeMethods.vkCmdPushDescriptorSetWithTemplateKHR(this.m, descriptorUpdateTemplate != null ? descriptorUpdateTemplate.m : default(UInt64), layout != null ? layout.m : default(UInt64), set, pData);
     }
 }
コード例 #5
0
 public void CmdPushDescriptorSetKHR(PipelineBindPoint pipelineBindPoint, PipelineLayout layout, UInt32 set, WriteDescriptorSet pDescriptorWrite)
 {
     unsafe {
         Interop.NativeMethods.vkCmdPushDescriptorSetKHR(this.m, pipelineBindPoint, layout != null ? layout.m : default(UInt64), set, (UInt32)(pDescriptorWrite != null ? 1 : 0), pDescriptorWrite != null ? pDescriptorWrite.m : (Interop.WriteDescriptorSet *) default(IntPtr));
     }
 }
コード例 #6
0
 public void CmdPushConstants(PipelineLayout layout, ShaderStageFlags stageFlags, UInt32 offset, UInt32 size, IntPtr pValues)
 {
     unsafe {
         Interop.NativeMethods.vkCmdPushConstants(this.m, layout != null ? layout.m : default(UInt64), stageFlags, offset, size, pValues);
     }
 }