diff --git a/include/gx2/context.h b/include/gx2/context.h index 76afcff..a6f2b39 100644 --- a/include/gx2/context.h +++ b/include/gx2/context.h @@ -52,7 +52,7 @@ GX2SetupContextStateEx(GX2ContextState *state, BOOL unk1); void -GX2GetContextStateDisplayList(GX2ContextState *state, +GX2GetContextStateDisplayList(const GX2ContextState *state, void *outDisplayList, uint32_t *outSize); diff --git a/include/gx2/displaylist.h b/include/gx2/displaylist.h index eb6ab5d..e849e8b 100644 --- a/include/gx2/displaylist.h +++ b/include/gx2/displaylist.h @@ -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 diff --git a/include/gx2/draw.h b/include/gx2/draw.h index 5281a81..a1c96da 100644 --- a/include/gx2/draw.h +++ b/include/gx2/draw.h @@ -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); diff --git a/include/gx2/registers.h b/include/gx2/registers.h index 01079c7..3fc9f01 100644 --- a/include/gx2/registers.h +++ b/include/gx2/registers.h @@ -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 } diff --git a/include/gx2/shaders.h b/include/gx2/shaders.h index beb7d96..5db7ef2 100644 --- a/include/gx2/shaders.h +++ b/include/gx2/shaders.h @@ -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, diff --git a/include/gx2/surface.h b/include/gx2/surface.h index 10f2819..1ac2aa8 100644 --- a/include/gx2/surface.h +++ b/include/gx2/surface.h @@ -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, diff --git a/include/gx2/swap.h b/include/gx2/swap.h index 194ebbf..8e841c9 100644 --- a/include/gx2/swap.h +++ b/include/gx2/swap.h @@ -16,7 +16,7 @@ typedef struct GX2ColorBuffer GX2ColorBuffer; typedef struct GX2Texture GX2Texture; void -GX2CopyColorBufferToScanBuffer(GX2ColorBuffer *buffer, +GX2CopyColorBufferToScanBuffer(const GX2ColorBuffer *buffer, GX2ScanTarget scanTarget); void diff --git a/include/gx2/texture.h b/include/gx2/texture.h index dc522d4..978d9d1 100644 --- a/include/gx2/texture.h +++ b/include/gx2/texture.h @@ -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