aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp12
-rw-r--r--src/gallium/drivers/swr/swr_memory.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp b/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp
index 5d9c0045a8a..24cfaefec93 100644
--- a/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp
+++ b/src/gallium/drivers/swr/rasterizer/memory/LoadTile.cpp
@@ -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) \
diff --git a/src/gallium/drivers/swr/swr_memory.h b/src/gallium/drivers/swr/swr_memory.h
index 65fc169c85f..e68dce0f8d1 100644
--- a/src/gallium/drivers/swr/swr_memory.h
+++ b/src/gallium/drivers/swr/swr_memory.h
@@ -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,