blit: normalize coordinates also if a RECT resource is used on GLES

These resources are emulated by using normal samplers.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago
parent 3f0f291ea3
commit 6b25eab1f4
  1. 7
      src/vrend_blitter.c

@ -514,12 +514,13 @@ static void blitter_set_rectangle(struct vrend_blitter_ctx *blit_ctx,
glViewport(0, 0, blit_ctx->dst_width, blit_ctx->dst_height);
}
static void get_texcoords(struct vrend_resource *src_res,
static void get_texcoords(struct vrend_blitter_ctx *blit_ctx,
struct vrend_resource *src_res,
int src_level,
int x1, int y1, int x2, int y2,
float out[4])
{
bool normalized = src_res->base.target != PIPE_TEXTURE_RECT &&
bool normalized = (src_res->base.target != PIPE_TEXTURE_RECT || blit_ctx->use_gles) &&
src_res->base.nr_samples <= 1;
if (normalized) {
@ -559,7 +560,7 @@ static void blitter_set_texcoords(struct vrend_blitter_ctx *blit_ctx,
float coord[4];
float face_coord[4][2];
int i;
get_texcoords(src_res, level, x1, y1, x2, y2, coord);
get_texcoords(blit_ctx, src_res, level, x1, y1, x2, y2, coord);
if (src_res->base.target == PIPE_TEXTURE_CUBE ||
src_res->base.target == PIPE_TEXTURE_CUBE_ARRAY) {

Loading…
Cancel
Save