GL4: Fix HostTextureInfo setup.
This commit is contained in:
parent
f8edc761fc
commit
79b9efb777
|
@ -716,10 +716,10 @@ struct HostTextureInfo {
|
||||||
auto& info = *out_info;
|
auto& info = *out_info;
|
||||||
auto format = guest_info.format_info();
|
auto format = guest_info.format_info();
|
||||||
|
|
||||||
uint32_t bytes_per_block = format->block_width * format->bits_per_pixel / 8;
|
|
||||||
|
|
||||||
switch (guest_info.dimension) {
|
switch (guest_info.dimension) {
|
||||||
case Dimension::k1D: {
|
case Dimension::k1D: {
|
||||||
|
uint32_t bytes_per_block =
|
||||||
|
format->block_width * format->bits_per_pixel / 8;
|
||||||
uint32_t block_width = xe::round_up(guest_info.size_1d.logical_width,
|
uint32_t block_width = xe::round_up(guest_info.size_1d.logical_width,
|
||||||
format->block_width) /
|
format->block_width) /
|
||||||
format->block_width;
|
format->block_width;
|
||||||
|
@ -729,6 +729,8 @@ struct HostTextureInfo {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case Dimension::k2D: {
|
case Dimension::k2D: {
|
||||||
|
uint32_t bytes_per_block = format->block_width * format->block_height *
|
||||||
|
format->bits_per_pixel / 8;
|
||||||
uint32_t block_width = xe::round_up(guest_info.size_2d.logical_width,
|
uint32_t block_width = xe::round_up(guest_info.size_2d.logical_width,
|
||||||
format->block_width) /
|
format->block_width) /
|
||||||
format->block_width;
|
format->block_width;
|
||||||
|
@ -745,6 +747,8 @@ struct HostTextureInfo {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
case Dimension::kCube: {
|
case Dimension::kCube: {
|
||||||
|
uint32_t bytes_per_block = format->block_width * format->block_height *
|
||||||
|
format->bits_per_pixel / 8;
|
||||||
uint32_t block_width = xe::round_up(guest_info.size_cube.logical_width,
|
uint32_t block_width = xe::round_up(guest_info.size_cube.logical_width,
|
||||||
format->block_width) /
|
format->block_width) /
|
||||||
format->block_width;
|
format->block_width;
|
||||||
|
|
Loading…
Reference in New Issue