mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-17 04:15:44 +00:00
comp/layers: Remove layer type from constructor.
The value was not used anyway as it is not set at creation time, but every frame. This avoids some confusion.
This commit is contained in:
parent
6222de38c9
commit
2472deb95a
|
@ -154,13 +154,10 @@ comp_layer_update_stereo_descriptors(struct comp_render_layer *self,
|
|||
static bool
|
||||
_init(struct comp_render_layer *self,
|
||||
struct vk_bundle *vk,
|
||||
enum xrt_layer_type type,
|
||||
VkDescriptorSetLayout *layout)
|
||||
{
|
||||
self->vk = vk;
|
||||
|
||||
self->type = type;
|
||||
|
||||
self->view_space = true;
|
||||
self->visibility = XRT_LAYER_EYE_VISIBILITY_BOTH;
|
||||
|
||||
|
@ -241,13 +238,11 @@ comp_layer_draw(struct comp_render_layer *self,
|
|||
}
|
||||
|
||||
struct comp_render_layer *
|
||||
comp_layer_create(struct vk_bundle *vk,
|
||||
enum xrt_layer_type type,
|
||||
VkDescriptorSetLayout *layout)
|
||||
comp_layer_create(struct vk_bundle *vk, VkDescriptorSetLayout *layout)
|
||||
{
|
||||
struct comp_render_layer *q = U_TYPED_CALLOC(struct comp_render_layer);
|
||||
|
||||
_init(q, vk, type, layout);
|
||||
_init(q, vk, layout);
|
||||
|
||||
return q;
|
||||
}
|
||||
|
|
|
@ -41,9 +41,7 @@ struct comp_render_layer
|
|||
};
|
||||
|
||||
struct comp_render_layer *
|
||||
comp_layer_create(struct vk_bundle *vk,
|
||||
enum xrt_layer_type type,
|
||||
VkDescriptorSetLayout *layout);
|
||||
comp_layer_create(struct vk_bundle *vk, VkDescriptorSetLayout *layout);
|
||||
|
||||
void
|
||||
comp_layer_draw(struct comp_render_layer *self,
|
||||
|
|
|
@ -468,8 +468,8 @@ comp_layer_renderer_allocate_layers(struct comp_layer_renderer *self,
|
|||
U_TYPED_ARRAY_CALLOC(struct comp_render_layer *, self->num_layers);
|
||||
|
||||
for (uint32_t i = 0; i < self->num_layers; i++) {
|
||||
self->layers[i] = comp_layer_create(
|
||||
vk, XRT_LAYER_QUAD, &self->descriptor_set_layout);
|
||||
self->layers[i] =
|
||||
comp_layer_create(vk, &self->descriptor_set_layout);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue