Commit Graph

55 Commits

Author SHA1 Message Date
Alejandro Piñeiro 272f0d9cfb v3dv/descriptor_set: added support for samplers
This include SAMPLER, COMBINED_IMAGE_SAMPLER and SAMPLED_IMAGE
descriptors.

In order to support them we do the pre-packing of TEXTURE_SHADER_STATE
and SAMPLER_STATE when Images and Samplers (respectively) are
created. Those packets doesn't need to be tweaked later, so we upload
them to an bo.

A possible improvement of this would be that the descriptor pool
manages a bo for all descriptors, that suballocate for each descriptor
allocated. This is what other drivers do (and as far as I understand,
one of the reasons of having a descriptor pool).

Immutable samplers are not supported, will be handled on a following
patch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
2020-10-13 21:21:29 +00:00
Alejandro Piñeiro cb7f148020 v3dv/descriptor: take into account pPushConstantRanges
Push constant tests were still working without taking this into
account because we can't really fine graine how much we allocate for
them.

For now we only use them to know if we should allocate/fill the ubo
for push constants or not.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
2020-10-13 21:21:28 +00:00
Alejandro Piñeiro 5d1089b88d v3dv/descriptor: support for dynamic ubo/ssbo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
2020-10-13 21:21:28 +00:00
Alejandro Piñeiro 9afd24f89a v3dv: initial descriptor set support
Focused on getting the basic UBO and SSBO cases implemented. So no
dynamic offset, push contanst, samplers, and so on.

This include a initial implementation for CreatedescriptorPool,
CreateDescriptorSetLayout, AllocateDescriptorSets,
UpdateDescriptorSets, CreatePipelineLayout, and CmdBindDescriptorSets.

Also introduces lowering vulkan intrinsics. For now just
vulkan_resource_index.

We also introduce a descriptor_map, in this case for the ubos and
ssbos, used to assign a index for each set/binding combination, that
would be used when filling back the details of the ubo or ssbo on
other places (like QUNIFORM_UBO_ADDR or QUNIFORM_SSBO_OFFSET).

Note that at this point we don't need a bo for the descriptor pool, so
descriptor sets are not getting a piece of it. That would likely
change as we start to support more descriptor set types.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
2020-10-13 21:21:27 +00:00
Alejandro Piñeiro a201c45000 v3dv: stubs for graphics pipeline methods
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
2020-10-13 21:21:25 +00:00