mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
LibVirtGPU: Remove hard coded primitive type in append_draw_vbo()
This commit is contained in:
parent
b5acfba487
commit
03884fad74
Notes:
sideshowbarker
2024-07-17 02:34:38 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/03884fad74 Pull-request: https://github.com/SerenityOS/serenity/pull/16590 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/ccapitalK Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/supercomputer7 ✅
2 changed files with 14 additions and 14 deletions
|
@ -124,21 +124,21 @@ void CommandBufferBuilder::append_end_transfers_3d()
|
|||
CommandBuilder builder(m_buffer, Protocol::VirGLCommand::END_TRANSFERS, Protocol::ObjectType::NONE);
|
||||
}
|
||||
|
||||
void CommandBufferBuilder::append_draw_vbo(u32 count)
|
||||
void CommandBufferBuilder::append_draw_vbo(Protocol::PipePrimitiveTypes primitive_type, u32 count)
|
||||
{
|
||||
CommandBuilder builder(m_buffer, Protocol::VirGLCommand::DRAW_VBO, Protocol::ObjectType::NONE);
|
||||
builder.appendu32(0); // start
|
||||
builder.appendu32(count); // count
|
||||
builder.appendu32(to_underlying(Protocol::PipePrimitiveTypes::TRIANGLES)); // mode
|
||||
builder.appendu32(0); // indexed
|
||||
builder.appendu32(1); // instance_count
|
||||
builder.appendu32(0); // index_bias
|
||||
builder.appendu32(0); // start_instance
|
||||
builder.appendu32(0); // primitive_restart
|
||||
builder.appendu32(0); // restart_index
|
||||
builder.appendu32(0); // min_index
|
||||
builder.appendu32(0xffffffff); // max_index
|
||||
builder.appendu32(0); // cso
|
||||
builder.appendu32(0); // start
|
||||
builder.appendu32(count); // count
|
||||
builder.appendu32(to_underlying(primitive_type)); // mode
|
||||
builder.appendu32(0); // indexed
|
||||
builder.appendu32(1); // instance_count
|
||||
builder.appendu32(0); // index_bias
|
||||
builder.appendu32(0); // start_instance
|
||||
builder.appendu32(0); // primitive_restart
|
||||
builder.appendu32(0); // restart_index
|
||||
builder.appendu32(0); // min_index
|
||||
builder.appendu32(0xffffffff); // max_index
|
||||
builder.appendu32(0); // cso
|
||||
}
|
||||
|
||||
void CommandBufferBuilder::append_clear(float r, float g, float b)
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
void append_set_tweaks(u32 id, u32 value);
|
||||
void append_transfer3d(Protocol::ResourceID resource, size_t width, size_t height = 1, size_t depth = 1, size_t direction = VIRGL_DATA_DIR_GUEST_TO_HOST);
|
||||
void append_end_transfers_3d();
|
||||
void append_draw_vbo(u32 count);
|
||||
void append_draw_vbo(Protocol::PipePrimitiveTypes, u32 count);
|
||||
void append_clear(float r, float g, float b);
|
||||
void append_set_vertex_buffers(u32 stride, u32 offset, Protocol::ResourceID resource);
|
||||
void append_create_blend(Protocol::ObjectHandle handle);
|
||||
|
|
Loading…
Reference in a new issue