#include "pipe/p_context.h"
#include "cso_cache/cso_context.h"
+static enum pipe_viewport_swizzle
+viewport_swizzle_from_glenum(GLenum16 swizzle)
+{
+ return swizzle - GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV;
+}
+
/**
* Update the viewport transformation matrix. Depends on:
* - viewport pos/size
scale[1] *= -1;
translate[1] = st->state.fb_height - translate[1];
}
+
+ st->state.viewport[i].swizzle_x = viewport_swizzle_from_glenum(ctx->ViewportArray[i].SwizzleX);
+ st->state.viewport[i].swizzle_y = viewport_swizzle_from_glenum(ctx->ViewportArray[i].SwizzleY);
+ st->state.viewport[i].swizzle_z = viewport_swizzle_from_glenum(ctx->ViewportArray[i].SwizzleZ);
+ st->state.viewport[i].swizzle_w = viewport_swizzle_from_glenum(ctx->ViewportArray[i].SwizzleW);
}
cso_set_viewport(st->cso_context, &st->state.viewport[0]);
{ o(NV_primitive_restart), PIPE_CAP_PRIMITIVE_RESTART },
{ o(NV_shader_atomic_float), PIPE_CAP_TGSI_ATOMFADD },
{ o(NV_texture_barrier), PIPE_CAP_TEXTURE_BARRIER },
+ { o(NV_viewport_swizzle), PIPE_CAP_VIEWPORT_SWIZZLE },
{ o(NVX_gpu_memory_info), PIPE_CAP_QUERY_MEMORY_INFO },
/* GL_NV_point_sprite is not supported by gallium because we don't
* support the GL_POINT_SPRITE_R_MODE_NV option. */