Compare commits
37 Commits
mesa-11.0.
...
mesa-11.0.
Author | SHA1 | Date | |
---|---|---|---|
|
271290f077 | ||
|
7bf27c2393 | ||
|
7f80a2383e | ||
|
3e1fde76b6 | ||
|
747e1b03bf | ||
|
b85ec1e34b | ||
|
acb822f1bd | ||
|
ddf459492d | ||
|
fcdaa190e5 | ||
|
0abcd9c8fc | ||
|
0b14d35863 | ||
|
a6710090af | ||
|
0c98ba7abf | ||
|
eef8258a86 | ||
|
747cd2c273 | ||
|
ecdd69cd05 | ||
|
74fa106932 | ||
|
1153420017 | ||
|
5704d473c8 | ||
|
eb2b88c44b | ||
|
5c08afc894 | ||
|
5fb758a418 | ||
|
bb37824959 | ||
|
8fc2cbb00e | ||
|
b497b88dbe | ||
|
dcb220f2f7 | ||
|
d9534e4785 | ||
|
63b4e6bfc9 | ||
|
a5dee22767 | ||
|
1aea7812b0 | ||
|
f0180a37d7 | ||
|
fe77d714f2 | ||
|
fb119b2260 | ||
|
50306a33b4 | ||
|
cf007af859 | ||
|
7d576419b2 | ||
|
893caebf44 |
@@ -15,7 +15,6 @@ env.Append(CPPPATH = [
|
||||
|
||||
# parse Makefile.sources
|
||||
egl_sources = env.ParseSourceList('Makefile.sources', 'LIBEGL_C_FILES')
|
||||
egl_sources.append(env.ParseSourceList('Makefile.sources', 'dri2_backend_core_FILES'))
|
||||
|
||||
env.Append(CPPDEFINES = [
|
||||
'_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_HAIKU',
|
||||
|
@@ -311,7 +311,7 @@ lp_build_const_elem(struct gallivm_state *gallivm,
|
||||
else {
|
||||
double dscale = lp_const_scale(type);
|
||||
|
||||
elem = LLVMConstInt(elem_type, round(val*dscale), 0);
|
||||
elem = LLVMConstInt(elem_type, (long long) round(val*dscale), 0);
|
||||
}
|
||||
|
||||
return elem;
|
||||
|
@@ -166,6 +166,11 @@ pb_cache_manager_create(struct pb_manager *provider,
|
||||
unsigned bypass_usage,
|
||||
uint64_t maximum_cache_size);
|
||||
|
||||
/**
|
||||
* Remove a buffer from the cache, but keep it alive.
|
||||
*/
|
||||
void
|
||||
pb_cache_manager_remove_buffer(struct pb_buffer *buf);
|
||||
|
||||
struct pb_fence_ops;
|
||||
|
||||
|
@@ -104,18 +104,42 @@ pb_cache_manager(struct pb_manager *mgr)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_pb_cache_manager_remove_buffer_locked(struct pb_cache_buffer *buf)
|
||||
{
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (buf->head.next) {
|
||||
LIST_DEL(&buf->head);
|
||||
assert(mgr->numDelayed);
|
||||
--mgr->numDelayed;
|
||||
mgr->cache_size -= buf->base.size;
|
||||
}
|
||||
buf->mgr = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
pb_cache_manager_remove_buffer(struct pb_buffer *pb_buf)
|
||||
{
|
||||
struct pb_cache_buffer *buf = (struct pb_cache_buffer*)pb_buf;
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (!mgr)
|
||||
return;
|
||||
|
||||
pipe_mutex_lock(mgr->mutex);
|
||||
_pb_cache_manager_remove_buffer_locked(buf);
|
||||
pipe_mutex_unlock(mgr->mutex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually destroy the buffer.
|
||||
*/
|
||||
static inline void
|
||||
_pb_cache_buffer_destroy(struct pb_cache_buffer *buf)
|
||||
{
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
LIST_DEL(&buf->head);
|
||||
assert(mgr->numDelayed);
|
||||
--mgr->numDelayed;
|
||||
mgr->cache_size -= buf->base.size;
|
||||
if (buf->mgr)
|
||||
_pb_cache_manager_remove_buffer_locked(buf);
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
@@ -156,6 +180,12 @@ pb_cache_buffer_destroy(struct pb_buffer *_buf)
|
||||
struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
|
||||
struct pb_cache_manager *mgr = buf->mgr;
|
||||
|
||||
if (!mgr) {
|
||||
pb_reference(&buf->buffer, NULL);
|
||||
FREE(buf);
|
||||
return;
|
||||
}
|
||||
|
||||
pipe_mutex_lock(mgr->mutex);
|
||||
assert(!pipe_is_referenced(&buf->base.reference));
|
||||
|
||||
|
@@ -14,7 +14,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63785 bytes, from 2015-08-14 18:27:06)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
@@ -14,7 +14,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63785 bytes, from 2015-08-14 18:27:06)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
@@ -14,7 +14,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63785 bytes, from 2015-08-14 18:27:06)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
@@ -162,10 +162,13 @@ enum a4xx_tex_fmt {
|
||||
TFMT4_8_UNORM = 4,
|
||||
TFMT4_8_8_UNORM = 14,
|
||||
TFMT4_8_8_8_8_UNORM = 28,
|
||||
TFMT4_8_SNORM = 5,
|
||||
TFMT4_8_8_SNORM = 15,
|
||||
TFMT4_8_8_8_8_SNORM = 29,
|
||||
TFMT4_8_UINT = 6,
|
||||
TFMT4_8_8_UINT = 16,
|
||||
TFMT4_8_8_8_8_UINT = 30,
|
||||
TFMT4_8_SINT = 7,
|
||||
TFMT4_8_8_SINT = 17,
|
||||
TFMT4_8_8_8_8_SINT = 31,
|
||||
TFMT4_16_UINT = 21,
|
||||
|
@@ -79,9 +79,9 @@ struct fd4_format {
|
||||
static struct fd4_format formats[PIPE_FORMAT_COUNT] = {
|
||||
/* 8-bit */
|
||||
VT(R8_UNORM, 8_UNORM, R8_UNORM, WZYX),
|
||||
V_(R8_SNORM, 8_SNORM, NONE, WZYX),
|
||||
V_(R8_UINT, 8_UINT, NONE, WZYX),
|
||||
V_(R8_SINT, 8_SINT, NONE, WZYX),
|
||||
VT(R8_SNORM, 8_SNORM, NONE, WZYX),
|
||||
VT(R8_UINT, 8_UINT, NONE, WZYX),
|
||||
VT(R8_SINT, 8_SINT, NONE, WZYX),
|
||||
V_(R8_USCALED, 8_UINT, NONE, WZYX),
|
||||
V_(R8_SSCALED, 8_UINT, NONE, WZYX),
|
||||
|
||||
@@ -115,8 +115,8 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = {
|
||||
|
||||
VT(R8G8_UNORM, 8_8_UNORM, R8G8_UNORM, WZYX),
|
||||
VT(R8G8_SNORM, 8_8_SNORM, R8G8_SNORM, WZYX),
|
||||
VT(R8G8_UINT, 8_8_UINT, NONE, WZYX),
|
||||
VT(R8G8_SINT, 8_8_SINT, NONE, WZYX),
|
||||
VT(R8G8_UINT, 8_8_UINT, R8G8_UINT, WZYX),
|
||||
VT(R8G8_SINT, 8_8_SINT, R8G8_SINT, WZYX),
|
||||
V_(R8G8_USCALED, 8_8_UINT, NONE, WZYX),
|
||||
V_(R8G8_SSCALED, 8_8_SINT, NONE, WZYX),
|
||||
|
||||
|
@@ -14,7 +14,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63785 bytes, from 2015-08-14 18:27:06)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
@@ -14,7 +14,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10551 bytes, from 2015-05-20 20:03:14)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14968 bytes, from 2015-05-20 20:12:27)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 67120 bytes, from 2015-08-14 23:22:03)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63785 bytes, from 2015-08-14 18:27:06)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 63915 bytes, from 2015-08-24 16:56:28)
|
||||
|
||||
Copyright (C) 2013-2015 by the following authors:
|
||||
- Rob Clark <robdclark@gmail.com> (robclark)
|
||||
|
@@ -532,8 +532,13 @@ nouveau_buffer_transfer_unmap(struct pipe_context *pipe,
|
||||
struct nv04_resource *buf = nv04_resource(transfer->resource);
|
||||
|
||||
if (tx->base.usage & PIPE_TRANSFER_WRITE) {
|
||||
if (!(tx->base.usage & PIPE_TRANSFER_FLUSH_EXPLICIT) && tx->map)
|
||||
nouveau_transfer_write(nv, tx, 0, tx->base.box.width);
|
||||
if (!(tx->base.usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) {
|
||||
if (tx->map)
|
||||
nouveau_transfer_write(nv, tx, 0, tx->base.box.width);
|
||||
|
||||
util_range_add(&buf->valid_buffer_range,
|
||||
tx->base.box.x, tx->base.box.x + tx->base.box.width);
|
||||
}
|
||||
|
||||
if (likely(buf->domain)) {
|
||||
const uint8_t bind = buf->base.bind;
|
||||
@@ -541,9 +546,6 @@ nouveau_buffer_transfer_unmap(struct pipe_context *pipe,
|
||||
if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
|
||||
nv->vbo_dirty = true;
|
||||
}
|
||||
|
||||
util_range_add(&buf->valid_buffer_range,
|
||||
tx->base.box.x, tx->base.box.x + tx->base.box.width);
|
||||
}
|
||||
|
||||
if (!tx->bo && (tx->base.usage & PIPE_TRANSFER_WRITE))
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "util/u_surface.h"
|
||||
|
||||
#include "nv_m2mf.xml.h"
|
||||
#include "nv_object.xml.h"
|
||||
#include "nv30/nv30_screen.h"
|
||||
#include "nv30/nv30_context.h"
|
||||
#include "nv30/nv30_resource.h"
|
||||
@@ -144,21 +145,18 @@ nv30_resource_copy_region(struct pipe_context *pipe,
|
||||
nv30_transfer_rect(nv30, NEAREST, &src, &dst);
|
||||
}
|
||||
|
||||
void
|
||||
nv30_resource_resolve(struct pipe_context *pipe,
|
||||
const struct pipe_resolve_info *info)
|
||||
static void
|
||||
nv30_resource_resolve(struct nv30_context *nv30,
|
||||
const struct pipe_blit_info *info)
|
||||
{
|
||||
#if 0
|
||||
struct nv30_context *nv30 = nv30_context(pipe);
|
||||
struct nv30_rect src, dst;
|
||||
|
||||
define_rect(info->src.res, 0, 0, info->src.x0, info->src.y0,
|
||||
info->src.x1 - info->src.x0, info->src.y1 - info->src.y0, &src);
|
||||
define_rect(info->dst.res, info->dst.level, 0, info->dst.x0, info->dst.y0,
|
||||
info->dst.x1 - info->dst.x0, info->dst.y1 - info->dst.y0, &dst);
|
||||
define_rect(info->src.resource, 0, info->src.box.z, info->src.box.x,
|
||||
info->src.box.y, info->src.box.width, info->src.box.height, &src);
|
||||
define_rect(info->dst.resource, 0, info->dst.box.z, info->dst.box.x,
|
||||
info->dst.box.y, info->dst.box.width, info->dst.box.height, &dst);
|
||||
|
||||
nv30_transfer_rect(nv30, BILINEAR, &src, &dst);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -172,7 +170,7 @@ nv30_blit(struct pipe_context *pipe,
|
||||
info.dst.resource->nr_samples <= 1 &&
|
||||
!util_format_is_depth_or_stencil(info.src.resource->format) &&
|
||||
!util_format_is_pure_integer(info.src.resource->format)) {
|
||||
debug_printf("nv30: color resolve unimplemented\n");
|
||||
nv30_resource_resolve(nv30, blit_info);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -362,6 +360,7 @@ nv30_miptree_create(struct pipe_screen *pscreen,
|
||||
blocksz = util_format_get_blocksize(pt->format);
|
||||
|
||||
if ((pt->target == PIPE_TEXTURE_RECT) ||
|
||||
(pt->bind & PIPE_BIND_SCANOUT) ||
|
||||
!util_is_power_of_two(pt->width0) ||
|
||||
!util_is_power_of_two(pt->height0) ||
|
||||
!util_is_power_of_two(pt->depth0) ||
|
||||
@@ -369,6 +368,14 @@ nv30_miptree_create(struct pipe_screen *pscreen,
|
||||
util_format_is_float(pt->format) || mt->ms_mode) {
|
||||
mt->uniform_pitch = util_format_get_nblocksx(pt->format, w) * blocksz;
|
||||
mt->uniform_pitch = align(mt->uniform_pitch, 64);
|
||||
if (pt->bind & PIPE_BIND_SCANOUT) {
|
||||
struct nv30_screen *screen = nv30_screen(pscreen);
|
||||
int pitch_align = MAX2(
|
||||
screen->eng3d->oclass >= NV40_3D_CLASS ? 1024 : 256,
|
||||
/* round_down_pow2(mt->uniform_pitch / 4) */
|
||||
1 << (util_last_bit(mt->uniform_pitch / 4) - 1));
|
||||
mt->uniform_pitch = align(mt->uniform_pitch, pitch_align);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mt->uniform_pitch)
|
||||
|
@@ -65,9 +65,6 @@ nv30_resource_copy_region(struct pipe_context *pipe,
|
||||
struct pipe_resource *src, unsigned src_level,
|
||||
const struct pipe_box *src_box);
|
||||
|
||||
void
|
||||
nv30_resource_resolve(struct pipe_context *, const struct pipe_resolve_info *);
|
||||
|
||||
void
|
||||
nv30_blit(struct pipe_context *pipe,
|
||||
const struct pipe_blit_info *blit_info);
|
||||
|
@@ -199,9 +199,13 @@ nv50_invalidate_resource_storage(struct nouveau_context *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (nv50->idxbuf.buffer == res)
|
||||
if (nv50->idxbuf.buffer == res) {
|
||||
/* Just rebind to the bufctx as there is no separate dirty bit */
|
||||
nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_INDEX);
|
||||
BCTX_REFN(nv50->bufctx_3d, INDEX, nv04_resource(res), RD);
|
||||
if (!--ref)
|
||||
return ref;
|
||||
}
|
||||
|
||||
for (s = 0; s < 3; ++s) {
|
||||
assert(nv50->num_textures[s] <= PIPE_MAX_SAMPLERS);
|
||||
|
@@ -197,7 +197,7 @@ extern struct draw_stage *nv50_draw_render_stage(struct nv50_context *);
|
||||
|
||||
/* nv50_query.c */
|
||||
void nv50_init_query_functions(struct nv50_context *);
|
||||
void nv50_query_pushbuf_submit(struct nouveau_pushbuf *,
|
||||
void nv50_query_pushbuf_submit(struct nouveau_pushbuf *, uint16_t method,
|
||||
struct pipe_query *, unsigned result_offset);
|
||||
void nv84_query_fifo_wait(struct nouveau_pushbuf *, struct pipe_query *);
|
||||
void nva0_so_target_save_offset(struct pipe_context *,
|
||||
|
@@ -66,6 +66,7 @@ nv50_vertprog_assign_slots(struct nv50_ir_prog_info *info)
|
||||
case TGSI_SEMANTIC_VERTEXID:
|
||||
prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID;
|
||||
prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID_DRAW_ARRAYS_ADD_START;
|
||||
prog->vp.vertexid = 1;
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
|
@@ -76,6 +76,7 @@ struct nv50_program {
|
||||
ubyte psiz; /* output slot of point size */
|
||||
ubyte bfc[2]; /* indices into varying for FFC (FP) or BFC (VP) */
|
||||
ubyte edgeflag;
|
||||
ubyte vertexid;
|
||||
ubyte clpd[2]; /* output slot of clip distance[i]'s 1st component */
|
||||
ubyte clpd_nr;
|
||||
} vp;
|
||||
|
@@ -266,6 +266,7 @@ nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq)
|
||||
nv50_query_get(push, q, 0, 0x1000f010);
|
||||
break;
|
||||
case NVA0_QUERY_STREAM_OUTPUT_BUFFER_OFFSET:
|
||||
q->sequence++;
|
||||
nv50_query_get(push, q, 0, 0x0d005002 | (q->index << 5));
|
||||
break;
|
||||
case PIPE_QUERY_TIMESTAMP_DISJOINT:
|
||||
@@ -451,18 +452,18 @@ nv50_render_condition(struct pipe_context *pipe,
|
||||
}
|
||||
|
||||
void
|
||||
nv50_query_pushbuf_submit(struct nouveau_pushbuf *push,
|
||||
nv50_query_pushbuf_submit(struct nouveau_pushbuf *push, uint16_t method,
|
||||
struct pipe_query *pq, unsigned result_offset)
|
||||
{
|
||||
struct nv50_query *q = nv50_query(pq);
|
||||
|
||||
/* XXX: does this exist ? */
|
||||
#define NV50_IB_ENTRY_1_NO_PREFETCH (0 << (31 - 8))
|
||||
nv50_query_update(q);
|
||||
if (q->state != NV50_QUERY_STATE_READY)
|
||||
nouveau_bo_wait(q->bo, NOUVEAU_BO_RD, push->client);
|
||||
q->state = NV50_QUERY_STATE_READY;
|
||||
|
||||
PUSH_REFN(push, q->bo, NOUVEAU_BO_RD | NOUVEAU_BO_GART);
|
||||
nouveau_pushbuf_space(push, 0, 0, 1);
|
||||
nouveau_pushbuf_data(push, q->bo, q->offset + result_offset, 4 |
|
||||
NV50_IB_ENTRY_1_NO_PREFETCH);
|
||||
BEGIN_NV04(push, SUBC_3D(method), 1);
|
||||
PUSH_DATA (push, q->data[result_offset / 4]);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -641,12 +641,12 @@ nv50_stream_output_validate(struct nv50_context *nv50)
|
||||
PUSH_DATA (push, so->num_attribs[i]);
|
||||
if (n == 4) {
|
||||
PUSH_DATA(push, targ->pipe.buffer_size);
|
||||
|
||||
BEGIN_NV04(push, NVA0_3D(STRMOUT_OFFSET(i)), 1);
|
||||
if (!targ->clean) {
|
||||
assert(targ->pq);
|
||||
nv50_query_pushbuf_submit(push, targ->pq, 0x4);
|
||||
nv50_query_pushbuf_submit(push, NVA0_3D_STRMOUT_OFFSET(i),
|
||||
targ->pq, 0x4);
|
||||
} else {
|
||||
BEGIN_NV04(push, NVA0_3D(STRMOUT_OFFSET(i)), 1);
|
||||
PUSH_DATA(push, 0);
|
||||
targ->clean = false;
|
||||
}
|
||||
@@ -655,6 +655,7 @@ nv50_stream_output_validate(struct nv50_context *nv50)
|
||||
(so->stride[i] * nv50->state.prim_size);
|
||||
prims = MIN2(prims, limit);
|
||||
}
|
||||
targ->stride = so->stride[i];
|
||||
BCTX_REFN(nv50->bufctx_3d, SO, buf, WR);
|
||||
}
|
||||
if (prims != ~0) {
|
||||
|
@@ -503,7 +503,8 @@ static struct state_validate {
|
||||
{ nv50_validate_samplers, NV50_NEW_SAMPLERS },
|
||||
{ nv50_stream_output_validate, NV50_NEW_STRMOUT |
|
||||
NV50_NEW_VERTPROG | NV50_NEW_GMTYPROG },
|
||||
{ nv50_vertex_arrays_validate, NV50_NEW_VERTEX | NV50_NEW_ARRAYS },
|
||||
{ nv50_vertex_arrays_validate, NV50_NEW_VERTEX | NV50_NEW_ARRAYS |
|
||||
NV50_NEW_VERTPROG },
|
||||
{ nv50_validate_min_samples, NV50_NEW_MIN_SAMPLES },
|
||||
};
|
||||
#define validate_list_len (sizeof(validate_list) / sizeof(validate_list[0]))
|
||||
|
@@ -293,7 +293,8 @@ nv50_vertex_arrays_validate(struct nv50_context *nv50)
|
||||
uint64_t addrs[PIPE_MAX_ATTRIBS];
|
||||
uint32_t limits[PIPE_MAX_ATTRIBS];
|
||||
struct nouveau_pushbuf *push = nv50->base.pushbuf;
|
||||
struct nv50_vertex_stateobj *vertex = nv50->vertex;
|
||||
struct nv50_vertex_stateobj dummy = {};
|
||||
struct nv50_vertex_stateobj *vertex = nv50->vertex ? nv50->vertex : &dummy;
|
||||
struct pipe_vertex_buffer *vb;
|
||||
struct nv50_vertex_element *ve;
|
||||
uint32_t mask;
|
||||
@@ -301,6 +302,14 @@ nv50_vertex_arrays_validate(struct nv50_context *nv50)
|
||||
unsigned i;
|
||||
const unsigned n = MAX2(vertex->num_elements, nv50->state.num_vtxelts);
|
||||
|
||||
/* A vertexid is not generated for inline data uploads. Have to use a
|
||||
* VBO. This check must come after the vertprog has been validated,
|
||||
* otherwise vertexid may be unset.
|
||||
*/
|
||||
assert(nv50->vertprog->translated);
|
||||
if (nv50->vertprog->vp.vertexid)
|
||||
nv50->vbo_push_hint = 0;
|
||||
|
||||
if (unlikely(vertex->need_conversion))
|
||||
nv50->vbo_fifo = ~0;
|
||||
else
|
||||
@@ -317,7 +326,6 @@ nv50_vertex_arrays_validate(struct nv50_context *nv50)
|
||||
if (buf && buf->status & NOUVEAU_BUFFER_STATUS_GPU_WRITING) {
|
||||
buf->status &= ~NOUVEAU_BUFFER_STATUS_GPU_WRITING;
|
||||
nv50->base.vbo_dirty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -736,9 +744,8 @@ nva0_draw_stream_output(struct nv50_context *nv50,
|
||||
BEGIN_NV04(push, NVA0_3D(DRAW_TFB_BASE), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NV04(push, NVA0_3D(DRAW_TFB_STRIDE), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
BEGIN_NV04(push, NVA0_3D(DRAW_TFB_BYTES), 1);
|
||||
nv50_query_pushbuf_submit(push, so->pq, 0x4);
|
||||
PUSH_DATA (push, so->stride);
|
||||
nv50_query_pushbuf_submit(push, NVA0_3D_DRAW_TFB_BYTES, so->pq, 0x4);
|
||||
BEGIN_NV04(push, NV50_3D(VERTEX_END_GL), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
|
||||
@@ -838,10 +845,6 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
nv50->base.vbo_dirty = true;
|
||||
}
|
||||
|
||||
if (!nv50->base.vbo_dirty && nv50->idxbuf.buffer &&
|
||||
nv50->idxbuf.buffer->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT)
|
||||
nv50->base.vbo_dirty = true;
|
||||
|
||||
if (nv50->base.vbo_dirty) {
|
||||
BEGIN_NV04(push, NV50_3D(VERTEX_ARRAY_FLUSH), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
|
@@ -936,29 +936,5 @@ static inline bool r600_can_read_depth(struct r600_texture *rtex)
|
||||
#define V_028A6C_OUTPRIM_TYPE_LINESTRIP 1
|
||||
#define V_028A6C_OUTPRIM_TYPE_TRISTRIP 2
|
||||
|
||||
static inline unsigned r600_conv_prim_to_gs_out(unsigned mode)
|
||||
{
|
||||
static const int prim_conv[] = {
|
||||
[PIPE_PRIM_POINTS] = V_028A6C_OUTPRIM_TYPE_POINTLIST,
|
||||
[PIPE_PRIM_LINES] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_LINE_LOOP] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_LINE_STRIP] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_TRIANGLES] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_TRIANGLE_STRIP] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_TRIANGLE_FAN] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_QUADS] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_QUAD_STRIP] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_POLYGON] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_LINES_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_LINE_STRIP_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_TRIANGLES_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_PATCHES] = V_028A6C_OUTPRIM_TYPE_POINTLIST,
|
||||
[R600_PRIM_RECTANGLE_LIST] = V_028A6C_OUTPRIM_TYPE_TRISTRIP
|
||||
};
|
||||
assert(mode < Elements(prim_conv));
|
||||
|
||||
return prim_conv[mode];
|
||||
}
|
||||
|
||||
unsigned r600_conv_prim_to_gs_out(unsigned mode);
|
||||
#endif
|
||||
|
@@ -2051,7 +2051,7 @@ bool r600_adjust_gprs(struct r600_context *rctx)
|
||||
/* always privilege vs stage so that at worst we have the
|
||||
* pixel stage producing wrong output (not the vertex
|
||||
* stage) */
|
||||
new_num_ps_gprs = max_gprs - ((new_num_vs_gprs - new_num_es_gprs - new_num_gs_gprs) + def_num_clause_temp_gprs * 2);
|
||||
new_num_ps_gprs = max_gprs - ((new_num_vs_gprs + new_num_es_gprs + new_num_gs_gprs) + def_num_clause_temp_gprs * 2);
|
||||
new_num_vs_gprs = num_vs_gprs;
|
||||
new_num_gs_gprs = num_gs_gprs;
|
||||
new_num_es_gprs = num_es_gprs;
|
||||
|
@@ -123,6 +123,31 @@ static unsigned r600_conv_pipe_prim(unsigned prim)
|
||||
return prim_conv[prim];
|
||||
}
|
||||
|
||||
unsigned r600_conv_prim_to_gs_out(unsigned mode)
|
||||
{
|
||||
static const int prim_conv[] = {
|
||||
[PIPE_PRIM_POINTS] = V_028A6C_OUTPRIM_TYPE_POINTLIST,
|
||||
[PIPE_PRIM_LINES] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_LINE_LOOP] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_LINE_STRIP] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_TRIANGLES] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_TRIANGLE_STRIP] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_TRIANGLE_FAN] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_QUADS] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_QUAD_STRIP] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_POLYGON] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_LINES_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_LINE_STRIP_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_LINESTRIP,
|
||||
[PIPE_PRIM_TRIANGLES_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY] = V_028A6C_OUTPRIM_TYPE_TRISTRIP,
|
||||
[PIPE_PRIM_PATCHES] = V_028A6C_OUTPRIM_TYPE_POINTLIST,
|
||||
[R600_PRIM_RECTANGLE_LIST] = V_028A6C_OUTPRIM_TYPE_TRISTRIP
|
||||
};
|
||||
assert(mode < Elements(prim_conv));
|
||||
|
||||
return prim_conv[mode];
|
||||
}
|
||||
|
||||
/* common state between evergreen and r600 */
|
||||
|
||||
static void r600_bind_blend_state_internal(struct r600_context *rctx,
|
||||
|
@@ -199,6 +199,9 @@ void bc_finalizer::finalize_if(region_node* r) {
|
||||
cf_node *if_jump = sh.create_cf(CF_OP_JUMP);
|
||||
cf_node *if_pop = sh.create_cf(CF_OP_POP);
|
||||
|
||||
if (!last_cf || last_cf->get_parent_region() == r) {
|
||||
last_cf = if_pop;
|
||||
}
|
||||
if_pop->bc.pop_count = 1;
|
||||
if_pop->jump_after(if_pop);
|
||||
|
||||
|
@@ -33,14 +33,6 @@ void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
|
||||
struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;
|
||||
int i;
|
||||
|
||||
/* If the CS is sufficiently large, don't count the space needed
|
||||
* and just flush if there is less than 8096 dwords left. */
|
||||
if (cs->max_dw >= 24 * 1024) {
|
||||
if (cs->cdw > cs->max_dw - 8 * 1024)
|
||||
ctx->b.rings.gfx.flush(ctx, RADEON_FLUSH_ASYNC, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
/* There are two memory usage counters in the winsys for all buffers
|
||||
* that have been added (cs_add_reloc) and two counters in the pipe
|
||||
* driver for those that haven't been added yet.
|
||||
@@ -54,6 +46,15 @@ void si_need_cs_space(struct si_context *ctx, unsigned num_dw,
|
||||
ctx->b.gtt = 0;
|
||||
ctx->b.vram = 0;
|
||||
|
||||
/* If the CS is sufficiently large, don't count the space needed
|
||||
* and just flush if there is less than 8096 dwords left.
|
||||
*/
|
||||
if (cs->max_dw >= 24 * 1024) {
|
||||
if (cs->cdw > cs->max_dw - 8 * 1024)
|
||||
ctx->b.rings.gfx.flush(ctx, RADEON_FLUSH_ASYNC, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
/* The number of dwords we already used in the CS so far. */
|
||||
num_dw += cs->cdw;
|
||||
|
||||
|
@@ -190,6 +190,7 @@ struct si_shader_selector {
|
||||
uint64_t inputs_read;
|
||||
uint64_t outputs_written;
|
||||
uint32_t patch_outputs_written;
|
||||
uint32_t ps_colors_written;
|
||||
};
|
||||
|
||||
/* Valid shader configurations:
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include "sid.h"
|
||||
#include "radeon/r600_cs.h"
|
||||
|
||||
#include "util/u_dual_blend.h"
|
||||
#include "util/u_format.h"
|
||||
#include "util/u_format_s3tc.h"
|
||||
#include "util/u_memory.h"
|
||||
@@ -233,8 +234,10 @@ static unsigned si_pack_float_12p4(float x)
|
||||
* - The COLOR1 format isn't INVALID because of possible dual-source blending,
|
||||
* so COLOR1 is enabled pretty much all the time.
|
||||
* So CB_TARGET_MASK is the only register that can disable COLOR1.
|
||||
*
|
||||
* Another reason is to avoid a hang with dual source blending.
|
||||
*/
|
||||
static void si_update_fb_blend_state(struct si_context *sctx)
|
||||
void si_update_fb_blend_state(struct si_context *sctx)
|
||||
{
|
||||
struct si_pm4_state *pm4;
|
||||
struct si_state_blend *blend = sctx->queued.named.blend;
|
||||
@@ -252,6 +255,16 @@ static void si_update_fb_blend_state(struct si_context *sctx)
|
||||
mask |= 0xf << (4*i);
|
||||
mask &= blend->cb_target_mask;
|
||||
|
||||
/* Avoid a hang that happens when dual source blending is enabled
|
||||
* but there is not enough color outputs. This is undefined behavior,
|
||||
* so disable color writes completely.
|
||||
*
|
||||
* Reproducible with Unigine Heaven 4.0 and drirc missing.
|
||||
*/
|
||||
if (blend->dual_src_blend &&
|
||||
(sctx->ps_shader->ps_colors_written & 0x3) != 0x3)
|
||||
mask = 0;
|
||||
|
||||
si_pm4_set_reg(pm4, R_028238_CB_TARGET_MASK, mask);
|
||||
si_pm4_set_state(sctx, fb_blend, pm4);
|
||||
}
|
||||
@@ -343,6 +356,7 @@ static void *si_create_blend_state_mode(struct pipe_context *ctx,
|
||||
return NULL;
|
||||
|
||||
blend->alpha_to_one = state->alpha_to_one;
|
||||
blend->dual_src_blend = util_blend_state_is_dual(state, 0);
|
||||
|
||||
if (state->logicop_enable) {
|
||||
color_control |= S_028808_ROP3(state->logicop_func | (state->logicop_func << 4));
|
||||
@@ -3166,6 +3180,7 @@ static void si_init_config(struct si_context *sctx)
|
||||
unsigned rb_mask = sctx->screen->b.info.si_backend_enabled_mask;
|
||||
unsigned raster_config, raster_config_1;
|
||||
struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state);
|
||||
int i;
|
||||
|
||||
if (pm4 == NULL)
|
||||
return;
|
||||
@@ -3196,6 +3211,11 @@ static void si_init_config(struct si_context *sctx)
|
||||
|
||||
si_pm4_set_reg(pm4, R_02882C_PA_SU_PRIM_FILTER_CNTL, 0);
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
si_pm4_set_reg(pm4, R_0282D0_PA_SC_VPORT_ZMIN_0 + i*8, 0);
|
||||
si_pm4_set_reg(pm4, R_0282D4_PA_SC_VPORT_ZMAX_0 + i*8, fui(1.0));
|
||||
}
|
||||
|
||||
switch (sctx->screen->b.family) {
|
||||
case CHIP_TAHITI:
|
||||
case CHIP_PITCAIRN:
|
||||
@@ -3282,8 +3302,6 @@ static void si_init_config(struct si_context *sctx)
|
||||
si_pm4_set_reg(pm4, R_028230_PA_SC_EDGERULE, 0xAAAAAAAA);
|
||||
/* PA_SU_HARDWARE_SCREEN_OFFSET must be 0 due to hw bug on SI */
|
||||
si_pm4_set_reg(pm4, R_028234_PA_SU_HARDWARE_SCREEN_OFFSET, 0);
|
||||
si_pm4_set_reg(pm4, R_0282D0_PA_SC_VPORT_ZMIN_0, 0);
|
||||
si_pm4_set_reg(pm4, R_0282D4_PA_SC_VPORT_ZMAX_0, fui(1.0));
|
||||
si_pm4_set_reg(pm4, R_028820_PA_CL_NANINF_CNTL, 0);
|
||||
si_pm4_set_reg(pm4, R_028BE8_PA_CL_GB_VERT_CLIP_ADJ, fui(1.0));
|
||||
si_pm4_set_reg(pm4, R_028BEC_PA_CL_GB_VERT_DISC_ADJ, fui(1.0));
|
||||
|
@@ -39,6 +39,7 @@ struct si_state_blend {
|
||||
struct si_pm4_state pm4;
|
||||
uint32_t cb_target_mask;
|
||||
bool alpha_to_one;
|
||||
bool dual_src_blend;
|
||||
};
|
||||
|
||||
struct si_state_sample_mask {
|
||||
@@ -251,6 +252,7 @@ void si_shader_change_notify(struct si_context *sctx);
|
||||
/* si_state.c */
|
||||
struct si_shader_selector;
|
||||
|
||||
void si_update_fb_blend_state(struct si_context *sctx);
|
||||
boolean si_is_format_supported(struct pipe_screen *screen,
|
||||
enum pipe_format format,
|
||||
enum pipe_texture_target target,
|
||||
|
@@ -713,6 +713,15 @@ static void *si_create_shader_state(struct pipe_context *ctx,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PIPE_SHADER_FRAGMENT:
|
||||
for (i = 0; i < sel->info.num_outputs; i++) {
|
||||
unsigned name = sel->info.output_semantic_name[i];
|
||||
unsigned index = sel->info.output_semantic_index[i];
|
||||
|
||||
if (name == TGSI_SEMANTIC_COLOR)
|
||||
sel->ps_colors_written |= 1 << index;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (sscreen->b.debug_flags & DBG_PRECOMPILE)
|
||||
@@ -840,6 +849,7 @@ static void si_bind_ps_shader(struct pipe_context *ctx, void *state)
|
||||
}
|
||||
|
||||
sctx->ps_shader = sel;
|
||||
si_update_fb_blend_state(sctx);
|
||||
}
|
||||
|
||||
static void si_delete_shader_selector(struct pipe_context *ctx,
|
||||
|
@@ -314,6 +314,7 @@ qir_get_temp(struct vc4_compile *c)
|
||||
|
||||
reg.file = QFILE_TEMP;
|
||||
reg.index = c->num_temps++;
|
||||
reg.pack = 0;
|
||||
|
||||
if (c->num_temps > c->defs_array_size) {
|
||||
uint32_t old_size = c->defs_array_size;
|
||||
|
@@ -684,6 +684,9 @@ static boolean amdgpu_bo_get_handle(struct pb_buffer *buffer,
|
||||
enum amdgpu_bo_handle_type type;
|
||||
int r;
|
||||
|
||||
if ((void*)bo != (void*)buffer)
|
||||
pb_cache_manager_remove_buffer(buffer);
|
||||
|
||||
switch (whandle->type) {
|
||||
case DRM_API_HANDLE_TYPE_SHARED:
|
||||
type = amdgpu_bo_handle_type_gem_flink_name;
|
||||
|
@@ -1126,6 +1126,9 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
|
||||
|
||||
memset(&flink, 0, sizeof(flink));
|
||||
|
||||
if ((void*)bo != (void*)buffer)
|
||||
pb_cache_manager_remove_buffer(buffer);
|
||||
|
||||
if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
|
||||
if (!bo->flink_name) {
|
||||
flink.handle = bo->handle;
|
||||
|
@@ -2339,6 +2339,7 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
||||
*/
|
||||
unsigned used_locations = (max_index >= 32)
|
||||
? ~0 : ~((1 << max_index) - 1);
|
||||
unsigned double_storage_locations = 0;
|
||||
|
||||
assert((target_index == MESA_SHADER_VERTEX)
|
||||
|| (target_index == MESA_SHADER_FRAGMENT));
|
||||
@@ -2452,34 +2453,6 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
||||
|
||||
const unsigned slots = var->type->count_attribute_slots();
|
||||
|
||||
/* From GL4.5 core spec, section 11.1.1 (Vertex Attributes):
|
||||
*
|
||||
* "A program with more than the value of MAX_VERTEX_ATTRIBS active
|
||||
* attribute variables may fail to link, unless device-dependent
|
||||
* optimizations are able to make the program fit within available
|
||||
* hardware resources. For the purposes of this test, attribute variables
|
||||
* of the type dvec3, dvec4, dmat2x3, dmat2x4, dmat3, dmat3x4, dmat4x3,
|
||||
* and dmat4 may count as consuming twice as many attributes as equivalent
|
||||
* single-precision types. While these types use the same number of
|
||||
* generic attributes as their single-precision equivalents,
|
||||
* implementations are permitted to consume two single-precision vectors
|
||||
* of internal storage for each three- or four-component double-precision
|
||||
* vector."
|
||||
* Until someone has a good reason in Mesa, enforce that now.
|
||||
*/
|
||||
if (target_index == MESA_SHADER_VERTEX) {
|
||||
total_attribs_size += slots;
|
||||
if (var->type->without_array() == glsl_type::dvec3_type ||
|
||||
var->type->without_array() == glsl_type::dvec4_type ||
|
||||
var->type->without_array() == glsl_type::dmat2x3_type ||
|
||||
var->type->without_array() == glsl_type::dmat2x4_type ||
|
||||
var->type->without_array() == glsl_type::dmat3_type ||
|
||||
var->type->without_array() == glsl_type::dmat3x4_type ||
|
||||
var->type->without_array() == glsl_type::dmat4x3_type ||
|
||||
var->type->without_array() == glsl_type::dmat4_type)
|
||||
total_attribs_size += slots;
|
||||
}
|
||||
|
||||
/* If the variable is not a built-in and has a location statically
|
||||
* assigned in the shader (presumably via a layout qualifier), make sure
|
||||
* that it doesn't collide with other assigned locations. Otherwise,
|
||||
@@ -2594,6 +2567,38 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
||||
}
|
||||
|
||||
used_locations |= (use_mask << attr);
|
||||
|
||||
/* From the GL 4.5 core spec, section 11.1.1 (Vertex Attributes):
|
||||
*
|
||||
* "A program with more than the value of MAX_VERTEX_ATTRIBS
|
||||
* active attribute variables may fail to link, unless
|
||||
* device-dependent optimizations are able to make the program
|
||||
* fit within available hardware resources. For the purposes
|
||||
* of this test, attribute variables of the type dvec3, dvec4,
|
||||
* dmat2x3, dmat2x4, dmat3, dmat3x4, dmat4x3, and dmat4 may
|
||||
* count as consuming twice as many attributes as equivalent
|
||||
* single-precision types. While these types use the same number
|
||||
* of generic attributes as their single-precision equivalents,
|
||||
* implementations are permitted to consume two single-precision
|
||||
* vectors of internal storage for each three- or four-component
|
||||
* double-precision vector."
|
||||
*
|
||||
* Mark this attribute slot as taking up twice as much space
|
||||
* so we can count it properly against limits. According to
|
||||
* issue (3) of the GL_ARB_vertex_attrib_64bit behavior, this
|
||||
* is optional behavior, but it seems preferable.
|
||||
*/
|
||||
const glsl_type *type = var->type->without_array();
|
||||
if (type == glsl_type::dvec3_type ||
|
||||
type == glsl_type::dvec4_type ||
|
||||
type == glsl_type::dmat2x3_type ||
|
||||
type == glsl_type::dmat2x4_type ||
|
||||
type == glsl_type::dmat3_type ||
|
||||
type == glsl_type::dmat3x4_type ||
|
||||
type == glsl_type::dmat4x3_type ||
|
||||
type == glsl_type::dmat4_type) {
|
||||
double_storage_locations |= (use_mask << attr);
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
@@ -2605,6 +2610,9 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
||||
}
|
||||
|
||||
if (target_index == MESA_SHADER_VERTEX) {
|
||||
unsigned total_attribs_size =
|
||||
_mesa_bitcount(used_locations & ((1 << max_index) - 1)) +
|
||||
_mesa_bitcount(double_storage_locations);
|
||||
if (total_attribs_size > max_index) {
|
||||
linker_error(prog,
|
||||
"attempt to use %d vertex attribute slots only %d available ",
|
||||
|
@@ -3211,7 +3211,8 @@ fs_visitor::lower_integer_multiplication()
|
||||
* schedule multi-component multiplications much better.
|
||||
*/
|
||||
|
||||
if (inst->conditional_mod && inst->dst.is_null()) {
|
||||
fs_reg orig_dst = inst->dst;
|
||||
if (orig_dst.is_null() || orig_dst.file == MRF) {
|
||||
inst->dst = fs_reg(GRF, alloc.allocate(dispatch_width / 8),
|
||||
inst->dst.type);
|
||||
}
|
||||
@@ -3277,10 +3278,9 @@ fs_visitor::lower_integer_multiplication()
|
||||
|
||||
ibld.ADD(dst, low, high);
|
||||
|
||||
if (inst->conditional_mod) {
|
||||
fs_reg null(retype(ibld.null_reg_f(), inst->dst.type));
|
||||
if (inst->conditional_mod || orig_dst.file == MRF) {
|
||||
set_condmod(inst->conditional_mod,
|
||||
ibld.MOV(null, inst->dst));
|
||||
ibld.MOV(orig_dst, inst->dst));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -279,6 +279,7 @@ static bool
|
||||
can_change_source_types(fs_inst *inst)
|
||||
{
|
||||
return !inst->src[0].abs && !inst->src[0].negate &&
|
||||
inst->dst.type == inst->src[0].type &&
|
||||
(inst->opcode == BRW_OPCODE_MOV ||
|
||||
(inst->opcode == BRW_OPCODE_SEL &&
|
||||
inst->predicate != BRW_PREDICATE_NONE &&
|
||||
|
@@ -796,47 +796,43 @@ intel_emit_linear_blit(struct brw_context *brw,
|
||||
int16_t src_x, dst_x;
|
||||
bool ok;
|
||||
|
||||
/* The pitch given to the GPU must be DWORD aligned, and
|
||||
* we want width to match pitch. Max width is (1 << 15 - 1),
|
||||
* rounding that down to the nearest DWORD is 1 << 15 - 4
|
||||
*/
|
||||
pitch = ROUND_DOWN_TO(MIN2(size, (1 << 15) - 1), 4);
|
||||
height = (pitch == 0) ? 1 : size / pitch;
|
||||
src_x = src_offset % 64;
|
||||
dst_x = dst_offset % 64;
|
||||
ok = intelEmitCopyBlit(brw, 1,
|
||||
pitch, src_bo, src_offset - src_x, I915_TILING_NONE,
|
||||
INTEL_MIPTREE_TRMODE_NONE,
|
||||
pitch, dst_bo, dst_offset - dst_x, I915_TILING_NONE,
|
||||
INTEL_MIPTREE_TRMODE_NONE,
|
||||
src_x, 0, /* src x/y */
|
||||
dst_x, 0, /* dst x/y */
|
||||
pitch, height, /* w, h */
|
||||
GL_COPY);
|
||||
if (!ok)
|
||||
_mesa_problem(ctx, "Failed to linear blit %dx%d\n", pitch, height);
|
||||
do {
|
||||
/* The pitch given to the GPU must be DWORD aligned, and
|
||||
* we want width to match pitch. Max width is (1 << 15 - 1),
|
||||
* rounding that down to the nearest DWORD is 1 << 15 - 4
|
||||
*/
|
||||
pitch = ROUND_DOWN_TO(MIN2(size, (1 << 15) - 64), 4);
|
||||
height = (size < pitch || pitch == 0) ? 1 : size / pitch;
|
||||
|
||||
src_offset += pitch * height;
|
||||
dst_offset += pitch * height;
|
||||
src_x = src_offset % 64;
|
||||
dst_x = dst_offset % 64;
|
||||
size -= pitch * height;
|
||||
assert (size < (1 << 15));
|
||||
pitch = ALIGN(size, 4);
|
||||
src_x = src_offset % 64;
|
||||
dst_x = dst_offset % 64;
|
||||
pitch = ALIGN(MIN2(size, (1 << 15) - 64), 4);
|
||||
assert(src_x + pitch < 1 << 15);
|
||||
assert(dst_x + pitch < 1 << 15);
|
||||
|
||||
if (size != 0) {
|
||||
ok = intelEmitCopyBlit(brw, 1,
|
||||
pitch, src_bo, src_offset - src_x, I915_TILING_NONE,
|
||||
pitch, src_bo, src_offset - src_x, I915_TILING_NONE,
|
||||
INTEL_MIPTREE_TRMODE_NONE,
|
||||
pitch, dst_bo, dst_offset - dst_x, I915_TILING_NONE,
|
||||
pitch, dst_bo, dst_offset - dst_x, I915_TILING_NONE,
|
||||
INTEL_MIPTREE_TRMODE_NONE,
|
||||
src_x, 0, /* src x/y */
|
||||
dst_x, 0, /* dst x/y */
|
||||
size, 1, /* w, h */
|
||||
GL_COPY);
|
||||
if (!ok)
|
||||
_mesa_problem(ctx, "Failed to linear blit %dx%d\n", size, 1);
|
||||
}
|
||||
src_x, 0, /* src x/y */
|
||||
dst_x, 0, /* dst x/y */
|
||||
MIN2(size, pitch), height, /* w, h */
|
||||
GL_COPY);
|
||||
if (!ok) {
|
||||
_mesa_problem(ctx, "Failed to linear blit %dx%d\n",
|
||||
MIN2(size, pitch), height);
|
||||
return;
|
||||
}
|
||||
|
||||
pitch *= height;
|
||||
if (size <= pitch)
|
||||
return;
|
||||
|
||||
src_offset += pitch;
|
||||
dst_offset += pitch;
|
||||
size -= pitch;
|
||||
} while (1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -109,6 +109,10 @@ intel_readpixels_tiled_memcpy(struct gl_context * ctx,
|
||||
pack->Invert)
|
||||
return false;
|
||||
|
||||
/* Only a simple blit, no scale, bias or other mapping. */
|
||||
if (ctx->_ImageTransferState)
|
||||
return false;
|
||||
|
||||
/* This renderbuffer can come from a texture. In this case, we impose
|
||||
* some of the same restrictions we have for textures and adjust for
|
||||
* miplevels.
|
||||
|
@@ -118,6 +118,10 @@ intel_texsubimage_tiled_memcpy(struct gl_context * ctx,
|
||||
packing->Invert)
|
||||
return false;
|
||||
|
||||
/* Only a simple blit, no scale, bias or other mapping. */
|
||||
if (ctx->_ImageTransferState)
|
||||
return false;
|
||||
|
||||
if (!intel_get_memcpy(texImage->TexFormat, format, type, &mem_copy, &cpp,
|
||||
INTEL_UPLOAD))
|
||||
return false;
|
||||
|
@@ -1013,6 +1013,10 @@ _mesa_format_to_type_and_comps(mesa_format format,
|
||||
case MESA_FORMAT_R8G8B8X8_UNORM:
|
||||
case MESA_FORMAT_B8G8R8X8_UNORM:
|
||||
case MESA_FORMAT_X8R8G8B8_UNORM:
|
||||
case MESA_FORMAT_A8B8G8R8_UINT:
|
||||
case MESA_FORMAT_R8G8B8A8_UINT:
|
||||
case MESA_FORMAT_B8G8R8A8_UINT:
|
||||
case MESA_FORMAT_A8R8G8B8_UINT:
|
||||
*datatype = GL_UNSIGNED_BYTE;
|
||||
*comps = 4;
|
||||
return;
|
||||
@@ -1023,6 +1027,8 @@ _mesa_format_to_type_and_comps(mesa_format format,
|
||||
return;
|
||||
case MESA_FORMAT_B5G6R5_UNORM:
|
||||
case MESA_FORMAT_R5G6B5_UNORM:
|
||||
case MESA_FORMAT_B5G6R5_UINT:
|
||||
case MESA_FORMAT_R5G6B5_UINT:
|
||||
*datatype = GL_UNSIGNED_SHORT_5_6_5;
|
||||
*comps = 3;
|
||||
return;
|
||||
@@ -1030,6 +1036,8 @@ _mesa_format_to_type_and_comps(mesa_format format,
|
||||
case MESA_FORMAT_B4G4R4A4_UNORM:
|
||||
case MESA_FORMAT_A4R4G4B4_UNORM:
|
||||
case MESA_FORMAT_B4G4R4X4_UNORM:
|
||||
case MESA_FORMAT_B4G4R4A4_UINT:
|
||||
case MESA_FORMAT_A4R4G4B4_UINT:
|
||||
*datatype = GL_UNSIGNED_SHORT_4_4_4_4;
|
||||
*comps = 4;
|
||||
return;
|
||||
@@ -1037,6 +1045,8 @@ _mesa_format_to_type_and_comps(mesa_format format,
|
||||
case MESA_FORMAT_B5G5R5A1_UNORM:
|
||||
case MESA_FORMAT_A1R5G5B5_UNORM:
|
||||
case MESA_FORMAT_B5G5R5X1_UNORM:
|
||||
case MESA_FORMAT_B5G5R5A1_UINT:
|
||||
case MESA_FORMAT_A1R5G5B5_UINT:
|
||||
*datatype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
||||
*comps = 4;
|
||||
return;
|
||||
@@ -1047,6 +1057,7 @@ _mesa_format_to_type_and_comps(mesa_format format,
|
||||
return;
|
||||
|
||||
case MESA_FORMAT_A1B5G5R5_UNORM:
|
||||
case MESA_FORMAT_A1B5G5R5_UINT:
|
||||
*datatype = GL_UNSIGNED_SHORT_5_5_5_1;
|
||||
*comps = 4;
|
||||
return;
|
||||
@@ -1081,19 +1092,23 @@ _mesa_format_to_type_and_comps(mesa_format format,
|
||||
return;
|
||||
|
||||
case MESA_FORMAT_R3G3B2_UNORM:
|
||||
case MESA_FORMAT_R3G3B2_UINT:
|
||||
*datatype = GL_UNSIGNED_BYTE_2_3_3_REV;
|
||||
*comps = 3;
|
||||
return;
|
||||
case MESA_FORMAT_A4B4G4R4_UNORM:
|
||||
case MESA_FORMAT_A4B4G4R4_UINT:
|
||||
*datatype = GL_UNSIGNED_SHORT_4_4_4_4;
|
||||
*comps = 4;
|
||||
return;
|
||||
|
||||
case MESA_FORMAT_R4G4B4A4_UNORM:
|
||||
case MESA_FORMAT_R4G4B4A4_UINT:
|
||||
*datatype = GL_UNSIGNED_SHORT_4_4_4_4;
|
||||
*comps = 4;
|
||||
return;
|
||||
case MESA_FORMAT_R5G5B5A1_UNORM:
|
||||
case MESA_FORMAT_R5G5B5A1_UINT:
|
||||
*datatype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
||||
*comps = 4;
|
||||
return;
|
||||
@@ -1109,6 +1124,7 @@ _mesa_format_to_type_and_comps(mesa_format format,
|
||||
return;
|
||||
|
||||
case MESA_FORMAT_B2G3R3_UNORM:
|
||||
case MESA_FORMAT_B2G3R3_UINT:
|
||||
*datatype = GL_UNSIGNED_BYTE_3_3_2;
|
||||
*comps = 3;
|
||||
return;
|
||||
@@ -2138,6 +2154,96 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
|
||||
type == GL_UNSIGNED_INT_2_10_10_10_REV &&
|
||||
!swapBytes);
|
||||
|
||||
case MESA_FORMAT_B5G6R5_UINT:
|
||||
return format == GL_RGB_INTEGER && type == GL_UNSIGNED_SHORT_5_6_5;
|
||||
|
||||
case MESA_FORMAT_R5G6B5_UINT:
|
||||
return format == GL_RGB_INTEGER && type == GL_UNSIGNED_SHORT_5_6_5_REV;
|
||||
|
||||
case MESA_FORMAT_B2G3R3_UINT:
|
||||
return format == GL_RGB_INTEGER && type == GL_UNSIGNED_BYTE_3_3_2;
|
||||
|
||||
case MESA_FORMAT_R3G3B2_UINT:
|
||||
return format == GL_RGB_INTEGER && type == GL_UNSIGNED_BYTE_2_3_3_REV;
|
||||
|
||||
case MESA_FORMAT_A4B4G4R4_UINT:
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4 && !swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && swapBytes)
|
||||
return GL_TRUE;
|
||||
return GL_FALSE;
|
||||
|
||||
case MESA_FORMAT_R4G4B4A4_UINT:
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && !swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4 && swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
return GL_FALSE;
|
||||
|
||||
case MESA_FORMAT_B4G4R4A4_UINT:
|
||||
return format == GL_BGRA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4_REV &&
|
||||
!swapBytes;
|
||||
|
||||
case MESA_FORMAT_A4R4G4B4_UINT:
|
||||
return GL_FALSE;
|
||||
|
||||
case MESA_FORMAT_A1B5G5R5_UINT:
|
||||
return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_5_5_5_1 &&
|
||||
!swapBytes;
|
||||
|
||||
case MESA_FORMAT_B5G5R5A1_UINT:
|
||||
return format == GL_BGRA_INTEGER && type == GL_UNSIGNED_SHORT_1_5_5_5_REV &&
|
||||
!swapBytes;
|
||||
|
||||
case MESA_FORMAT_A1R5G5B5_UINT:
|
||||
return format == GL_BGRA_INTEGER && type == GL_UNSIGNED_SHORT_5_5_5_1 &&
|
||||
!swapBytes;
|
||||
|
||||
case MESA_FORMAT_R5G5B5A1_UINT:
|
||||
return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
||||
|
||||
case MESA_FORMAT_A8B8G8R8_UINT:
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV && swapBytes)
|
||||
return GL_TRUE;
|
||||
return GL_FALSE;
|
||||
|
||||
case MESA_FORMAT_A8R8G8B8_UINT:
|
||||
if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 &&
|
||||
!swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
|
||||
swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
return GL_FALSE;
|
||||
|
||||
case MESA_FORMAT_R8G8B8A8_UINT:
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
|
||||
!swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 && swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
return GL_FALSE;
|
||||
|
||||
case MESA_FORMAT_B8G8R8A8_UINT:
|
||||
if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV &&
|
||||
!swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 && swapBytes)
|
||||
return GL_TRUE;
|
||||
|
||||
return GL_FALSE;
|
||||
|
||||
case MESA_FORMAT_R9G9B9E5_FLOAT:
|
||||
return format == GL_RGB && type == GL_UNSIGNED_INT_5_9_9_9_REV &&
|
||||
!swapBytes;
|
||||
|
@@ -186,10 +186,26 @@ MESA_FORMAT_RGBX_FLOAT32 , array , 1, 1, f32 , f32 , f32 , x32
|
||||
MESA_FORMAT_Z_FLOAT32 , array , 1, 1, f32 , , , , x___, zs
|
||||
|
||||
# Packed signed/unsigned non-normalized integer formats
|
||||
MESA_FORMAT_A8B8G8R8_UINT , packed, 1, 1, u8 , u8 , u8 , u8 , wzyx, rgb
|
||||
MESA_FORMAT_A8R8G8B8_UINT , packed, 1, 1, u8 , u8 , u8 , u8 , yzwx, rgb
|
||||
MESA_FORMAT_R8G8B8A8_UINT , packed, 1, 1, u8 , u8 , u8 , u8 , xyzw, rgb
|
||||
MESA_FORMAT_B8G8R8A8_UINT , packed, 1, 1, u8 , u8 , u8 , u8 , zyxw, rgb
|
||||
MESA_FORMAT_B10G10R10A2_UINT , packed, 1, 1, u10 , u10 , u10 , u2 , zyxw, rgb
|
||||
MESA_FORMAT_R10G10B10A2_UINT , packed, 1, 1, u10 , u10 , u10 , u2 , xyzw, rgb
|
||||
MESA_FORMAT_A2B10G10R10_UINT , packed, 1, 1, u2 , u10 , u10 , u10 , wzyx, rgb
|
||||
MESA_FORMAT_A2R10G10B10_UINT , packed, 1, 1, u2 , u10 , u10 , u10 , yzwx, rgb
|
||||
MESA_FORMAT_B5G6R5_UINT , packed, 1, 1, u5 , u6 , u5 , , zyx1, rgb
|
||||
MESA_FORMAT_R5G6B5_UINT , packed, 1, 1, u5 , u6 , u5 , , xyz1, rgb
|
||||
MESA_FORMAT_B2G3R3_UINT , packed, 1, 1, u2 , u3 , u3 , , zyx1, rgb
|
||||
MESA_FORMAT_R3G3B2_UINT , packed, 1, 1, u3 , u3 , u2 , , xyz1, rgb
|
||||
MESA_FORMAT_A4B4G4R4_UINT , packed, 1, 1, u4 , u4 , u4 , u4 , wzyx, rgb
|
||||
MESA_FORMAT_R4G4B4A4_UINT , packed, 1, 1, u4 , u4 , u4 , u4 , xyzw, rgb
|
||||
MESA_FORMAT_B4G4R4A4_UINT , packed, 1, 1, u4 , u4 , u4 , u4 , zyxw, rgb
|
||||
MESA_FORMAT_A4R4G4B4_UINT , packed, 1, 1, u4 , u4 , u4 , u4 , yzwx, rgb
|
||||
MESA_FORMAT_A1B5G5R5_UINT , packed, 1, 1, u1 , u5 , u5 , u5 , wzyx, rgb
|
||||
MESA_FORMAT_B5G5R5A1_UINT , packed, 1, 1, u5 , u5 , u5 , u1 , zyxw, rgb
|
||||
MESA_FORMAT_A1R5G5B5_UINT , packed, 1, 1, u1 , u5 , u5 , u5 , yzwx, rgb
|
||||
MESA_FORMAT_R5G5B5A1_UINT , packed, 1, 1, u5 , u5 , u5 , u1 , xyzw, rgb
|
||||
|
||||
# Array signed/unsigned non-normalized integer formats
|
||||
MESA_FORMAT_A_UINT8 , array , 1, 1, u8 , , , , 000x, rgb
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 3.
|
@@ -470,10 +470,27 @@ typedef enum
|
||||
MESA_FORMAT_Z_FLOAT32,
|
||||
|
||||
/* Packed signed/unsigned non-normalized integer formats */
|
||||
|
||||
MESA_FORMAT_A8B8G8R8_UINT, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */
|
||||
MESA_FORMAT_A8R8G8B8_UINT, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
|
||||
MESA_FORMAT_R8G8B8A8_UINT, /* AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */
|
||||
MESA_FORMAT_B8G8R8A8_UINT, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
|
||||
MESA_FORMAT_B10G10R10A2_UINT, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */
|
||||
MESA_FORMAT_R10G10B10A2_UINT, /* AABB BBBB BBBB GGGG GGGG GGRR RRRR RRRR */
|
||||
MESA_FORMAT_A2B10G10R10_UINT, /* RRRR RRRR RRGG GGGG GGGG BBBB BBBB BBAA */
|
||||
MESA_FORMAT_A2R10G10B10_UINT, /* BBBB BBBB BBGG GGGG GGGG RRRR RRRR RRAA */
|
||||
MESA_FORMAT_B5G6R5_UINT, /* RRRR RGGG GGGB BBBB */
|
||||
MESA_FORMAT_R5G6B5_UINT, /* BBBB BGGG GGGR RRRR */
|
||||
MESA_FORMAT_B2G3R3_UINT, /* RRRG GGBB */
|
||||
MESA_FORMAT_R3G3B2_UINT, /* BBGG GRRR */
|
||||
MESA_FORMAT_A4B4G4R4_UINT, /* RRRR GGGG BBBB AAAA */
|
||||
MESA_FORMAT_R4G4B4A4_UINT, /* AAAA BBBB GGGG RRRR */
|
||||
MESA_FORMAT_B4G4R4A4_UINT, /* AAAA RRRR GGGG BBBB */
|
||||
MESA_FORMAT_A4R4G4B4_UINT, /* BBBB GGGG RRRR AAAA */
|
||||
MESA_FORMAT_A1B5G5R5_UINT, /* RRRR RGGG GGBB BBBA */
|
||||
MESA_FORMAT_B5G5R5A1_UINT, /* ARRR RRGG GGGB BBBB */
|
||||
MESA_FORMAT_A1R5G5B5_UINT, /* BBBB BGGG GGRR RRRA */
|
||||
MESA_FORMAT_R5G5B5A1_UINT, /* ABBB BBGG GGGR RRRR */
|
||||
|
||||
/* Array signed/unsigned non-normalized integer formats */
|
||||
MESA_FORMAT_A_UINT8,
|
||||
|
@@ -2718,12 +2718,16 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
|
||||
return MESA_FORMAT_B5G6R5_UNORM;
|
||||
else if (format == GL_BGR)
|
||||
return MESA_FORMAT_R5G6B5_UNORM;
|
||||
else if (format == GL_RGB_INTEGER)
|
||||
return MESA_FORMAT_B5G6R5_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT_5_6_5_REV:
|
||||
if (format == GL_RGB)
|
||||
return MESA_FORMAT_R5G6B5_UNORM;
|
||||
else if (format == GL_BGR)
|
||||
return MESA_FORMAT_B5G6R5_UNORM;
|
||||
else if (format == GL_RGB_INTEGER)
|
||||
return MESA_FORMAT_R5G6B5_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4:
|
||||
if (format == GL_RGBA)
|
||||
@@ -2732,6 +2736,10 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
|
||||
return MESA_FORMAT_A4R4G4B4_UNORM;
|
||||
else if (format == GL_ABGR_EXT)
|
||||
return MESA_FORMAT_R4G4B4A4_UNORM;
|
||||
else if (format == GL_RGBA_INTEGER)
|
||||
return MESA_FORMAT_A4B4G4R4_UINT;
|
||||
else if (format == GL_BGRA_INTEGER)
|
||||
return MESA_FORMAT_A4R4G4B4_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
|
||||
if (format == GL_RGBA)
|
||||
@@ -2740,26 +2748,42 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
|
||||
return MESA_FORMAT_B4G4R4A4_UNORM;
|
||||
else if (format == GL_ABGR_EXT)
|
||||
return MESA_FORMAT_A4B4G4R4_UNORM;
|
||||
else if (format == GL_RGBA_INTEGER)
|
||||
return MESA_FORMAT_R4G4B4A4_UINT;
|
||||
else if (format == GL_BGRA_INTEGER)
|
||||
return MESA_FORMAT_B4G4R4A4_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT_5_5_5_1:
|
||||
if (format == GL_RGBA)
|
||||
return MESA_FORMAT_A1B5G5R5_UNORM;
|
||||
else if (format == GL_BGRA)
|
||||
return MESA_FORMAT_A1R5G5B5_UNORM;
|
||||
else if (format == GL_RGBA_INTEGER)
|
||||
return MESA_FORMAT_A1B5G5R5_UINT;
|
||||
else if (format == GL_BGRA_INTEGER)
|
||||
return MESA_FORMAT_A1R5G5B5_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
|
||||
if (format == GL_RGBA)
|
||||
return MESA_FORMAT_R5G5B5A1_UNORM;
|
||||
else if (format == GL_BGRA)
|
||||
return MESA_FORMAT_B5G5R5A1_UNORM;
|
||||
else if (format == GL_RGBA_INTEGER)
|
||||
return MESA_FORMAT_R5G5B5A1_UINT;
|
||||
else if (format == GL_BGRA_INTEGER)
|
||||
return MESA_FORMAT_B5G5R5A1_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_BYTE_3_3_2:
|
||||
if (format == GL_RGB)
|
||||
return MESA_FORMAT_B2G3R3_UNORM;
|
||||
else if (format == GL_RGB_INTEGER)
|
||||
return MESA_FORMAT_B2G3R3_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_BYTE_2_3_3_REV:
|
||||
if (format == GL_RGB)
|
||||
return MESA_FORMAT_R3G3B2_UNORM;
|
||||
else if (format == GL_RGB_INTEGER)
|
||||
return MESA_FORMAT_R3G3B2_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_INT_5_9_9_9_REV:
|
||||
if (format == GL_RGB)
|
||||
@@ -2794,6 +2818,10 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
|
||||
return MESA_FORMAT_A8R8G8B8_UNORM;
|
||||
else if (format == GL_ABGR_EXT)
|
||||
return MESA_FORMAT_R8G8B8A8_UNORM;
|
||||
else if (format == GL_RGBA_INTEGER)
|
||||
return MESA_FORMAT_A8B8G8R8_UINT;
|
||||
else if (format == GL_BGRA_INTEGER)
|
||||
return MESA_FORMAT_A8R8G8B8_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_INT_8_8_8_8_REV:
|
||||
if (format == GL_RGBA)
|
||||
@@ -2802,6 +2830,10 @@ _mesa_format_from_format_and_type(GLenum format, GLenum type)
|
||||
return MESA_FORMAT_B8G8R8A8_UNORM;
|
||||
else if (format == GL_ABGR_EXT)
|
||||
return MESA_FORMAT_A8B8G8R8_UNORM;
|
||||
else if (format == GL_RGBA_INTEGER)
|
||||
return MESA_FORMAT_R8G8B8A8_UINT;
|
||||
else if (format == GL_BGRA_INTEGER)
|
||||
return MESA_FORMAT_B8G8R8A8_UINT;
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT_8_8_MESA:
|
||||
if (format == GL_YCBCR_MESA)
|
||||
|
@@ -49,8 +49,8 @@
|
||||
* \param src the array with the source data we want to byte-swap.
|
||||
* \param n number of words.
|
||||
*/
|
||||
void
|
||||
_mesa_swap2_copy( GLushort *dst, GLushort *src, GLuint n )
|
||||
static void
|
||||
swap2_copy( GLushort *dst, GLushort *src, GLuint n )
|
||||
{
|
||||
GLuint i;
|
||||
for (i = 0; i < n; i++) {
|
||||
@@ -58,7 +58,11 @@ _mesa_swap2_copy( GLushort *dst, GLushort *src, GLuint n )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_mesa_swap2(GLushort *p, GLuint n)
|
||||
{
|
||||
swap2_copy(p, p, n);
|
||||
}
|
||||
|
||||
/*
|
||||
* Flip the order of the 4 bytes in each word in the given array (src) and
|
||||
@@ -69,8 +73,8 @@ _mesa_swap2_copy( GLushort *dst, GLushort *src, GLuint n )
|
||||
* \param src the array with the source data we want to byte-swap.
|
||||
* \param n number of words.
|
||||
*/
|
||||
void
|
||||
_mesa_swap4_copy( GLuint *dst, GLuint *src, GLuint n )
|
||||
static void
|
||||
swap4_copy( GLuint *dst, GLuint *src, GLuint n )
|
||||
{
|
||||
GLuint i, a, b;
|
||||
for (i = 0; i < n; i++) {
|
||||
@@ -83,6 +87,11 @@ _mesa_swap4_copy( GLuint *dst, GLuint *src, GLuint n )
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_mesa_swap4(GLuint *p, GLuint n)
|
||||
{
|
||||
swap4_copy(p, p, n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the byte offset of a specific pixel in an image (1D, 2D or 3D).
|
||||
@@ -958,3 +967,42 @@ _mesa_clip_blit(struct gl_context *ctx,
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Swap the bytes in a 2D image.
|
||||
*
|
||||
* using the packing information this swaps the bytes
|
||||
* according to the format and type of data being input.
|
||||
* It takes into a/c various packing parameters like
|
||||
* Alignment and RowLength.
|
||||
*/
|
||||
void
|
||||
_mesa_swap_bytes_2d_image(GLenum format, GLenum type,
|
||||
const struct gl_pixelstore_attrib *packing,
|
||||
GLsizei width, GLsizei height,
|
||||
GLvoid *dst, const GLvoid *src)
|
||||
{
|
||||
GLint swapSize = _mesa_sizeof_packed_type(type);
|
||||
|
||||
assert(packing->SwapBytes);
|
||||
|
||||
if (swapSize == 2 || swapSize == 4) {
|
||||
int swapsPerPixel = _mesa_bytes_per_pixel(format, type) / swapSize;
|
||||
int stride = _mesa_image_row_stride(packing, width, format, type);
|
||||
int row;
|
||||
uint8_t *dstrow;
|
||||
const uint8_t *srcrow;
|
||||
assert(swapsPerPixel > 0);
|
||||
assert(_mesa_bytes_per_pixel(format, type) % swapSize == 0);
|
||||
dstrow = dst;
|
||||
srcrow = src;
|
||||
for (row = 0; row < height; row++) {
|
||||
if (swapSize == 2)
|
||||
swap2_copy((GLushort *)dstrow, (GLushort *)srcrow, width * swapsPerPixel);
|
||||
else if (swapSize == 4)
|
||||
swap4_copy((GLuint *)dstrow, (GLuint *)srcrow, width * swapsPerPixel);
|
||||
dstrow += stride;
|
||||
srcrow += stride;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -35,22 +35,11 @@ struct gl_pixelstore_attrib;
|
||||
struct gl_framebuffer;
|
||||
|
||||
extern void
|
||||
_mesa_swap2_copy(GLushort *dst, GLushort *src, GLuint n);
|
||||
_mesa_swap2(GLushort *p, GLuint n);
|
||||
|
||||
extern void
|
||||
_mesa_swap4_copy(GLuint *dst, GLuint *src, GLuint n);
|
||||
_mesa_swap4(GLuint *p, GLuint n);
|
||||
|
||||
static inline void
|
||||
_mesa_swap2(GLushort *p, GLuint n)
|
||||
{
|
||||
_mesa_swap2_copy(p, p, n);
|
||||
}
|
||||
|
||||
static inline void
|
||||
_mesa_swap4(GLuint *p, GLuint n)
|
||||
{
|
||||
_mesa_swap4_copy(p, p, n);
|
||||
}
|
||||
|
||||
extern GLintptr
|
||||
_mesa_image_offset( GLuint dimensions,
|
||||
@@ -146,5 +135,10 @@ _mesa_clip_blit(struct gl_context *ctx,
|
||||
GLint *srcX0, GLint *srcY0, GLint *srcX1, GLint *srcY1,
|
||||
GLint *dstX0, GLint *dstY0, GLint *dstX1, GLint *dstY1);
|
||||
|
||||
void
|
||||
_mesa_swap_bytes_2d_image(GLenum format, GLenum type,
|
||||
const struct gl_pixelstore_attrib *packing,
|
||||
GLsizei width, GLsizei height,
|
||||
GLvoid *dst, const GLvoid *src);
|
||||
|
||||
#endif
|
||||
|
@@ -523,7 +523,8 @@ read_rgba_pixels( struct gl_context *ctx,
|
||||
* convert to, then we can convert directly into the dst buffer and avoid
|
||||
* the final conversion/copy from the rgba buffer to the dst buffer.
|
||||
*/
|
||||
if (dst_format == rgba_format) {
|
||||
if (dst_format == rgba_format &&
|
||||
dst_stride == rgba_stride) {
|
||||
need_convert = false;
|
||||
rgba = dst;
|
||||
} else {
|
||||
@@ -613,15 +614,8 @@ read_rgba_pixels( struct gl_context *ctx,
|
||||
done_swap:
|
||||
/* Handle byte swapping if required */
|
||||
if (packing->SwapBytes) {
|
||||
GLint swapSize = _mesa_sizeof_packed_type(type);
|
||||
if (swapSize == 2 || swapSize == 4) {
|
||||
int swapsPerPixel = _mesa_bytes_per_pixel(format, type) / swapSize;
|
||||
assert(_mesa_bytes_per_pixel(format, type) % swapSize == 0);
|
||||
if (swapSize == 2)
|
||||
_mesa_swap2((GLushort *) dst, width * height * swapsPerPixel);
|
||||
else if (swapSize == 4)
|
||||
_mesa_swap4((GLuint *) dst, width * height * swapsPerPixel);
|
||||
}
|
||||
_mesa_swap_bytes_2d_image(format, type, packing,
|
||||
width, height, dst, dst);
|
||||
}
|
||||
|
||||
done_unmap:
|
||||
|
@@ -65,7 +65,7 @@ _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS)
|
||||
if (srcFormat != GL_RGB ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGB/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
|
@@ -130,7 +130,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
|
||||
if (srcFormat != GL_RGB ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGB/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
@@ -187,7 +187,7 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
|
||||
if (srcFormat != GL_RGBA ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGBA/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
@@ -244,7 +244,7 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
|
||||
if (srcFormat != GL_RGBA ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGBA/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
@@ -300,7 +300,7 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
|
||||
if (srcFormat != GL_RGBA ||
|
||||
srcType != GL_UNSIGNED_BYTE ||
|
||||
ctx->_ImageTransferState ||
|
||||
srcPacking->RowLength != srcWidth ||
|
||||
ALIGN(srcPacking->RowLength, srcPacking->Alignment) != srcWidth ||
|
||||
srcPacking->SwapBytes) {
|
||||
/* convert image to RGBA/GLubyte */
|
||||
GLubyte *tempImageSlices[1];
|
||||
|
@@ -361,6 +361,13 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
|
||||
tempSlice, RGBA32_FLOAT, srcStride,
|
||||
width, height,
|
||||
needsRebase ? rebaseSwizzle : NULL);
|
||||
|
||||
/* Handle byte swapping if required */
|
||||
if (ctx->Pack.SwapBytes) {
|
||||
_mesa_swap_bytes_2d_image(format, type, &ctx->Pack,
|
||||
width, height, dest, dest);
|
||||
}
|
||||
|
||||
tempSlice += 4 * width * height;
|
||||
}
|
||||
|
||||
@@ -557,17 +564,9 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
|
||||
|
||||
do_swap:
|
||||
/* Handle byte swapping if required */
|
||||
if (ctx->Pack.SwapBytes) {
|
||||
GLint swapSize = _mesa_sizeof_packed_type(type);
|
||||
if (swapSize == 2 || swapSize == 4) {
|
||||
int swapsPerPixel = _mesa_bytes_per_pixel(format, type) / swapSize;
|
||||
assert(_mesa_bytes_per_pixel(format, type) % swapSize == 0);
|
||||
if (swapSize == 2)
|
||||
_mesa_swap2((GLushort *) dest, width * height * swapsPerPixel);
|
||||
else if (swapSize == 4)
|
||||
_mesa_swap4((GLuint *) dest, width * height * swapsPerPixel);
|
||||
}
|
||||
}
|
||||
if (ctx->Pack.SwapBytes)
|
||||
_mesa_swap_bytes_2d_image(format, type, &ctx->Pack,
|
||||
width, height, dest, dest);
|
||||
|
||||
/* Unmap the src texture buffer */
|
||||
ctx->Driver.UnmapTextureImage(ctx, texImage, zoffset + img);
|
||||
|
@@ -727,19 +727,25 @@ texstore_rgba(TEXSTORE_PARAMS)
|
||||
*/
|
||||
GLint swapSize = _mesa_sizeof_packed_type(srcType);
|
||||
if (swapSize == 2 || swapSize == 4) {
|
||||
int bytesPerPixel = _mesa_bytes_per_pixel(srcFormat, srcType);
|
||||
int swapsPerPixel = bytesPerPixel / swapSize;
|
||||
int elementCount = srcWidth * srcHeight * srcDepth;
|
||||
assert(bytesPerPixel % swapSize == 0);
|
||||
tempImage = malloc(elementCount * bytesPerPixel);
|
||||
int imageStride = _mesa_image_image_stride(srcPacking, srcWidth, srcHeight, srcFormat, srcType);
|
||||
int bufferSize = imageStride * srcDepth;
|
||||
int layer;
|
||||
const uint8_t *src;
|
||||
uint8_t *dst;
|
||||
|
||||
tempImage = malloc(bufferSize);
|
||||
if (!tempImage)
|
||||
return GL_FALSE;
|
||||
if (swapSize == 2)
|
||||
_mesa_swap2_copy(tempImage, (GLushort *) srcAddr,
|
||||
elementCount * swapsPerPixel);
|
||||
else
|
||||
_mesa_swap4_copy(tempImage, (GLuint *) srcAddr,
|
||||
elementCount * swapsPerPixel);
|
||||
src = srcAddr;
|
||||
dst = tempImage;
|
||||
for (layer = 0; layer < srcDepth; layer++) {
|
||||
_mesa_swap_bytes_2d_image(srcFormat, srcType,
|
||||
srcPacking,
|
||||
srcWidth, srcHeight,
|
||||
dst, src);
|
||||
src += imageStride;
|
||||
dst += imageStride;
|
||||
}
|
||||
srcAddr = tempImage;
|
||||
}
|
||||
}
|
||||
|
@@ -873,7 +873,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
GLuint cols, GLuint rows,
|
||||
GLint location, GLsizei count,
|
||||
GLboolean transpose,
|
||||
const GLvoid *values, GLenum type)
|
||||
const GLvoid *values, enum glsl_base_type basicType)
|
||||
{
|
||||
unsigned offset;
|
||||
unsigned vectors;
|
||||
@@ -892,8 +892,8 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
return;
|
||||
}
|
||||
|
||||
assert(type == GL_FLOAT || type == GL_DOUBLE);
|
||||
size_mul = type == GL_DOUBLE ? 2 : 1;
|
||||
assert(basicType == GLSL_TYPE_FLOAT || basicType == GLSL_TYPE_DOUBLE);
|
||||
size_mul = basicType == GLSL_TYPE_DOUBLE ? 2 : 1;
|
||||
|
||||
assert(!uni->type->is_sampler());
|
||||
vectors = uni->type->matrix_columns;
|
||||
@@ -919,6 +919,31 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
}
|
||||
}
|
||||
|
||||
/* Section 2.11.7 (Uniform Variables) of the OpenGL 4.2 Core Profile spec
|
||||
* says:
|
||||
*
|
||||
* "If any of the following conditions occur, an INVALID_OPERATION
|
||||
* error is generated by the Uniform* commands, and no uniform values
|
||||
* are changed:
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* - if the uniform declared in the shader is not of type boolean and
|
||||
* the type indicated in the name of the Uniform* command used does
|
||||
* not match the type of the uniform"
|
||||
*
|
||||
* There are no Boolean matrix types, so we do not need to allow
|
||||
* GLSL_TYPE_BOOL here (as _mesa_uniform does).
|
||||
*/
|
||||
if (uni->type->base_type != basicType) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glUniformMatrix%ux%u(\"%s\"@%d is %s, not %s)",
|
||||
cols, rows, uni->name, location,
|
||||
glsl_type_name(uni->type->base_type),
|
||||
glsl_type_name(basicType));
|
||||
return;
|
||||
}
|
||||
|
||||
if (unlikely(ctx->_Shader->Flags & GLSL_UNIFORMS)) {
|
||||
log_uniform(values, uni->type->base_type, components, vectors, count,
|
||||
bool(transpose), shProg, location, uni);
|
||||
@@ -948,7 +973,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
if (!transpose) {
|
||||
memcpy(&uni->storage[elements * offset], values,
|
||||
sizeof(uni->storage[0]) * elements * count * size_mul);
|
||||
} else if (type == GL_FLOAT) {
|
||||
} else if (basicType == GLSL_TYPE_FLOAT) {
|
||||
/* Copy and transpose the matrix.
|
||||
*/
|
||||
const float *src = (const float *)values;
|
||||
@@ -965,7 +990,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
src += elements;
|
||||
}
|
||||
} else {
|
||||
assert(type == GL_DOUBLE);
|
||||
assert(basicType == GLSL_TYPE_DOUBLE);
|
||||
const double *src = (const double *)values;
|
||||
double *dst = (double *)&uni->storage[elements * offset].f;
|
||||
|
||||
|
@@ -553,7 +553,7 @@ _mesa_UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
2, 2, location, count, transpose, value, GL_FLOAT);
|
||||
2, 2, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -562,7 +562,7 @@ _mesa_UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
3, 3, location, count, transpose, value, GL_FLOAT);
|
||||
3, 3, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -571,7 +571,7 @@ _mesa_UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
4, 4, location, count, transpose, value, GL_FLOAT);
|
||||
4, 4, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
/** Same as above with direct state access **/
|
||||
@@ -683,7 +683,7 @@ _mesa_ProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix2fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 2, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 2, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -694,7 +694,7 @@ _mesa_ProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix3fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 3, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 3, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -705,7 +705,7 @@ _mesa_ProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix4fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 4, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 4, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
|
||||
@@ -718,7 +718,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
2, 3, location, count, transpose, value, GL_FLOAT);
|
||||
2, 3, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -727,7 +727,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
3, 2, location, count, transpose, value, GL_FLOAT);
|
||||
3, 2, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -736,7 +736,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
2, 4, location, count, transpose, value, GL_FLOAT);
|
||||
2, 4, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -745,7 +745,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
4, 2, location, count, transpose, value, GL_FLOAT);
|
||||
4, 2, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -754,7 +754,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
3, 4, location, count, transpose, value, GL_FLOAT);
|
||||
3, 4, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -763,7 +763,7 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
4, 3, location, count, transpose, value, GL_FLOAT);
|
||||
4, 3, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
/** Same as above with direct state access **/
|
||||
@@ -776,7 +776,7 @@ _mesa_ProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix2x3fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 3, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 3, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -787,7 +787,7 @@ _mesa_ProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix3x2fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 2, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 2, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -798,7 +798,7 @@ _mesa_ProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix2x4fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 4, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 4, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -809,7 +809,7 @@ _mesa_ProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix4x2fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 2, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 2, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -820,7 +820,7 @@ _mesa_ProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix3x4fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 4, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 4, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -831,7 +831,7 @@ _mesa_ProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix4x3fv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 3, location, count, transpose, value, GL_FLOAT);
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 3, location, count, transpose, value, GLSL_TYPE_FLOAT);
|
||||
}
|
||||
|
||||
|
||||
@@ -1303,7 +1303,7 @@ _mesa_UniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
2, 2, location, count, transpose, value, GL_DOUBLE);
|
||||
2, 2, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1312,7 +1312,7 @@ _mesa_UniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
3, 3, location, count, transpose, value, GL_DOUBLE);
|
||||
3, 3, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1321,7 +1321,7 @@ _mesa_UniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
4, 4, location, count, transpose, value, GL_DOUBLE);
|
||||
4, 4, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1330,7 +1330,7 @@ _mesa_UniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
2, 3, location, count, transpose, value, GL_DOUBLE);
|
||||
2, 3, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1339,7 +1339,7 @@ _mesa_UniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
3, 2, location, count, transpose, value, GL_DOUBLE);
|
||||
3, 2, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1348,7 +1348,7 @@ _mesa_UniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
2, 4, location, count, transpose, value, GL_DOUBLE);
|
||||
2, 4, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1357,7 +1357,7 @@ _mesa_UniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
4, 2, location, count, transpose, value, GL_DOUBLE);
|
||||
4, 2, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1366,7 +1366,7 @@ _mesa_UniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
3, 4, location, count, transpose, value, GL_DOUBLE);
|
||||
3, 4, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1375,7 +1375,7 @@ _mesa_UniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose,
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
_mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
|
||||
4, 3, location, count, transpose, value, GL_DOUBLE);
|
||||
4, 3, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1481,7 +1481,7 @@ _mesa_ProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix2dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 2, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 2, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1492,7 +1492,7 @@ _mesa_ProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix3dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 3, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 3, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1503,7 +1503,7 @@ _mesa_ProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix4dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 4, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 4, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1514,7 +1514,7 @@ _mesa_ProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix2x3dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 3, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 3, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1525,7 +1525,7 @@ _mesa_ProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix3x2dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 2, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 2, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1536,7 +1536,7 @@ _mesa_ProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix2x4dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 4, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 2, 4, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1547,7 +1547,7 @@ _mesa_ProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix4x2dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 2, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 2, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1558,7 +1558,7 @@ _mesa_ProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix3x4dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 4, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 3, 4, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -1569,5 +1569,5 @@ _mesa_ProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count,
|
||||
struct gl_shader_program *shProg =
|
||||
_mesa_lookup_shader_program_err(ctx, program,
|
||||
"glProgramUniformMatrix4x3dv");
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 3, location, count, transpose, value, GL_DOUBLE);
|
||||
_mesa_uniform_matrix(ctx, shProg, 4, 3, location, count, transpose, value, GLSL_TYPE_DOUBLE);
|
||||
}
|
||||
|
@@ -355,7 +355,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
GLuint cols, GLuint rows,
|
||||
GLint location, GLsizei count,
|
||||
GLboolean transpose,
|
||||
const GLvoid *values, GLenum type);
|
||||
const GLvoid *values, enum glsl_base_type basicType);
|
||||
|
||||
void
|
||||
_mesa_get_uniform(struct gl_context *ctx, GLuint program, GLint location,
|
||||
|
@@ -238,9 +238,9 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y,
|
||||
GLuint row;
|
||||
|
||||
for (row = 0; row < (unsigned) height; row++) {
|
||||
GLvoid *dest = _mesa_image_address3d(pack, pixels,
|
||||
GLvoid *dest = _mesa_image_address2d(pack, pixels,
|
||||
width, height, format,
|
||||
type, 0, row, 0);
|
||||
type, row, 0);
|
||||
memcpy(dest, map, bytesPerRow);
|
||||
map += tex_xfer->stride;
|
||||
}
|
||||
|
@@ -481,17 +481,17 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
|
||||
*/
|
||||
GLint swapSize = _mesa_sizeof_packed_type(type);
|
||||
if (swapSize == 2 || swapSize == 4) {
|
||||
int components = _mesa_components_in_format(format);
|
||||
int elementCount = width * height * components;
|
||||
tempImage = malloc(elementCount * swapSize);
|
||||
int imageStride = _mesa_image_image_stride(unpack, width, height, format, type);
|
||||
|
||||
tempImage = malloc(imageStride);
|
||||
if (!tempImage) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels");
|
||||
return;
|
||||
}
|
||||
if (swapSize == 2)
|
||||
_mesa_swap2_copy(tempImage, (GLushort *) pixels, elementCount);
|
||||
else
|
||||
_mesa_swap4_copy(tempImage, (GLuint *) pixels, elementCount);
|
||||
|
||||
_mesa_swap_bytes_2d_image(format, type, unpack,
|
||||
width, height, tempImage, pixels);
|
||||
|
||||
pixels = tempImage;
|
||||
}
|
||||
}
|
||||
|
@@ -282,10 +282,26 @@ texfetch_funcs[] =
|
||||
},
|
||||
|
||||
/* Packed signed/unsigned non-normalized integer formats */
|
||||
FETCH_NULL(A8B8G8R8_UINT),
|
||||
FETCH_NULL(A8R8G8B8_UINT),
|
||||
FETCH_NULL(R8G8B8A8_UINT),
|
||||
FETCH_NULL(B8G8R8A8_UINT),
|
||||
FETCH_NULL(B10G10R10A2_UINT),
|
||||
FETCH_NULL(R10G10B10A2_UINT),
|
||||
FETCH_NULL(A2B10G10R10_UINT),
|
||||
FETCH_NULL(A2R10G10B10_UINT),
|
||||
FETCH_NULL(B5G6R5_UINT),
|
||||
FETCH_NULL(R5G6B5_UINT),
|
||||
FETCH_NULL(B2G3R3_UINT),
|
||||
FETCH_NULL(R3G3B2_UINT),
|
||||
FETCH_NULL(A4B4G4R4_UINT),
|
||||
FETCH_NULL(R4G4B4A4_UINT),
|
||||
FETCH_NULL(B4G4R4A4_UINT),
|
||||
FETCH_NULL(A4R4G4B4_UINT),
|
||||
FETCH_NULL(A1B5G5R5_UINT),
|
||||
FETCH_NULL(B5G5R5A1_UINT),
|
||||
FETCH_NULL(A1R5G5B5_UINT),
|
||||
FETCH_NULL(R5G5B5A1_UINT),
|
||||
|
||||
/* Array signed/unsigned non-normalized integer formats */
|
||||
FETCH_NULL(A_UINT8),
|
||||
|
Reference in New Issue
Block a user