swr: [rasterizer memory] Constify load tiles
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#include "memory/tilingtraits.h"
|
||||
#include "memory/Convert.h"
|
||||
|
||||
typedef void(*PFN_LOAD_TILES)(SWR_SURFACE_STATE*, uint8_t*, uint32_t, uint32_t, uint32_t);
|
||||
typedef void(*PFN_LOAD_TILES)(const SWR_SURFACE_STATE*, uint8_t*, uint32_t, uint32_t, uint32_t);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// Load Raster Tile Function Tables.
|
||||
@@ -83,7 +83,7 @@ struct LoadRasterTile
|
||||
/// @param pDst - Destination hot tile pointer
|
||||
/// @param x, y - Coordinates to raster tile.
|
||||
INLINE static void Load(
|
||||
SWR_SURFACE_STATE* pSrcSurface,
|
||||
const SWR_SURFACE_STATE* pSrcSurface,
|
||||
uint8_t* pDst,
|
||||
uint32_t x, uint32_t y, uint32_t sampleNum, uint32_t renderTargetArrayIndex) // (x, y) pixel coordinate to start of raster tile.
|
||||
{
|
||||
@@ -125,7 +125,7 @@ struct LoadMacroTile
|
||||
/// @param pDstSurface - Destination surface state
|
||||
/// @param x, y - Coordinates to macro tile
|
||||
static void Load(
|
||||
SWR_SURFACE_STATE* pSrcSurface,
|
||||
const SWR_SURFACE_STATE* pSrcSurface,
|
||||
uint8_t *pDstHotTile,
|
||||
uint32_t x, uint32_t y, uint32_t renderTargetArrayIndex)
|
||||
{
|
||||
@@ -145,6 +145,7 @@ struct LoadMacroTile
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static void BUCKETS_START(UINT id)
|
||||
{
|
||||
#ifdef KNOB_ENABLE_RDTSC
|
||||
@@ -171,7 +172,7 @@ static std::mutex sBucketMutex;
|
||||
/// @param x, y - Coordinates to raster tile.
|
||||
/// @param pDstHotTile - Pointer to Hot Tile
|
||||
void LoadHotTile(
|
||||
SWR_SURFACE_STATE *pSrcSurface,
|
||||
const SWR_SURFACE_STATE *pSrcSurface,
|
||||
SWR_FORMAT dstFormat,
|
||||
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
|
||||
uint32_t x, uint32_t y, uint32_t renderTargetArrayIndex,
|
||||
@@ -184,7 +185,7 @@ void LoadHotTile(
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// force 0 if requested renderTargetArrayIndex is OOB
|
||||
if (renderTargetArrayIndex >= pSrcSurface->depth)
|
||||
{
|
||||
@@ -274,6 +275,7 @@ void LoadHotTile(
|
||||
BUCKETS_STOP(sBuckets[pSrcSurface->format]);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// INIT_LOAD_TILES_TABLE - Helper macro for setting up the tables.
|
||||
#define INIT_LOAD_TILES_COLOR_TABLE(tilemode) \
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#pragma once
|
||||
|
||||
void LoadHotTile(
|
||||
SWR_SURFACE_STATE *pSrcSurface,
|
||||
const SWR_SURFACE_STATE *pSrcSurface,
|
||||
SWR_FORMAT dstFormat,
|
||||
SWR_RENDERTARGET_ATTACHMENT renderTargetIndex,
|
||||
UINT x, UINT y, uint32_t renderTargetArrayIndex,
|
||||
|
||||
Reference in New Issue
Block a user