Core: Add dedicated BitField template

This commit is contained in:
Thaddeus Crews
2024-08-20 09:50:44 -05:00
parent 7b9c5122fa
commit 0d267e7b1e
46 changed files with 188 additions and 155 deletions

View File

@@ -612,7 +612,7 @@ void MDCommandBuffer::_render_clear_render_area() {
bool shouldClearStencil = (ds_index != RDD::AttachmentReference::UNUSED && pass.attachments[ds_index].shouldClear(subpass, true));
if (shouldClearDepth || shouldClearStencil) {
MDAttachment const &attachment = pass.attachments[ds_index];
BitField<RDD::TextureAspectBits> bits;
BitField<RDD::TextureAspectBits> bits = {};
if (shouldClearDepth && attachment.type & MDAttachmentType::Depth) {
bits.set_flag(RDD::TEXTURE_ASPECT_DEPTH_BIT);
}

View File

@@ -2524,7 +2524,7 @@ RDD::ShaderID RenderingDeviceDriverMetal::shader_create_from_bytecode(const Vect
su.writable = uniform.writable;
su.length = uniform.length;
su.binding = uniform.binding;
su.stages = uniform.stages;
su.stages = (ShaderStage)(uint8_t)uniform.stages;
uset.write[i] = su;
UniformInfo ui;
@@ -2590,7 +2590,7 @@ RDD::ShaderID RenderingDeviceDriverMetal::shader_create_from_bytecode(const Vect
sc.type = c.type;
sc.constant_id = c.constant_id;
sc.int_value = c.int_value;
sc.stages = c.stages;
sc.stages = (ShaderStage)(uint8_t)c.stages;
r_shader_desc.specialization_constants.write[i] = sc;
}