};
- // Disable clipper if viewport transform is disabled
- if (pState->state.frontendState.vpTransformDisable)
+ // Disable clipper if viewport transform is disabled or if clipper is disabled
+ if (pState->state.frontendState.vpTransformDisable || !pState->state.rastState.clipEnable)
{
pState->pfnProcessPrims = pfnBinner;
#if USE_SIMD16_FRONTEND
uint32_t frontWinding : 1;
uint32_t scissorEnable : 1;
uint32_t depthClipEnable : 1;
+ uint32_t clipEnable : 1;
uint32_t clipHalfZ : 1;
uint32_t pointParam : 1;
uint32_t pointSpriteEnable : 1;
// llvm redefines DEBUG
#pragma push_macro("DEBUG")
#undef DEBUG
+
+#include <rasterizer/core/state.h>
#include "JitManager.h"
#pragma pop_macro("DEBUG")
rastState->depthFormat = swr_resource(zb->texture)->swr.format;
rastState->depthClipEnable = rasterizer->depth_clip_near;
+ rastState->clipEnable = rasterizer->depth_clip_near | rasterizer->depth_clip_far;
rastState->clipHalfZ = rasterizer->clip_halfz;
ctx->api.pfnSwrSetRastState(ctx->swrContext, rastState);
/* vertex buffers */
SWR_VERTEX_BUFFER_STATE swrVertexBuffers[PIPE_MAX_ATTRIBS];
for (UINT i = 0; i < ctx->num_vertex_buffers; i++) {
- uint32_t size, pitch, elems, partial_inbounds;
- uint32_t min_vertex_index;
+ uint32_t size = 0, pitch = 0, elems = 0, partial_inbounds = 0;
+ uint32_t min_vertex_index = 0;
const uint8_t *p_data;
struct pipe_vertex_buffer *vb = &ctx->vertex_buffer[i];