mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Discard flags for submit call
This commit is contained in:
committed by
Бранимир Караџић
parent
78675e238d
commit
0881d98bd2
@@ -532,6 +532,11 @@ public static partial class bgfx
|
||||
[Flags]
|
||||
public enum DiscardFlags : uint
|
||||
{
|
||||
/// <summary>
|
||||
/// Discard nothing
|
||||
/// </summary>
|
||||
None = 0x00000000,
|
||||
|
||||
/// <summary>
|
||||
/// Discard only Index Buffer
|
||||
/// </summary>
|
||||
@@ -3728,10 +3733,10 @@ public static partial class bgfx
|
||||
/// <param name="_id">View id.</param>
|
||||
/// <param name="_program">Program.</param>
|
||||
/// <param name="_depth">Depth for sorting.</param>
|
||||
/// <param name="_preserveState">Preserve internal draw state for next draw call submit.</param>
|
||||
/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_encoder_submit", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void encoder_submit(Encoder* _this, ushort _id, ProgramHandle _program, uint _depth, bool _preserveState);
|
||||
public static extern unsafe void encoder_submit(Encoder* _this, ushort _id, ProgramHandle _program, uint _depth, byte _flags);
|
||||
|
||||
/// <summary>
|
||||
/// Submit primitive with occlusion query for rendering.
|
||||
@@ -3741,10 +3746,10 @@ public static partial class bgfx
|
||||
/// <param name="_program">Program.</param>
|
||||
/// <param name="_occlusionQuery">Occlusion query.</param>
|
||||
/// <param name="_depth">Depth for sorting.</param>
|
||||
/// <param name="_preserveState">Preserve internal draw state for next draw call submit.</param>
|
||||
/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_encoder_submit_occlusion_query", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void encoder_submit_occlusion_query(Encoder* _this, ushort _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint _depth, bool _preserveState);
|
||||
public static extern unsafe void encoder_submit_occlusion_query(Encoder* _this, ushort _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint _depth, byte _flags);
|
||||
|
||||
/// <summary>
|
||||
/// Submit primitive for rendering with index and instance data info from
|
||||
@@ -3757,10 +3762,10 @@ public static partial class bgfx
|
||||
/// <param name="_start">First element in indirect buffer.</param>
|
||||
/// <param name="_num">Number of dispatches.</param>
|
||||
/// <param name="_depth">Depth for sorting.</param>
|
||||
/// <param name="_preserveState">Preserve internal draw state for next draw call submit.</param>
|
||||
/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_encoder_submit_indirect", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void encoder_submit_indirect(Encoder* _this, ushort _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
|
||||
public static extern unsafe void encoder_submit_indirect(Encoder* _this, ushort _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
|
||||
|
||||
/// <summary>
|
||||
/// Set compute index buffer.
|
||||
@@ -4243,10 +4248,10 @@ public static partial class bgfx
|
||||
/// <param name="_id">View id.</param>
|
||||
/// <param name="_program">Program.</param>
|
||||
/// <param name="_depth">Depth for sorting.</param>
|
||||
/// <param name="_preserveState">Preserve internal draw state for next draw call submit.</param>
|
||||
/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_submit", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void submit(ushort _id, ProgramHandle _program, uint _depth, bool _preserveState);
|
||||
public static extern unsafe void submit(ushort _id, ProgramHandle _program, uint _depth, byte _flags);
|
||||
|
||||
/// <summary>
|
||||
/// Submit primitive with occlusion query for rendering.
|
||||
@@ -4256,10 +4261,10 @@ public static partial class bgfx
|
||||
/// <param name="_program">Program.</param>
|
||||
/// <param name="_occlusionQuery">Occlusion query.</param>
|
||||
/// <param name="_depth">Depth for sorting.</param>
|
||||
/// <param name="_preserveState">Preserve internal draw state for next draw call submit.</param>
|
||||
/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_submit_occlusion_query", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void submit_occlusion_query(ushort _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint _depth, bool _preserveState);
|
||||
public static extern unsafe void submit_occlusion_query(ushort _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint _depth, byte _flags);
|
||||
|
||||
/// <summary>
|
||||
/// Submit primitive for rendering with index and instance data info from
|
||||
@@ -4272,10 +4277,10 @@ public static partial class bgfx
|
||||
/// <param name="_start">First element in indirect buffer.</param>
|
||||
/// <param name="_num">Number of dispatches.</param>
|
||||
/// <param name="_depth">Depth for sorting.</param>
|
||||
/// <param name="_preserveState">Preserve internal draw state for next draw call submit.</param>
|
||||
/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
|
||||
///
|
||||
[DllImport(DllName, EntryPoint="bgfx_submit_indirect", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern unsafe void submit_indirect(ushort _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
|
||||
public static extern unsafe void submit_indirect(ushort _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
|
||||
|
||||
/// <summary>
|
||||
/// Set compute index buffer.
|
||||
|
||||
@@ -1463,9 +1463,9 @@ version(BindBgfx_Static)
|
||||
* _id = View id.
|
||||
* _program = Program.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
void bgfx_encoder_submit(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
|
||||
void bgfx_encoder_submit(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
|
||||
|
||||
/**
|
||||
* Submit primitive with occlusion query for rendering.
|
||||
@@ -1474,9 +1474,9 @@ version(BindBgfx_Static)
|
||||
* _program = Program.
|
||||
* _occlusionQuery = Occlusion query.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
void bgfx_encoder_submit_occlusion_query(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
|
||||
void bgfx_encoder_submit_occlusion_query(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
|
||||
|
||||
/**
|
||||
* Submit primitive for rendering with index and instance data info from
|
||||
@@ -1488,9 +1488,9 @@ version(BindBgfx_Static)
|
||||
* _start = First element in indirect buffer.
|
||||
* _num = Number of dispatches.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
void bgfx_encoder_submit_indirect(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
|
||||
void bgfx_encoder_submit_indirect(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
|
||||
|
||||
/**
|
||||
* Set compute index buffer.
|
||||
@@ -1922,9 +1922,9 @@ version(BindBgfx_Static)
|
||||
* _id = View id.
|
||||
* _program = Program.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
|
||||
void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
|
||||
|
||||
/**
|
||||
* Submit primitive with occlusion query for rendering.
|
||||
@@ -1933,9 +1933,9 @@ version(BindBgfx_Static)
|
||||
* _program = Program.
|
||||
* _occlusionQuery = Occlusion query.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
|
||||
void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
|
||||
|
||||
/**
|
||||
* Submit primitive for rendering with index and instance data info from
|
||||
@@ -1947,9 +1947,9 @@ version(BindBgfx_Static)
|
||||
* _start = First element in indirect buffer.
|
||||
* _num = Number of dispatches.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
|
||||
void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
|
||||
|
||||
/**
|
||||
* Set compute index buffer.
|
||||
@@ -3648,9 +3648,9 @@ else
|
||||
* _id = View id.
|
||||
* _program = Program.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
alias da_bgfx_encoder_submit = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
|
||||
alias da_bgfx_encoder_submit = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
|
||||
da_bgfx_encoder_submit bgfx_encoder_submit;
|
||||
|
||||
/**
|
||||
@@ -3660,9 +3660,9 @@ else
|
||||
* _program = Program.
|
||||
* _occlusionQuery = Occlusion query.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
alias da_bgfx_encoder_submit_occlusion_query = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
|
||||
alias da_bgfx_encoder_submit_occlusion_query = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
|
||||
da_bgfx_encoder_submit_occlusion_query bgfx_encoder_submit_occlusion_query;
|
||||
|
||||
/**
|
||||
@@ -3675,9 +3675,9 @@ else
|
||||
* _start = First element in indirect buffer.
|
||||
* _num = Number of dispatches.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
alias da_bgfx_encoder_submit_indirect = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
|
||||
alias da_bgfx_encoder_submit_indirect = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
|
||||
da_bgfx_encoder_submit_indirect bgfx_encoder_submit_indirect;
|
||||
|
||||
/**
|
||||
@@ -4149,9 +4149,9 @@ else
|
||||
* _id = View id.
|
||||
* _program = Program.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
alias da_bgfx_submit = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, bool _preserveState);
|
||||
alias da_bgfx_submit = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
|
||||
da_bgfx_submit bgfx_submit;
|
||||
|
||||
/**
|
||||
@@ -4161,9 +4161,9 @@ else
|
||||
* _program = Program.
|
||||
* _occlusionQuery = Occlusion query.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
alias da_bgfx_submit_occlusion_query = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, bool _preserveState);
|
||||
alias da_bgfx_submit_occlusion_query = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
|
||||
da_bgfx_submit_occlusion_query bgfx_submit_occlusion_query;
|
||||
|
||||
/**
|
||||
@@ -4176,9 +4176,9 @@ else
|
||||
* _start = First element in indirect buffer.
|
||||
* _num = Number of dispatches.
|
||||
* _depth = Depth for sorting.
|
||||
* _preserveState = Preserve internal draw state for next draw call submit.
|
||||
* _flags = Which states to discard for next draw. See BGFX_DISCARD_
|
||||
*/
|
||||
alias da_bgfx_submit_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, bool _preserveState);
|
||||
alias da_bgfx_submit_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
|
||||
da_bgfx_submit_indirect bgfx_submit_indirect;
|
||||
|
||||
/**
|
||||
|
||||
@@ -193,6 +193,7 @@ enum ushort BGFX_CLEAR_DISCARD_MASK = 0x1ff8;
|
||||
* Rendering state discard. When state is preserved in submit, rendering states can be discarded
|
||||
* on a finer grain.
|
||||
*/
|
||||
enum ubyte BGFX_DISCARD_NONE = 0x00; /// Discard nothing
|
||||
enum ubyte BGFX_DISCARD_INDEX_BUFFER = 0x01; /// Discard only Index Buffer
|
||||
enum ubyte BGFX_DISCARD_VERTEX_STREAMS = 0x02; /// Discard only Vertex Streams
|
||||
enum ubyte BGFX_DISCARD_TEXTURE_SAMPLERS = 0x04; /// Discard only texture samplers
|
||||
|
||||
Reference in New Issue
Block a user