radv: abstract queue family away from queue family index.
If we introduce another queue type (video decode) we can have a disconnect between the RADV_QUEUE_ enum and the API queue_family_index. currently the driver has GENERAL, COMPUTE, TRANSFER which would end up at QFI 0, 1, <nothing> since we don't create transfer. Now if I add VDEC we get GENERAL, COMPUTE, TRANSFER, VDEC at QFI 0, 1, <nothing>, 2 or if you do nocompute GENERAL, COMPUTE, TRANSFER, VDEC at QFI 0, <nothing>, <nothing>, 1 This means we have to add a remapping table between the API qfi and the internal qf. This patches tries to do that, in theory right now it just adds overhead, but I'd like to exercise these paths. v2: add radv_queue_ring abstraction, and pass physical device in, as it makes adding uvd later easier. v3: rename, and drop one direction as unneeded now, drop queue_family_index from cmd_buffers. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13687>
This commit is contained in:
@@ -727,7 +727,7 @@ radv_expand_depth_stencil(struct radv_cmd_buffer *cmd_buffer, struct radv_image
|
||||
barrier.layout_transitions.depth_stencil_expand = 1;
|
||||
radv_describe_layout_transition(cmd_buffer, &barrier);
|
||||
|
||||
if (cmd_buffer->queue_family_index == RADV_QUEUE_GENERAL) {
|
||||
if (cmd_buffer->qf == RADV_QUEUE_GENERAL) {
|
||||
radv_process_depth_stencil(cmd_buffer, image, subresourceRange, sample_locs, DEPTH_DECOMPRESS);
|
||||
} else {
|
||||
radv_expand_depth_stencil_compute(cmd_buffer, image, subresourceRange);
|
||||
@@ -744,6 +744,6 @@ radv_resummarize_depth_stencil(struct radv_cmd_buffer *cmd_buffer, struct radv_i
|
||||
barrier.layout_transitions.depth_stencil_resummarize = 1;
|
||||
radv_describe_layout_transition(cmd_buffer, &barrier);
|
||||
|
||||
assert(cmd_buffer->queue_family_index == RADV_QUEUE_GENERAL);
|
||||
assert(cmd_buffer->qf == RADV_QUEUE_GENERAL);
|
||||
radv_process_depth_stencil(cmd_buffer, image, subresourceRange, sample_locs, DEPTH_RESUMMARIZE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user