mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/shader_runner: Add support for creating mipmapped textures.
This commit is contained in:
committed by
Alexandre Julliard
parent
fd38c58112
commit
c940486a89
Notes:
Alexandre Julliard
2023-05-08 22:34:30 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/191
@@ -16,6 +16,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <float.h>
|
||||
#include <stdint.h>
|
||||
#include "vkd3d_windows.h"
|
||||
#include "vkd3d_d3dcommon.h"
|
||||
@@ -68,6 +69,7 @@ struct resource_params
|
||||
enum texture_data_type data_type;
|
||||
unsigned int texel_size;
|
||||
unsigned int width, height;
|
||||
unsigned int level_count;
|
||||
uint8_t *data;
|
||||
size_t data_size, data_capacity;
|
||||
};
|
||||
@@ -134,6 +136,11 @@ struct shader_runner_ops
|
||||
void (*release_readback)(struct shader_runner *runner, struct resource_readback *rb);
|
||||
};
|
||||
|
||||
static inline unsigned int get_level_dimension(unsigned int dimension, unsigned int level)
|
||||
{
|
||||
return max(1, dimension >> level);
|
||||
}
|
||||
|
||||
void fatal_error(const char *format, ...) VKD3D_NORETURN VKD3D_PRINTF_FUNC(1, 2);
|
||||
|
||||
unsigned int get_vb_stride(const struct shader_runner *runner, unsigned int slot);
|
||||
|
Reference in New Issue
Block a user