mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
gallium/swr: remove use of BYTE from swr driver
Remove use of a win32-style type leaked from the swr rasterizer. Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
dad3e5f4ef
commit
84f857bef7
4 changed files with 14 additions and 14 deletions
|
|
@ -28,14 +28,14 @@ void LoadHotTile(
|
|||
SWR_FORMAT dstFormat,
|
||||
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
|
||||
UINT x, UINT y, uint32_t renderTargetArrayIndex,
|
||||
BYTE *pDstHotTile);
|
||||
uint8_t *pDstHotTile);
|
||||
|
||||
void StoreHotTile(
|
||||
SWR_SURFACE_STATE *pDstSurface,
|
||||
SWR_FORMAT srcFormat,
|
||||
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
|
||||
UINT x, UINT y, uint32_t renderTargetArrayIndex,
|
||||
BYTE *pSrcHotTile);
|
||||
uint8_t *pSrcHotTile);
|
||||
|
||||
void StoreHotTileClear(
|
||||
SWR_SURFACE_STATE *pDstSurface,
|
||||
|
|
@ -49,7 +49,7 @@ swr_LoadHotTile(HANDLE hPrivateContext,
|
|||
SWR_FORMAT dstFormat,
|
||||
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
|
||||
UINT x, UINT y,
|
||||
uint32_t renderTargetArrayIndex, BYTE* pDstHotTile)
|
||||
uint32_t renderTargetArrayIndex, uint8_t* pDstHotTile)
|
||||
{
|
||||
// Grab source surface state from private context
|
||||
swr_draw_context *pDC = (swr_draw_context*)hPrivateContext;
|
||||
|
|
@ -63,7 +63,7 @@ swr_StoreHotTile(HANDLE hPrivateContext,
|
|||
SWR_FORMAT srcFormat,
|
||||
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
|
||||
UINT x, UINT y,
|
||||
uint32_t renderTargetArrayIndex, BYTE* pSrcHotTile)
|
||||
uint32_t renderTargetArrayIndex, uint8_t* pSrcHotTile)
|
||||
{
|
||||
// Grab destination surface state from private context
|
||||
swr_draw_context *pDC = (swr_draw_context*)hPrivateContext;
|
||||
|
|
|
|||
|
|
@ -58,14 +58,14 @@ swr_copy_to_scratch_space(struct swr_context *ctx,
|
|||
}
|
||||
|
||||
if (!space->base) {
|
||||
space->base = (BYTE *)align_malloc(space->current_size, 4);
|
||||
space->base = (uint8_t *)align_malloc(space->current_size, 4);
|
||||
space->head = (void *)space->base;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wrap */
|
||||
if (((BYTE *)space->head + size)
|
||||
>= ((BYTE *)space->base + space->current_size)) {
|
||||
if (((uint8_t *)space->head + size)
|
||||
>= ((uint8_t *)space->base + space->current_size)) {
|
||||
/*
|
||||
* TODO XXX: Should add a fence on wrap. Assumption is that
|
||||
* current_space >> size, and there are at least MAX_DRAWS_IN_FLIGHT
|
||||
|
|
@ -78,7 +78,7 @@ swr_copy_to_scratch_space(struct swr_context *ctx,
|
|||
}
|
||||
|
||||
ptr = space->head;
|
||||
space->head = (BYTE *)space->head + size;
|
||||
space->head = (uint8_t *)space->head + size;
|
||||
}
|
||||
|
||||
/* Copy user_buffer to scratch */
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ swr_texture_layout(struct swr_screen *screen,
|
|||
res->swr.pitch = res->row_stride[0];
|
||||
|
||||
if (allocate) {
|
||||
res->swr.pBaseAddress = (BYTE *)_aligned_malloc(total_size, 64);
|
||||
res->swr.pBaseAddress = (uint8_t *)_aligned_malloc(total_size, 64);
|
||||
|
||||
if (res->has_depth && res->has_stencil) {
|
||||
SWR_FORMAT_INFO finfo = GetFormatInfo(res->secondary.format);
|
||||
|
|
@ -550,7 +550,7 @@ swr_texture_layout(struct swr_screen *screen,
|
|||
res->secondary.numSamples = (1 << pt->nr_samples);
|
||||
res->secondary.pitch = res->alignedWidth * finfo.Bpp;
|
||||
|
||||
res->secondary.pBaseAddress = (BYTE *)_aligned_malloc(
|
||||
res->secondary.pBaseAddress = (uint8_t *)_aligned_malloc(
|
||||
res->alignedHeight * res->secondary.pitch, 64);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1032,12 +1032,12 @@ swr_update_derived(struct swr_context *ctx,
|
|||
pDC->num_constantsVS[i] = cb->buffer_size;
|
||||
if (cb->buffer)
|
||||
pDC->constantVS[i] =
|
||||
(const float *)((const BYTE *)cb->buffer + cb->buffer_offset);
|
||||
(const float *)((const uint8_t *)cb->buffer + cb->buffer_offset);
|
||||
else {
|
||||
/* Need to copy these constants to scratch space */
|
||||
if (cb->user_buffer && cb->buffer_size) {
|
||||
const void *ptr =
|
||||
((const BYTE *)cb->user_buffer + cb->buffer_offset);
|
||||
((const uint8_t *)cb->user_buffer + cb->buffer_offset);
|
||||
uint32_t size = AlignUp(cb->buffer_size, 4);
|
||||
ptr = swr_copy_to_scratch_space(
|
||||
ctx, &ctx->scratch->vs_constants, ptr, size);
|
||||
|
|
@ -1057,12 +1057,12 @@ swr_update_derived(struct swr_context *ctx,
|
|||
pDC->num_constantsFS[i] = cb->buffer_size;
|
||||
if (cb->buffer)
|
||||
pDC->constantFS[i] =
|
||||
(const float *)((const BYTE *)cb->buffer + cb->buffer_offset);
|
||||
(const float *)((const uint8_t *)cb->buffer + cb->buffer_offset);
|
||||
else {
|
||||
/* Need to copy these constants to scratch space */
|
||||
if (cb->user_buffer && cb->buffer_size) {
|
||||
const void *ptr =
|
||||
((const BYTE *)cb->user_buffer + cb->buffer_offset);
|
||||
((const uint8_t *)cb->user_buffer + cb->buffer_offset);
|
||||
uint32_t size = AlignUp(cb->buffer_size, 4);
|
||||
ptr = swr_copy_to_scratch_space(
|
||||
ctx, &ctx->scratch->fs_constants, ptr, size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue