mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 08:14:20 +00:00
Add details for error messages in validate_pipeline_descriptor_sets (#2509)
* add details in error messages for RecordingCommandBuffer::validate_pipeline_descriptor_sets * update messages * fix case
This commit is contained in:
parent
e9c650c966
commit
78f3f9f508
@ -1827,14 +1827,15 @@ impl RecordingCommandBuffer {
|
||||
*/
|
||||
|
||||
// The SPIR-V Image Format is not compatible with the image view’s format.
|
||||
if let Some(format) = binding_reqs.image_format {
|
||||
if image_view.format() != format {
|
||||
if let Some(required_format) = binding_reqs.image_format {
|
||||
let format = image_view.format();
|
||||
if format != required_format {
|
||||
return Err(Box::new(ValidationError {
|
||||
problem: format!(
|
||||
"the currently bound pipeline accesses the image view \
|
||||
"the currently bound pipeline requires the image view \
|
||||
bound to descriptor set {set_num}, binding {binding_num}, \
|
||||
descriptor index {index}, but the format of the image view \
|
||||
is not equal to the format required by the pipeline"
|
||||
descriptor index {index} to have a format of `{required_format:?}`, \
|
||||
but the actual format is `{format:?}`"
|
||||
)
|
||||
.into(),
|
||||
// vuids?
|
||||
@ -1844,14 +1845,16 @@ impl RecordingCommandBuffer {
|
||||
}
|
||||
|
||||
// Rules for viewType
|
||||
if let Some(image_view_type) = binding_reqs.image_view_type {
|
||||
if image_view.view_type() != image_view_type {
|
||||
if let Some(required_image_view_type) = binding_reqs.image_view_type {
|
||||
let image_view_type = image_view.view_type();
|
||||
if image_view_type != required_image_view_type {
|
||||
return Err(Box::new(ValidationError {
|
||||
problem: format!(
|
||||
"the currently bound pipeline accesses the image view \
|
||||
"the currently bound pipeline requires the image view \
|
||||
bound to descriptor set {set_num}, binding {binding_num}, \
|
||||
descriptor index {index}, but the view type of the image view \
|
||||
is not equal to the view type required by the pipeline"
|
||||
descriptor index {index} to have a view type of `{required_image_view_type:?}`, \
|
||||
but the actual view type is `{image_view_type:?}`
|
||||
"
|
||||
)
|
||||
.into(),
|
||||
vuids: vuids!(vuid_type, "viewType-07752"),
|
||||
|
Loading…
Reference in New Issue
Block a user