mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
texture_cache: Reduce invalid image/sampler error severity
This commit is contained in:
parent
b7764c3a79
commit
56d4a9ebde
1 changed files with 7 additions and 7 deletions
|
@ -548,13 +548,13 @@ void TextureCache<P>::FillComputeImageViews(std::span<const u32> indices,
|
||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
typename P::Sampler* TextureCache<P>::GetGraphicsSampler(u32 index) {
|
typename P::Sampler* TextureCache<P>::GetGraphicsSampler(u32 index) {
|
||||||
[[unlikely]] if (index > graphics_sampler_table.Limit()) {
|
if (index > graphics_sampler_table.Limit()) {
|
||||||
LOG_ERROR(HW_GPU, "Invalid sampler index={}", index);
|
LOG_DEBUG(HW_GPU, "Invalid sampler index={}", index);
|
||||||
return &slot_samplers[NULL_SAMPLER_ID];
|
return &slot_samplers[NULL_SAMPLER_ID];
|
||||||
}
|
}
|
||||||
const auto [descriptor, is_new] = graphics_sampler_table.Read(index);
|
const auto [descriptor, is_new] = graphics_sampler_table.Read(index);
|
||||||
SamplerId& id = graphics_sampler_ids[index];
|
SamplerId& id = graphics_sampler_ids[index];
|
||||||
[[unlikely]] if (is_new) {
|
if (is_new) {
|
||||||
id = FindSampler(descriptor);
|
id = FindSampler(descriptor);
|
||||||
}
|
}
|
||||||
return &slot_samplers[id];
|
return &slot_samplers[id];
|
||||||
|
@ -562,13 +562,13 @@ typename P::Sampler* TextureCache<P>::GetGraphicsSampler(u32 index) {
|
||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
typename P::Sampler* TextureCache<P>::GetComputeSampler(u32 index) {
|
typename P::Sampler* TextureCache<P>::GetComputeSampler(u32 index) {
|
||||||
[[unlikely]] if (index > compute_sampler_table.Limit()) {
|
if (index > compute_sampler_table.Limit()) {
|
||||||
LOG_ERROR(HW_GPU, "Invalid sampler index={}", index);
|
LOG_DEBUG(HW_GPU, "Invalid sampler index={}", index);
|
||||||
return &slot_samplers[NULL_SAMPLER_ID];
|
return &slot_samplers[NULL_SAMPLER_ID];
|
||||||
}
|
}
|
||||||
const auto [descriptor, is_new] = compute_sampler_table.Read(index);
|
const auto [descriptor, is_new] = compute_sampler_table.Read(index);
|
||||||
SamplerId& id = compute_sampler_ids[index];
|
SamplerId& id = compute_sampler_ids[index];
|
||||||
[[unlikely]] if (is_new) {
|
if (is_new) {
|
||||||
id = FindSampler(descriptor);
|
id = FindSampler(descriptor);
|
||||||
}
|
}
|
||||||
return &slot_samplers[id];
|
return &slot_samplers[id];
|
||||||
|
@ -669,7 +669,7 @@ ImageViewId TextureCache<P>::VisitImageView(DescriptorTable<TICEntry>& table,
|
||||||
std::span<ImageViewId> cached_image_view_ids,
|
std::span<ImageViewId> cached_image_view_ids,
|
||||||
u32 index) {
|
u32 index) {
|
||||||
if (index > table.Limit()) {
|
if (index > table.Limit()) {
|
||||||
LOG_ERROR(HW_GPU, "Invalid image view index={}", index);
|
LOG_DEBUG(HW_GPU, "Invalid image view index={}", index);
|
||||||
return NULL_IMAGE_VIEW_ID;
|
return NULL_IMAGE_VIEW_ID;
|
||||||
}
|
}
|
||||||
const auto [descriptor, is_new] = table.Read(index);
|
const auto [descriptor, is_new] = table.Read(index);
|
||||||
|
|
Loading…
Reference in a new issue