diff options
Diffstat (limited to 'src/vulkan/gen7_state.c')
-rw-r--r-- | src/vulkan/gen7_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index cb299a3278b..88a508a1be9 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -329,7 +329,7 @@ genX(image_view_init)(struct anv_image_view *iview, * sampler engine is [SurfaceMinLOD, SurfaceMinLOD + MIPCountLOD]. */ surface_state.SurfaceMinLOD = range->baseMipLevel; - surface_state.MIPCountLOD = MIN2(range->levelCount, 1) - 1; + surface_state.MIPCountLOD = MAX2(range->levelCount, 1) - 1; GENX(RENDER_SURFACE_STATE_pack)(NULL, iview->nonrt_surface_state.map, &surface_state); @@ -369,7 +369,7 @@ genX(image_view_init)(struct anv_image_view *iview, format->surface_format); surface_state.SurfaceMinLOD = range->baseMipLevel; - surface_state.MIPCountLOD = MIN2(range->levelCount, 1) - 1; + surface_state.MIPCountLOD = MAX2(range->levelCount, 1) - 1; GENX(RENDER_SURFACE_STATE_pack)(NULL, iview->storage_surface_state.map, &surface_state); |