* ``PIPE_CAP_GLSL_ZERO_INIT``: Choose a default zero initialization some glsl variables. If `1`, then all glsl shader variables and gl_FragColor are initialized to zero. If `2`, then shader out variables are not initialized but function out variables are.
* ``PIPE_CAP_BLEND_EQUATION_ADVANCED``: Driver supports blend equation advanced without necessarily supporting FBFETCH.
* ``PIPE_CAP_NIR_ATOMICS_AS_DEREF``: Whether NIR atomics instructions should reference atomics as NIR derefs instead of by indices.
+* ``PIPE_CAP_NO_CLIP_ON_COPY_TEX``: Driver doesn't want x/y/width/height clipped based on src size when doing a copy texture operation (eg: may want out-of-bounds reads that produce 0 instead of leaving the texture content undefined)
.. _pipe_capf:
case PIPE_CAP_ALPHA_TO_COVERAGE_DITHER_CONTROL:
return 0;
+ case PIPE_CAP_NO_CLIP_ON_COPY_TEX:
+ return 0;
+
default:
unreachable("bad PIPE_CAP_*");
}
PIPE_CAP_GLSL_ZERO_INIT,
PIPE_CAP_BLEND_EQUATION_ADVANCED,
PIPE_CAP_NIR_ATOMICS_AS_DEREF,
+ PIPE_CAP_NO_CLIP_ON_COPY_TEX,
};
/**
/** Buffer size used to upload vertices from glBegin/glEnd. */
unsigned glBeginEndBufferSize;
+
+ /** Whether the driver doesn't want x/y/width/height clipped based on src size
+ * when doing a copy texture operation (eg: may want out-of-bounds reads that
+ * produce 0 instead of leaving the texture content undefined).
+ */
+ bool NoClippingOnCopyTex;
};
xoffset += texImage->Border;
}
- if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
+ if (ctx->Const.NoClippingOnCopyTex ||
+ _mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
&width, &height)) {
struct gl_renderbuffer *srcRb =
get_copy_tex_image_source(ctx, texImage->TexFormat);
/* Allocate texture memory (no pixel data yet) */
ctx->Driver.AllocTextureImageBuffer(ctx, texImage);
- if (_mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY,
+ if (ctx->Const.NoClippingOnCopyTex ||
+ _mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY,
&width, &height)) {
struct gl_renderbuffer *srcRb =
get_copy_tex_image_source(ctx, texImage->TexFormat);
*/
ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize,
ctx->Const.MaxPointSizeAA);
+
+ ctx->Const.NoClippingOnCopyTex = screen->get_param(screen,
+ PIPE_CAP_NO_CLIP_ON_COPY_TEX);
+
/* For vertex shaders, make sure not to emit saturate when SM 3.0
* is not supported
*/