mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-27 20:58:11 +02:00
16K * 16K * 16bpp = 4G, which overflows int32, so layer_stride needs to have 64 bits. More generally, any "byte_stride * height" computation can overflow int32. Use (u)intptr_t in some gallium and st/mesa places where we do CPU access. Use uint64_t otherwise. Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23389>
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
|
|
#ifndef U_TRANSFER_H
|
|
#define U_TRANSFER_H
|
|
|
|
#include "pipe/p_state.h"
|
|
|
|
struct pipe_context;
|
|
struct winsys_handle;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void u_default_buffer_subdata(struct pipe_context *pipe,
|
|
struct pipe_resource *resource,
|
|
unsigned usage, unsigned offset,
|
|
unsigned size, const void *data);
|
|
|
|
void u_default_clear_buffer(struct pipe_context *pipe,
|
|
struct pipe_resource *resource,
|
|
unsigned offset, unsigned size,
|
|
const void *clear_value,
|
|
int clear_value_size);
|
|
|
|
void u_default_texture_subdata(struct pipe_context *pipe,
|
|
struct pipe_resource *resource,
|
|
unsigned level,
|
|
unsigned usage,
|
|
const struct pipe_box *box,
|
|
const void *data,
|
|
unsigned stride,
|
|
uintptr_t layer_stride);
|
|
|
|
void u_default_transfer_flush_region( struct pipe_context *pipe,
|
|
struct pipe_transfer *transfer,
|
|
const struct pipe_box *box);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C" {
|
|
#endif
|
|
|
|
#endif
|