gx2: Add const to pointers where possible.

This commit is contained in:
James Benton 2019-11-22 17:42:16 +00:00
parent 0742efdf06
commit 159284a93d
8 changed files with 47 additions and 47 deletions

View File

@ -52,7 +52,7 @@ GX2SetupContextStateEx(GX2ContextState *state,
BOOL unk1);
void
GX2GetContextStateDisplayList(GX2ContextState *state,
GX2GetContextStateDisplayList(const GX2ContextState *state,
void *outDisplayList,
uint32_t *outSize);

View File

@ -20,11 +20,11 @@ uint32_t
GX2EndDisplayList(void *displayList);
void
GX2DirectCallDisplayList(void *displayList,
GX2DirectCallDisplayList(const void *displayList,
uint32_t bytes);
void
GX2CallDisplayList(void *displayList,
GX2CallDisplayList(const void *displayList,
uint32_t bytes);
BOOL
@ -35,7 +35,7 @@ GX2GetCurrentDisplayList(void **outDisplayList,
uint32_t *outSize);
void
GX2CopyDisplayList(void *displayList,
GX2CopyDisplayList(const void *displayList,
uint32_t bytes);
#ifdef __cplusplus

View File

@ -16,7 +16,7 @@ void
GX2SetAttribBuffer(uint32_t index,
uint32_t size,
uint32_t stride,
void *buffer);
const void *buffer);
void
GX2DrawEx(GX2PrimitiveMode mode,
@ -35,7 +35,7 @@ void
GX2DrawIndexedEx(GX2PrimitiveMode mode,
uint32_t count,
GX2IndexType indexType,
void *indices,
const void *indices,
uint32_t offset,
uint32_t numInstances);
@ -43,7 +43,7 @@ void
GX2DrawIndexedEx2(GX2PrimitiveMode mode,
uint32_t count,
GX2IndexType indexType,
void *indices,
const void *indices,
uint32_t offset,
uint32_t numInstances,
uint32_t baseInstance);
@ -52,7 +52,7 @@ void
GX2DrawIndexedImmediateEx(GX2PrimitiveMode mode,
uint32_t count,
GX2IndexType indexType,
void *indices,
const void *indices,
uint32_t offset,
uint32_t numInstances);

View File

@ -207,7 +207,7 @@ GX2GetAAMaskReg(GX2AAMaskReg *reg,
uint8_t *lowerRight);
void
GX2SetAAMaskReg(GX2AAMaskReg *reg);
GX2SetAAMaskReg(const GX2AAMaskReg *reg);
void
GX2SetAlphaTest(BOOL alphaTest,
@ -227,7 +227,7 @@ GX2GetAlphaTestReg(const GX2AlphaTestReg *reg,
float *ref);
void
GX2SetAlphaTestReg(GX2AlphaTestReg *reg);
GX2SetAlphaTestReg(const GX2AlphaTestReg *reg);
void
GX2SetAlphaToMask(BOOL alphaToMask,
@ -244,7 +244,7 @@ GX2GetAlphaToMaskReg(const GX2AlphaToMaskReg *reg,
GX2AlphaToMaskMode *mode);
void
GX2SetAlphaToMaskReg(GX2AlphaToMaskReg *reg);
GX2SetAlphaToMaskReg(const GX2AlphaToMaskReg *reg);
void
GX2SetBlendConstantColor(float red,
@ -267,7 +267,7 @@ GX2GetBlendConstantColorReg(GX2BlendConstantColorReg *reg,
float *alpha);
void
GX2SetBlendConstantColorReg(GX2BlendConstantColorReg *reg);
GX2SetBlendConstantColorReg(const GX2BlendConstantColorReg *reg);
void
GX2SetBlendControl(GX2RenderTarget target,
@ -302,7 +302,7 @@ GX2GetBlendControlReg(GX2BlendControlReg *reg,
GX2BlendCombineMode *alphaCombine);
void
GX2SetBlendControlReg(GX2BlendControlReg *reg);
GX2SetBlendControlReg(const GX2BlendControlReg *reg);
void
GX2SetColorControl(GX2LogicOp rop3,
@ -325,7 +325,7 @@ GX2GetColorControlReg(GX2ColorControlReg *reg,
BOOL *colorWriteEnable);
void
GX2SetColorControlReg(GX2ColorControlReg *reg);
GX2SetColorControlReg(const GX2ColorControlReg *reg);
void
GX2SetDepthOnlyControl(BOOL depthTest,
@ -380,7 +380,7 @@ GX2GetDepthStencilControlReg(GX2DepthStencilControlReg *reg,
GX2StencilFunction *backStencilFail);
void
GX2SetDepthStencilControlReg(GX2DepthStencilControlReg *reg);
GX2SetDepthStencilControlReg(const GX2DepthStencilControlReg *reg);
void
GX2SetStencilMask(uint8_t frontMask,
@ -409,7 +409,7 @@ GX2GetStencilMaskReg(GX2StencilMaskReg *reg,
uint8_t *backRef);
void
GX2SetStencilMaskReg(GX2StencilMaskReg *reg);
GX2SetStencilMaskReg(const GX2StencilMaskReg *reg);
void
GX2SetLineWidth(float width);
@ -423,7 +423,7 @@ GX2GetLineWidthReg(GX2LineWidthReg *reg,
float *width);
void
GX2SetLineWidthReg(GX2LineWidthReg *reg);
GX2SetLineWidthReg(const GX2LineWidthReg *reg);
void
GX2SetPointSize(float width,
@ -440,7 +440,7 @@ GX2GetPointSizeReg(GX2PointSizeReg *reg,
float *height);
void
GX2SetPointSizeReg(GX2PointSizeReg *reg);
GX2SetPointSizeReg(const GX2PointSizeReg *reg);
void
GX2SetPointLimits(float min,
@ -457,7 +457,7 @@ GX2GetPointLimitsReg(GX2PointLimitsReg *reg,
float *max);
void
GX2SetPointLimitsReg(GX2PointLimitsReg *reg);
GX2SetPointLimitsReg(const GX2PointLimitsReg *reg);
void
GX2SetCullOnlyControl(GX2FrontFace frontFace,
@ -500,7 +500,7 @@ GX2GetPolygonControlReg(GX2PolygonControlReg *reg,
BOOL *polyOffsetParaEnable);
void
GX2SetPolygonControlReg(GX2PolygonControlReg *reg);
GX2SetPolygonControlReg(const GX2PolygonControlReg *reg);
void
GX2SetPolygonOffset(float frontOffset,
@ -526,7 +526,7 @@ GX2GetPolygonOffsetReg(GX2PolygonOffsetReg *reg,
float *clamp);
void
GX2SetPolygonOffsetReg(GX2PolygonOffsetReg *reg);
GX2SetPolygonOffsetReg(const GX2PolygonOffsetReg *reg);
void
GX2SetScissor(uint32_t x,
@ -549,7 +549,7 @@ GX2GetScissorReg(GX2ScissorReg *reg,
uint32_t *height);
void
GX2SetScissorReg(GX2ScissorReg *reg);
GX2SetScissorReg(const GX2ScissorReg *reg);
void
GX2SetTargetChannelMasks(GX2ChannelMask mask0,
@ -584,7 +584,7 @@ GX2GetTargetChannelMasksReg(GX2TargetChannelMaskReg *reg,
GX2ChannelMask *mask7);
void
GX2SetTargetChannelMasksReg(GX2TargetChannelMaskReg *reg);
GX2SetTargetChannelMasksReg(const GX2TargetChannelMaskReg *reg);
void
GX2SetViewport(float x,
@ -613,7 +613,7 @@ GX2GetViewportReg(GX2ViewportReg *reg,
float *farZ);
void
GX2SetViewportReg(GX2ViewportReg *reg);
GX2SetViewportReg(const GX2ViewportReg *reg);
#ifdef __cplusplus
}

View File

@ -372,32 +372,32 @@ void
GX2InitFetchShaderEx(GX2FetchShader *fetchShader,
uint8_t *buffer,
uint32_t attribCount,
GX2AttribStream *attribs,
const GX2AttribStream *attribs,
GX2FetchShaderType type,
GX2TessellationMode tessMode);
void
GX2SetFetchShader(GX2FetchShader *shader);
GX2SetFetchShader(const GX2FetchShader *shader);
void
GX2SetVertexShader(GX2VertexShader *shader);
GX2SetVertexShader(const GX2VertexShader *shader);
void
GX2SetPixelShader(GX2PixelShader *shader);
GX2SetPixelShader(const GX2PixelShader *shader);
void
GX2SetGeometryShader(GX2GeometryShader *shader);
GX2SetGeometryShader(const GX2GeometryShader *shader);
void
GX2SetVertexSampler(GX2Sampler *sampler,
GX2SetVertexSampler(const GX2Sampler *sampler,
uint32_t id);
void
GX2SetPixelSampler(GX2Sampler *sampler,
GX2SetPixelSampler(const GX2Sampler *sampler,
uint32_t id);
void
GX2SetGeometrySampler(GX2Sampler *sampler,
GX2SetGeometrySampler(const GX2Sampler *sampler,
uint32_t id);
void
@ -435,7 +435,7 @@ void
GX2SetStreamOutEnable(BOOL enable);
void
GX2SetGeometryShaderInputRingBuffer(void *buffer,
GX2SetGeometryShaderInputRingBuffer(const void *buffer,
uint32_t size);
void
@ -443,22 +443,22 @@ GX2SetGeometryShaderOutputRingBuffer(void *buffer,
uint32_t size);
uint32_t
GX2GetPixelShaderGPRs(GX2PixelShader *shader);
GX2GetPixelShaderGPRs(const GX2PixelShader *shader);
uint32_t
GX2GetPixelShaderStackEntries(GX2PixelShader *shader);
GX2GetPixelShaderStackEntries(const GX2PixelShader *shader);
uint32_t
GX2GetVertexShaderGPRs(GX2VertexShader *shader);
GX2GetVertexShaderGPRs(const GX2VertexShader *shader);
uint32_t
GX2GetVertexShaderStackEntries(GX2VertexShader *shader);
GX2GetVertexShaderStackEntries(const GX2VertexShader *shader);
uint32_t
GX2GetGeometryShaderGPRs(GX2GeometryShader *shader);
GX2GetGeometryShaderGPRs(const GX2GeometryShader *shader);
uint32_t
GX2GetGeometryShaderStackEntries(GX2GeometryShader *shader);
GX2GetGeometryShaderStackEntries(const GX2GeometryShader *shader);
static inline GX2UniformBlock *
GX2GetGeometryUniformBlock(const GX2GeometryShader *shader,

View File

@ -118,11 +118,11 @@ GX2CalcColorBufferAuxInfo(GX2ColorBuffer *surface,
uint32_t *outAlignment);
void
GX2SetColorBuffer(GX2ColorBuffer *colorBuffer,
GX2SetColorBuffer(const GX2ColorBuffer *colorBuffer,
GX2RenderTarget target);
void
GX2SetDepthBuffer(GX2DepthBuffer *depthBuffer);
GX2SetDepthBuffer(const GX2DepthBuffer *depthBuffer);
void
GX2InitColorBufferRegs(GX2ColorBuffer *colorBuffer);
@ -135,14 +135,14 @@ GX2InitDepthBufferHiZEnable(GX2DepthBuffer *depthBuffer,
BOOL enable);
uint32_t
GX2GetSurfaceSwizzle(GX2Surface *surface);
GX2GetSurfaceSwizzle(const GX2Surface *surface);
void
GX2SetSurfaceSwizzle(GX2Surface *surface,
uint32_t swizzle);
void
GX2CopySurface(GX2Surface *src,
GX2CopySurface(const GX2Surface *src,
uint32_t srcLevel,
uint32_t srcDepth,
GX2Surface *dst,

View File

@ -16,7 +16,7 @@ typedef struct GX2ColorBuffer GX2ColorBuffer;
typedef struct GX2Texture GX2Texture;
void
GX2CopyColorBufferToScanBuffer(GX2ColorBuffer *buffer,
GX2CopyColorBufferToScanBuffer(const GX2ColorBuffer *buffer,
GX2ScanTarget scanTarget);
void

View File

@ -38,15 +38,15 @@ void
GX2InitTextureRegs(GX2Texture *texture);
void
GX2SetPixelTexture(GX2Texture *texture,
GX2SetPixelTexture(const GX2Texture *texture,
uint32_t unit);
void
GX2SetVertexTexture(GX2Texture *texture,
GX2SetVertexTexture(const GX2Texture *texture,
uint32_t unit);
void
GX2SetGeometryTexture(GX2Texture *texture,
GX2SetGeometryTexture(const GX2Texture *texture,
uint32_t unit);
#ifdef __cplusplus