Compare commits

...

32 Commits

Author SHA1 Message Date
Emil Velikov
20db46c227 Update version to 11.1.0-rc3
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2015-12-07 13:50:15 +00:00
Michel Dänzer
b2a5efb56f radeon/llvm: Use llvm.AMDIL.exp intrinsic again for now
llvm.exp2.f32 doesn't work in some cases yet.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92709

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit d094631936)
2015-12-04 16:37:19 +00:00
Connor Abbott
38c645b60a i965: fix 64-bit immediates in brw_inst(_set)_bits
If we tried to get/set something that was exactly 64 bits, we would
try to do (1 << 64) - 1 to calculate the mask which doesn't give us all
1's like we want.

v2 (Iago)
 - Replace ~0 by ~0ull
 - Removed unnecessary parenthesis

v3 (Kristian)
 - Avoid the conditional

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
(cherry picked from commit b1a83b5d1b)

Squashed with commit

i965: Use ull immediates in brw_inst_bits

This fixes a regression introduced in b1a83b5d1 that caused basically all
shaders to fail to compile on 32-bit platforms.

Reported-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 9d703de85a)
Nominated-by: Ian Romanick <ian.d.romanick@intel.com>
2015-12-04 16:37:07 +00:00
Emil Velikov
2dff4c6fa7 mesa: rework the meaning of gl_debug_message::length
Currently it stores strlen(buf) whenever the user originally provided a
negative value for length.

Although I've not seen any explicit text in the spec, CTS requires that
the very same length (be that negative value or not) is returned back on
Pop.

So let's push down the length < 0 checks, tweak the meaning of
gl_debug_message::length and fix GetDebugMessageLog to add and count the
null terminators, as required by the spec.

v2: return correct total length in GetDebugMessageLog
v3: rebase (drop _mesa_shader_debug hunk).

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 5a23f6bd8d)
2015-12-04 16:37:07 +00:00
Emil Velikov
d81ddb3ed8 mesa: errors: validate the length of null terminated string
We're about to rework the meaning of gl_debug_message::length to only
store the user provided data. Thus we should add an explicit validation
for null terminated strings.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 622186fbdf)
2015-12-04 16:37:07 +00:00
Emil Velikov
c25c1dbf51 mesa: accept TYPE_PUSH/POP_GROUP with glDebugMessageInsert
These new (relative to ARB_debug_output) tokens, have been explicitly
separated from the existing ones in the spec text. With the reference
to glDebugMessageInsert was dropped.

At the same time, further down the spec says:
   "The value of <type> must be one of the values from Table 5.4"

... and these two are listed in Table 5.4.

The GL 4.3 and GLES 3.2 do not give any hints on the former
'definition', plus CTS requires that the tokens are valid values for
glDebugMessageInsert.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 66fea8bd96)
2015-12-04 16:37:07 +00:00
Emil Velikov
bed982c4b7 mesa: add SEVERITY_NOTIFICATION to default state
As per the spec quote:

    "All messages are initially enabled unless their assigned severity
    is DEBUG_SEVERITY_LOW"

We already had MEDIUM and HIGH set, let's toggle NOTIFICATION as well.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 53be28107b)
2015-12-04 16:37:06 +00:00
Emil Velikov
dcaf3989d1 mesa: return the correct value for GroupStackDepth
We already have one group (the default) as specified in the spec. So
lets return its size, rather than the index of the current group.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 078dd6a0b4)
2015-12-04 16:37:06 +00:00
Emil Velikov
996a4958da mesa: rename GroupStackDepth to CurrentGroup
The variable is used as the actual index, rather than the size of the
group stack - rename it to reflect that.

Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit f39954bf7c)
2015-12-04 16:37:06 +00:00
Emil Velikov
0cf5a8159f mesa: do not enable KHR_debug for ES 1.0
The extension requires (cough implements) GetPointervKHR (alias of
GetPointerv) which in itself is available for ES 1.1 enabled mesa.

Anyone willing to fish around and implement it for ES 1.0 is more than
welcome to revert this commit. Until then lets restrict things.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit 1ca735701b)
2015-12-04 16:37:06 +00:00
Emil Velikov
6cc9a53d84 glapi: add GetPointervKHR to the ES dispatch
The KHR_debug extension implements this.

Strictly speaking it could be used with ES 1.0, although as the original
function is available on ES 1.1, I'm inclined to lift the KHR_debug
requirement to ES 1.1.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93048
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit f53f9eb8d4)

Squashed with commit

mesa/tests: add KHR_debug GLES glGetPointervKHR entry points

Should have been part of commit f53f9eb8d4 "glapi: add GetPointervKHR
to the ES dispatch".

v2: comment out the ES1.1 symbol and use the same description (pattern)
as elsewhere (Matt)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93235
Fixes: f53f9eb8d4 "glapi: add GetPointervKHR to the ES dispatch".
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Vinson Lee <vlee@freedesktop.org> (v1)
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 1074e38fbb)
2015-12-04 16:36:45 +00:00
Emil Velikov
0a51e77fa1 mesa: remove len argument from _mesa_shader_debug()
There was only a single user which was using strlen(buf).
As this function is not user facing (i.e. we don't need to feed back
original length via a callback), we can simplify things.

Suggested-by: Timothy Arceri <timothy.arceri@collabora.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
(cherry picked from commit d37ebed470)
2015-12-04 16:36:45 +00:00
Ilia Mirkin
ca6d0a3dbe nv50/ir: avoid looking at uninitialized srcMods entries
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 2b98914fe0)
2015-12-04 16:36:45 +00:00
Ilia Mirkin
4ae9142f8b nv50/ir: fix DCE to not generate 96-bit loads
A situation where there's a 128-bit load where the last component gets
DCE'd causes a 96-bit load to be generated, which no GPU can actually
emit. Avoid generating such instructions by scaling back to 64-bit on
the first load when splitting.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 49692f86a1)
2015-12-04 16:36:45 +00:00
Marek Olšák
aff9f8a6f7 radeonsi: fix Fiji for LLVM <= 3.7
Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit dd27825c8c)
2015-12-04 16:36:45 +00:00
Nanley Chery
b0b163c82a mesa/version: Update gl_extensions::Version during version override
Commit a16ffb743c, which introduced
gl_extensions::Version, updates the field when the context version
is computed and when entering/exiting meta. Update this field when
the version is overridden as well.

Cc: "11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
(cherry picked from commit 808e752796)
2015-12-04 16:36:45 +00:00
Tapani Pälli
f70574c835 i965: use _Shader to get fragment program when updating surface state
Atomic counters and Images were using ctx::Shader that does not take in
to account program pipeline changes, ctx::_Shader must be used for SSO to
work. Commit c0347705 already changed ubo's to use this.

Fixes failures seen with following Piglit test:
	arb_separate_shader_object-atomic-counter

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 231db5869c)
2015-12-04 16:36:45 +00:00
Ilia Mirkin
26dff8a7bb nv50/ir: don't forget to mark flagsDef on cvt in txb lowering
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 101e315cc1)
2015-12-04 16:36:45 +00:00
Ilia Mirkin
ea21336d15 nv50/ir: fix instruction permutation logic
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 06055121e6)
2015-12-04 16:36:44 +00:00
Ilia Mirkin
7f6e9c5f59 nv50/ir: the mad source might not have a defining instruction
For example if it's $r63 (aka 0), there won't be a definition.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 11fcf46590)
2015-12-04 16:36:44 +00:00
Ilia Mirkin
0828391a34 nv50/ir: deal with loops with no breaks
For example if there are only returns, the break bb will not end up part
of the CFG. However there will have been a prebreak already emitted for
it, and when hitting the RET that comes after, we will try to insert the
current (i.e. break) BB into the graph even though it will be
unreachable. This makes the SSA code sad.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit adcc547bfb)
2015-12-04 16:36:44 +00:00
Ilia Mirkin
75b6f14ab8 nvc0/ir: fold postfactor into immediate
SM20-SM50 can't emit a post-factor in the presence of a long immediate.
Make sure to fold it in.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ff61ac4838)
2015-12-04 16:36:44 +00:00
Roland Scheidegger
69df6ac272 mesa: fix VIEWPORT_INDEX_PROVOKING_VERTEX and LAYER_PROVOKING_VERTEX queries
These are implementation-dependent queries, but so far we just returned the
value of whatever the current provoking vertex convention was set to, which
was clearly wrong.
Just make this a variable in the context constants like for other things
which are implementation dependent (I assume all drivers will want to set
this to the same value for both queries), and set it to GL_UNDEFINED_VERTEX
which is correct for everybody (and drivers can override it).

Reviewed-by: Brian Paul <brianp@vmware.com>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 09f74e6ef4)
2015-12-04 16:36:44 +00:00
Dave Airlie
0f53b2010c r600: SMX returns CONTEXT_DONE early workaround
streamout, gs rings bug on certain r600s, requires a wait idle
before each surface sync.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit af4013d26b)
2015-12-04 16:36:44 +00:00
Dave Airlie
67be605b96 r600: do SQ flush ES ring rolling workaround
Need to insert a SQ_NON_EVENT when ever geometry
shaders are enabled.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit b63944e8b9)
2015-12-04 16:36:44 +00:00
Tom Stellard
be20f1d7c1 clover: Handle NULL devices returned by pipe_loader_probe() v2
When probing for devices, clover will call pipe_loader_probe() twice.
The first time to retrieve the number of devices, and then second time
to retrieve the device structures.

We currently assume that the return value of both calls will be the
same, but this will not be the case if a device happens to disappear
between the two calls.

When a device disappears, the pipe_loader_probe() will add a NULL
device to the device list, so we need to handle this.

v2:
  - Keep range for loop

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>

CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 9adbb9e713)
2015-12-04 16:36:44 +00:00
Jonathan Gray
15344c978b automake: fix some occurrences of hardcoded -ldl and -lpthread
Correct some occurrences of -ldl and -lpthread to use
$(DLOPEN_LIBS) and $(PTHREAD_LIBS) respectively.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 99cd600835)
2015-12-04 16:36:44 +00:00
Dave Airlie
f1bb27acc5 r600: workaround empty geom shader.
We need to emit at least one cut/emit in every
geometry shader, the easiest workaround it to
stick a single CUT at the top of each geom shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 4f34722575)
2015-12-04 16:36:44 +00:00
Dave Airlie
dd37db0c80 r600: rv670 use at least 16es/gs threads
This is specified in the docs for rv670 to work properly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 04efcc6c7a)
2015-12-04 16:36:43 +00:00
Dave Airlie
8e3fbb90a9 r600: geometry shader gsvs itemsize workaround
On some chips the GSVS itemsize needs to be aligned to a cacheline size.

This only applies to some of the r600 family chips.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8168dfdd4e)
2015-12-04 16:36:43 +00:00
Emil Velikov
79f3aaca4f cherry-ignore: ignore unneeded header update
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2015-12-04 16:36:35 +00:00
Julien Isorce
f9a2bd212a vl/buffers: fixes vl_video_buffer_formats for RGBX
Fixes: 42a5e143a8 "vl/buffers: add RGBX and BGRX to the supported formats"
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 10c14919c8)
2015-12-04 16:33:10 +00:00
33 changed files with 214 additions and 85 deletions

View File

@@ -1 +1 @@
11.1.0-rc2
11.1.0-rc3

2
bin/.cherry-ignore Normal file
View File

@@ -0,0 +1,2 @@
# The introduced definitions are not used/implemented by mesa
1d5b88e33b07bc26d612720e6cb197a6917ba75f gles2: Update gl2ext.h to revision: 32120

View File

@@ -115,7 +115,7 @@ vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format)
return const_resource_formats_VUYA;
case PIPE_FORMAT_R8G8B8X8_UNORM:
return const_resource_formats_VUYX;
return const_resource_formats_YUVX;
case PIPE_FORMAT_B8G8R8X8_UNORM:
return const_resource_formats_VUYX;

View File

@@ -291,7 +291,7 @@ void BasicBlock::permuteAdjacent(Instruction *a, Instruction *b)
if (b->prev)
b->prev->next = b;
if (a->prev)
if (a->next)
a->next->prev = a;
}

View File

@@ -2893,6 +2893,12 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
bb->cfg.attach(&loopBB->cfg, Graph::Edge::BACK);
}
setPosition(reinterpret_cast<BasicBlock *>(breakBBs.pop().u.p), true);
// If the loop never breaks (e.g. only has RET's inside), then there
// will be no way to get to the break bb. However BGNLOOP will have
// already made a PREBREAK to it, so it must be in the CFG.
if (getBB()->cfg.incidentCount() == 0)
loopBB->cfg.attach(&getBB()->cfg, Graph::Edge::TREE);
}
break;
case TGSI_OPCODE_BRK:

View File

@@ -832,7 +832,7 @@ NV50LoweringPreSSA::handleTXB(TexInstruction *i)
}
Value *flags = bld.getScratch(1, FILE_FLAGS);
bld.setPosition(cond, true);
bld.mkCvt(OP_CVT, TYPE_U8, flags, TYPE_U32, cond->getDef(0));
bld.mkCvt(OP_CVT, TYPE_U8, flags, TYPE_U32, cond->getDef(0))->flagsDef = 0;
Instruction *tex[4];
for (l = 0; l < 4; ++l) {

View File

@@ -858,6 +858,12 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
i->src(0).mod = i->src(t).mod;
i->setSrc(1, new_ImmediateValue(prog, imm0.reg.data.u32));
i->src(1).mod = 0;
} else
if (i->postFactor && i->sType == TYPE_F32) {
/* Can't emit a postfactor with an immediate, have to fold it in */
i->setSrc(s, new_ImmediateValue(
prog, imm0.reg.data.f32 * exp2f(i->postFactor)));
i->postFactor = 0;
}
break;
case OP_MAD:
@@ -2654,7 +2660,7 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb)
break;
def = i->getSrc(1)->getInsn();
if (def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) {
if (def && def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) {
vtmp = i->getSrc(1);
i->setSrc(1, def->getSrc(0));
@@ -2956,6 +2962,16 @@ DeadCodeElim::visit(BasicBlock *bb)
return true;
}
// Each load can go into up to 4 destinations, any of which might potentially
// be dead (i.e. a hole). These can always be split into 2 loads, independent
// of where the holes are. We find the first contiguous region, put it into
// the first load, and then put the second contiguous region into the second
// load. There can be at most 2 contiguous regions.
//
// Note that there are some restrictions, for example it's not possible to do
// a 64-bit load that's not 64-bit aligned, so such a load has to be split
// up. Also hardware doesn't support 96-bit loads, so those also have to be
// split into a 64-bit and 32-bit load.
void
DeadCodeElim::checkSplitLoad(Instruction *ld1)
{
@@ -2976,6 +2992,8 @@ DeadCodeElim::checkSplitLoad(Instruction *ld1)
addr1 = ld1->getSrc(0)->reg.data.offset;
n1 = n2 = 0;
size1 = size2 = 0;
// Compute address/width for first load
for (d = 0; ld1->defExists(d); ++d) {
if (mask & (1 << d)) {
if (size1 && (addr1 & 0x7))
@@ -2989,16 +3007,34 @@ DeadCodeElim::checkSplitLoad(Instruction *ld1)
break;
}
}
// Scale back the size of the first load until it can be loaded. This
// typically happens for TYPE_B96 loads.
while (n1 &&
!prog->getTarget()->isAccessSupported(ld1->getSrc(0)->reg.file,
typeOfSize(size1))) {
size1 -= def1[--n1]->reg.size;
d--;
}
// Compute address/width for second load
for (addr2 = addr1 + size1; ld1->defExists(d); ++d) {
if (mask & (1 << d)) {
assert(!size2 || !(addr2 & 0x7));
def2[n2] = ld1->getDef(d);
size2 += def2[n2++]->reg.size;
} else {
} else if (!n2) {
assert(!n2);
addr2 += ld1->getDef(d)->reg.size;
} else {
break;
}
}
// Make sure that we've processed all the values
for (; ld1->defExists(d); ++d)
assert(!(mask & (1 << d)));
updateLdStOffset(ld1, addr1, func);
ld1->setType(typeOfSize(size1));
for (d = 0; d < 4; ++d)

View File

@@ -454,7 +454,7 @@ TargetNV50::isModSupported(const Instruction *insn, int s, Modifier mod) const
return false;
}
}
if (s >= 3)
if (s >= opInfo[insn->op].srcNr || s >= 3)
return false;
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
}

View File

@@ -439,7 +439,7 @@ TargetNVC0::isModSupported(const Instruction *insn, int s, Modifier mod) const
return false;
}
}
if (s >= 3)
if (s >= opInfo[insn->op].srcNr || s >= 3)
return false;
return (mod & Modifier(opInfo[insn->op].srcMods[s])) == mod;
}

View File

@@ -59,7 +59,7 @@
/* the number of CS dwords for flushing and drawing */
#define R600_MAX_FLUSH_CS_DWORDS 16
#define R600_MAX_DRAW_CS_DWORDS 47
#define R600_MAX_DRAW_CS_DWORDS 52
#define R600_TRACE_CS_DWORDS 7
#define R600_MAX_USER_CONST_BUFFERS 13

View File

@@ -2206,6 +2206,11 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
if (ctx.type == TGSI_PROCESSOR_GEOMETRY) {
struct r600_bytecode_alu alu;
int r;
/* GS thread with no output workaround - emit a cut at start of GS */
if (ctx.bc->chip_class == R600)
r600_bytecode_add_cfinst(ctx.bc, CF_OP_CUT_VERTEX);
for (j = 0; j < 4; j++) {
memset(&alu, 0, sizeof(struct r600_bytecode_alu));
alu.op = ALU_OP1_MOV;

View File

@@ -2213,10 +2213,11 @@ void r600_init_atom_start_cs(struct r600_context *rctx)
num_temp_gprs = 4;
num_gs_gprs = 0;
num_es_gprs = 0;
num_ps_threads = 136;
num_vs_threads = 48;
num_gs_threads = 4;
num_es_threads = 4;
/* use limits 40 VS and at least 16 ES/GS */
num_ps_threads = 120;
num_vs_threads = 40;
num_gs_threads = 16;
num_es_threads = 16;
num_ps_stack_entries = 40;
num_vs_stack_entries = 40;
num_gs_stack_entries = 32;
@@ -2675,6 +2676,9 @@ void r600_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
S_02881C_USE_VTX_VIEWPORT_INDX(rshader->vs_out_viewport);
}
#define RV610_GSVS_ALIGN 32
#define R600_GSVS_ALIGN 16
void r600_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *shader)
{
struct r600_context *rctx = (struct r600_context *)ctx;
@@ -2684,6 +2688,23 @@ void r600_update_gs_state(struct pipe_context *ctx, struct r600_pipe_shader *sha
unsigned gsvs_itemsize =
(cp_shader->ring_item_sizes[0] * shader->selector->gs_max_out_vertices) >> 2;
/* some r600s needs gsvs itemsize aligned to cacheline size
this was fixed in rs780 and above. */
switch (rctx->b.family) {
case CHIP_RV610:
gsvs_itemsize = align(gsvs_itemsize, RV610_GSVS_ALIGN);
break;
case CHIP_R600:
case CHIP_RV630:
case CHIP_RV670:
case CHIP_RV620:
case CHIP_RV635:
gsvs_itemsize = align(gsvs_itemsize, R600_GSVS_ALIGN);
break;
default:
break;
}
r600_init_command_buffer(cb, 64);
/* VGT_GS_MODE is written by r600_emit_shader_stages */

View File

@@ -1770,6 +1770,24 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info
(info.count_from_stream_output ? S_0287F0_USE_OPAQUE(1) : 0);
}
/* SMX returns CONTEXT_DONE too early workaround */
if (rctx->b.family == CHIP_R600 ||
rctx->b.family == CHIP_RV610 ||
rctx->b.family == CHIP_RV630 ||
rctx->b.family == CHIP_RV635) {
/* if we have gs shader or streamout
we need to do a wait idle after every draw */
if (rctx->gs_shader || rctx->b.streamout.streamout_enabled) {
radeon_set_config_reg(cs, R_008040_WAIT_UNTIL, S_008040_WAIT_3D_IDLE(1));
}
}
/* ES ring rolling over at EOP - workaround */
if (rctx->b.chip_class == R600) {
cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE, 0, 0);
cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_SQ_NON_EVENT);
}
if (rctx->screen->b.trace_bo) {
r600_trace_emit(rctx);
}

View File

@@ -130,6 +130,7 @@
#define EVENT_TYPE_SAMPLE_STREAMOUTSTATS 0x20
#define EVENT_TYPE_FLUSH_AND_INV_DB_META 0x2c /* supported on r700+ */
#define EVENT_TYPE_VGT_FLUSH 0x24
#define EVENT_TYPE_SQ_NON_EVENT 0x26
#define EVENT_TYPE_FLUSH_AND_INV_CB_META 46 /* supported on r700+ */
#define EVENT_TYPE(x) ((x) << 0)
#define EVENT_INDEX(x) ((x) << 8)

View File

@@ -556,10 +556,11 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
case CHIP_TONGA: return "tonga";
case CHIP_ICELAND: return "iceland";
case CHIP_CARRIZO: return "carrizo";
case CHIP_FIJI: return "fiji";
#if HAVE_LLVM <= 0x0307
case CHIP_FIJI: return "tonga";
case CHIP_STONEY: return "carrizo";
#else
case CHIP_FIJI: return "fiji";
case CHIP_STONEY: return "stoney";
#endif
default: return "";

View File

@@ -1539,7 +1539,7 @@ void radeon_llvm_context_init(struct radeon_llvm_context * ctx)
bld_base->op_actions[TGSI_OPCODE_ENDIF].emit = endif_emit;
bld_base->op_actions[TGSI_OPCODE_ENDLOOP].emit = endloop_emit;
bld_base->op_actions[TGSI_OPCODE_EX2].emit = build_tgsi_intrinsic_nomem;
bld_base->op_actions[TGSI_OPCODE_EX2].intr_name = "llvm.exp2.f32";
bld_base->op_actions[TGSI_OPCODE_EX2].intr_name = "llvm.AMDIL.exp.";
bld_base->op_actions[TGSI_OPCODE_FLR].emit = build_tgsi_intrinsic_nomem;
bld_base->op_actions[TGSI_OPCODE_FLR].intr_name = "llvm.floor.f32";
bld_base->op_actions[TGSI_OPCODE_FMA].emit = build_tgsi_intrinsic_nomem;

View File

@@ -32,7 +32,8 @@ platform::platform() : adaptor_range(evals(), devs) {
for (pipe_loader_device *ldev : ldevs) {
try {
devs.push_back(create<device>(*this, ldev));
if (ldev)
devs.push_back(create<device>(*this, ldev));
} catch (error &) {
pipe_loader_release(&ldev, 1);
}

View File

@@ -20,7 +20,7 @@ lib@OPENCL_LIBNAME@_la_LIBADD = \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/util/libmesautil.la \
$(ELF_LIB) \
-ldl \
$(DLOPEN_LIBS) \
-lclangCodeGen \
-lclangFrontendTool \
-lclangFrontend \

View File

@@ -477,7 +477,7 @@ _mesa_glsl_msg(const YYLTYPE *locp, _mesa_glsl_parse_state *state,
struct gl_context *ctx = state->ctx;
/* Report the error via GL_ARB_debug_output. */
_mesa_shader_debug(ctx, type, &msg_id, msg, strlen(msg));
_mesa_shader_debug(ctx, type, &msg_id, msg);
ralloc_strcat(&state->info_log, "\n");
}

View File

@@ -63,7 +63,7 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
void
_mesa_shader_debug(struct gl_context *, GLenum, GLuint *,
const char *, int)
const char *)
{
}

View File

@@ -52,7 +52,7 @@ _mesa_clear_shader_program_data(struct gl_shader_program *);
extern "C" void
_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
const char *msg, int len);
const char *msg);
static inline gl_shader_stage
_mesa_shader_enum_to_shader_stage(GLenum v)

View File

@@ -146,7 +146,7 @@
</function>
<!-- ES extension has different suffixes -->
<function name="DebugMessageControlKHR" alias="DebugMessageControl" es1="1.0" es2="2.0">
<function name="DebugMessageControlKHR" alias="DebugMessageControl" es1="1.1" es2="2.0">
<param name="source" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="severity" type="GLenum"/>
@@ -155,7 +155,7 @@
<param name="enabled" type="GLboolean"/>
</function>
<function name="DebugMessageInsertKHR" alias="DebugMessageInsert" es1="1.0" es2="2.0">
<function name="DebugMessageInsertKHR" alias="DebugMessageInsert" es1="1.1" es2="2.0">
<param name="source" type="GLenum"/>
<param name="type" type="GLenum"/>
<param name="id" type="GLuint"/>
@@ -164,12 +164,12 @@
<param name="buf" type="const GLchar *"/>
</function>
<function name="DebugMessageCallbackKHR" alias="DebugMessageCallback" es1="1.0" es2="2.0">
<function name="DebugMessageCallbackKHR" alias="DebugMessageCallback" es1="1.1" es2="2.0">
<param name="callback" type="GLDEBUGPROC"/>
<param name="userParam" type="const GLvoid *"/>
</function>
<function name="GetDebugMessageLogKHR" alias="GetDebugMessageLog" es1="1.0" es2="2.0">
<function name="GetDebugMessageLogKHR" alias="GetDebugMessageLog" es1="1.1" es2="2.0">
<return type="GLuint"/>
<param name="count" type="GLuint"/>
<param name="bufsize" type="GLsizei"/>
@@ -181,23 +181,28 @@
<param name="messageLog" type="GLchar *" output="true"/>
</function>
<function name="PushDebugGroupKHR" alias="PushDebugGroup" es1="1.0" es2="2.0">
<function name="GetPointervKHR" alias="GetPointerv" es1="1.1" es2="2.0">
<param name="pname" type="GLenum"/>
<param name="params" type="GLvoid **" output="true"/>
</function>
<function name="PushDebugGroupKHR" alias="PushDebugGroup" es1="1.1" es2="2.0">
<param name="source" type="GLenum"/>
<param name="id" type="GLuint"/>
<param name="length" type="GLsizei"/>
<param name="message" type="const GLchar *"/>
</function>
<function name="PopDebugGroupKHR" alias="PopDebugGroup" es1="1.0" es2="2.0"/>
<function name="PopDebugGroupKHR" alias="PopDebugGroup" es1="1.1" es2="2.0"/>
<function name="ObjectLabelKHR" alias="ObjectLabel" es1="1.0" es2="2.0">
<function name="ObjectLabelKHR" alias="ObjectLabel" es1="1.1" es2="2.0">
<param name="identifier" type="GLenum"/>
<param name="name" type="GLuint"/>
<param name="length" type="GLsizei"/>
<param name="label" type="const GLchar *"/>
</function>
<function name="GetObjectLabelKHR" alias="GetObjectLabel" es1="1.0" es2="2.0">
<function name="GetObjectLabelKHR" alias="GetObjectLabel" es1="1.1" es2="2.0">
<param name="identifier" type="GLenum"/>
<param name="name" type="GLuint"/>
<param name="bufSize" type="GLsizei"/>
@@ -205,13 +210,13 @@
<param name="label" type="GLchar *"/>
</function>
<function name="ObjectPtrLabelKHR" alias="ObjectPtrLabel" es1="1.0" es2="2.0">
<function name="ObjectPtrLabelKHR" alias="ObjectPtrLabel" es1="1.1" es2="2.0">
<param name="ptr" type="const GLvoid *"/>
<param name="length" type="GLsizei"/>
<param name="label" type="const GLchar *"/>
</function>
<function name="GetObjectPtrLabelKHR" alias="GetObjectPtrLabel" es1="1.0" es2="2.0">
<function name="GetObjectPtrLabelKHR" alias="GetObjectPtrLabel" es1="1.1" es2="2.0">
<param name="ptr" type="const GLvoid *"/>
<param name="bufSize" type="GLsizei"/>
<param name="length" type="GLsizei *"/>

View File

@@ -51,7 +51,8 @@ libi965_compiler_la_SOURCES = $(i965_compiler_FILES)
TEST_LIBS = \
libi965_compiler.la \
../../../libmesa.la \
-lpthread -ldl \
$(PTHREAD_LIBS) \
$(DLOPEN_LIBS) \
../common/libdri_test_stubs.la
TESTS = \

View File

@@ -694,7 +694,7 @@ brw_inst_bits(const brw_inst *inst, unsigned high, unsigned low)
high %= 64;
low %= 64;
const uint64_t mask = (1ull << (high - low + 1)) - 1;
const uint64_t mask = (~0ull >> (64 - (high - low + 1)));
return (inst->data[word] >> low) & mask;
}
@@ -713,7 +713,7 @@ brw_inst_set_bits(brw_inst *inst, unsigned high, unsigned low, uint64_t value)
high %= 64;
low %= 64;
const uint64_t mask = ((1ull << (high - low + 1)) - 1) << low;
const uint64_t mask = (~0ull >> (64 - (high - low + 1))) << low;
/* Make sure the supplied value actually fits in the given bitfield. */
assert((value & (mask >> low)) == value);

View File

@@ -1060,7 +1060,7 @@ brw_upload_wm_abo_surfaces(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
/* _NEW_PROGRAM */
struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram;
struct gl_shader_program *prog = ctx->_Shader->_CurrentFragmentProgram;
if (prog) {
/* BRW_NEW_FS_PROG_DATA */
@@ -1336,7 +1336,7 @@ brw_upload_wm_image_surfaces(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
/* BRW_NEW_FRAGMENT_PROGRAM */
struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram;
struct gl_shader_program *prog = ctx->_Shader->_CurrentFragmentProgram;
if (prog) {
/* BRW_NEW_FS_PROG_DATA, BRW_NEW_IMAGE_UNITS, _NEW_TEXTURE */

View File

@@ -654,6 +654,9 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
/* GL_EXT_provoking_vertex */
consts->QuadsFollowProvokingVertexConvention = GL_TRUE;
/** GL_ARB_viewport_array */
consts->LayerAndVPIndexProvokingVertex = GL_UNDEFINED_VERTEX;
/* GL_EXT_transform_feedback */
consts->MaxTransformFeedbackBuffers = MAX_FEEDBACK_BUFFERS;
consts->MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS;

View File

@@ -76,6 +76,8 @@ struct gl_debug_message
enum mesa_debug_type type;
GLuint id;
enum mesa_debug_severity severity;
/* length as given by the user - if message was explicitly null terminated,
* length can be negative */
GLsizei length;
GLcharARB *message;
};
@@ -98,7 +100,7 @@ struct gl_debug_state
struct gl_debug_group *Groups[MAX_DEBUG_GROUP_STACK_DEPTH];
struct gl_debug_message GroupMessages[MAX_DEBUG_GROUP_STACK_DEPTH];
GLint GroupStackDepth;
GLint CurrentGroup; // GroupStackDepth - 1
struct gl_debug_log Log;
};
@@ -211,14 +213,19 @@ debug_message_store(struct gl_debug_message *msg,
enum mesa_debug_severity severity,
GLsizei len, const char *buf)
{
GLsizei length = len;
assert(!msg->message && !msg->length);
msg->message = malloc(len+1);
if (msg->message) {
(void) strncpy(msg->message, buf, (size_t)len);
msg->message[len] = '\0';
if (length < 0)
length = strlen(buf);
msg->length = len+1;
msg->message = malloc(length+1);
if (msg->message) {
(void) strncpy(msg->message, buf, (size_t)length);
msg->message[length] = '\0';
msg->length = len;
msg->source = source;
msg->type = type;
msg->id = id;
@@ -229,7 +236,7 @@ debug_message_store(struct gl_debug_message *msg,
/* malloc failed! */
msg->message = out_of_memory;
msg->length = strlen(out_of_memory)+1;
msg->length = -1;
msg->source = MESA_DEBUG_SOURCE_OTHER;
msg->type = MESA_DEBUG_TYPE_ERROR;
msg->id = oom_msg_id;
@@ -243,8 +250,9 @@ debug_namespace_init(struct gl_debug_namespace *ns)
make_empty_list(&ns->Elements);
/* Enable all the messages with severity HIGH or MEDIUM by default */
ns->DefaultState = (1 << MESA_DEBUG_SEVERITY_HIGH) |
(1 << MESA_DEBUG_SEVERITY_MEDIUM);
ns->DefaultState = (1 << MESA_DEBUG_SEVERITY_MEDIUM ) |
(1 << MESA_DEBUG_SEVERITY_HIGH) |
(1 << MESA_DEBUG_SEVERITY_NOTIFICATION);
}
static void
@@ -422,7 +430,7 @@ debug_create(void)
static bool
debug_is_group_read_only(const struct gl_debug_state *debug)
{
const GLint gstack = debug->GroupStackDepth;
const GLint gstack = debug->CurrentGroup;
return (gstack > 0 && debug->Groups[gstack] == debug->Groups[gstack - 1]);
}
@@ -432,7 +440,7 @@ debug_is_group_read_only(const struct gl_debug_state *debug)
static bool
debug_make_group_writable(struct gl_debug_state *debug)
{
const GLint gstack = debug->GroupStackDepth;
const GLint gstack = debug->CurrentGroup;
const struct gl_debug_group *src = debug->Groups[gstack];
struct gl_debug_group *dst;
int s, t;
@@ -472,7 +480,7 @@ debug_make_group_writable(struct gl_debug_state *debug)
static void
debug_clear_group(struct gl_debug_state *debug)
{
const GLint gstack = debug->GroupStackDepth;
const GLint gstack = debug->CurrentGroup;
if (!debug_is_group_read_only(debug)) {
struct gl_debug_group *grp = debug->Groups[gstack];
@@ -496,9 +504,9 @@ debug_clear_group(struct gl_debug_state *debug)
static void
debug_destroy(struct gl_debug_state *debug)
{
while (debug->GroupStackDepth > 0) {
while (debug->CurrentGroup > 0) {
debug_clear_group(debug);
debug->GroupStackDepth--;
debug->CurrentGroup--;
}
debug_clear_group(debug);
@@ -514,7 +522,7 @@ debug_set_message_enable(struct gl_debug_state *debug,
enum mesa_debug_type type,
GLuint id, GLboolean enabled)
{
const GLint gstack = debug->GroupStackDepth;
const GLint gstack = debug->CurrentGroup;
struct gl_debug_namespace *ns;
debug_make_group_writable(debug);
@@ -541,7 +549,7 @@ debug_set_message_enable_all(struct gl_debug_state *debug,
enum mesa_debug_severity severity,
GLboolean enabled)
{
const GLint gstack = debug->GroupStackDepth;
const GLint gstack = debug->CurrentGroup;
int s, t, smax, tmax;
if (source == MESA_DEBUG_SOURCE_COUNT) {
@@ -579,7 +587,7 @@ debug_is_message_enabled(const struct gl_debug_state *debug,
GLuint id,
enum mesa_debug_severity severity)
{
const GLint gstack = debug->GroupStackDepth;
const GLint gstack = debug->CurrentGroup;
struct gl_debug_group *grp = debug->Groups[gstack];
struct gl_debug_namespace *nspace = &grp->Namespaces[source][type];
@@ -606,7 +614,7 @@ debug_log_message(struct gl_debug_state *debug,
GLint nextEmpty;
struct gl_debug_message *emptySlot;
assert(len >= 0 && len < MAX_DEBUG_MESSAGE_LENGTH);
assert(len < MAX_DEBUG_MESSAGE_LENGTH);
if (log->NumMessages == MAX_DEBUG_LOGGED_MESSAGES)
return;
@@ -657,24 +665,24 @@ debug_delete_messages(struct gl_debug_state *debug, int count)
static struct gl_debug_message *
debug_get_group_message(struct gl_debug_state *debug)
{
return &debug->GroupMessages[debug->GroupStackDepth];
return &debug->GroupMessages[debug->CurrentGroup];
}
static void
debug_push_group(struct gl_debug_state *debug)
{
const GLint gstack = debug->GroupStackDepth;
const GLint gstack = debug->CurrentGroup;
/* just point to the previous stack */
debug->Groups[gstack + 1] = debug->Groups[gstack];
debug->GroupStackDepth++;
debug->CurrentGroup++;
}
static void
debug_pop_group(struct gl_debug_state *debug)
{
debug_clear_group(debug);
debug->GroupStackDepth--;
debug->CurrentGroup--;
}
@@ -775,7 +783,7 @@ _mesa_get_debug_state_int(struct gl_context *ctx, GLenum pname)
debug->Log.Messages[debug->Log.NextMessage].length : 0;
break;
case GL_DEBUG_GROUP_STACK_DEPTH:
val = debug->GroupStackDepth;
val = debug->CurrentGroup + 1;
break;
default:
assert(!"unknown debug output param");
@@ -921,9 +929,9 @@ validate_params(struct gl_context *ctx, unsigned caller,
case GL_DEBUG_TYPE_PORTABILITY_ARB:
case GL_DEBUG_TYPE_OTHER_ARB:
case GL_DEBUG_TYPE_MARKER:
break;
case GL_DEBUG_TYPE_PUSH_GROUP:
case GL_DEBUG_TYPE_POP_GROUP:
break;
case GL_DONT_CARE:
if (caller == CONTROL)
break;
@@ -959,8 +967,22 @@ error:
static GLboolean
validate_length(struct gl_context *ctx, const char *callerstr, GLsizei length)
validate_length(struct gl_context *ctx, const char *callerstr, GLsizei length,
const GLchar *buf)
{
if (length < 0) {
GLsizei len = strlen(buf);
if (len >= MAX_DEBUG_MESSAGE_LENGTH) {
_mesa_error(ctx, GL_INVALID_VALUE,
"%s(null terminated string length=%d, is not less than "
"GL_MAX_DEBUG_MESSAGE_LENGTH=%d)", callerstr, len,
MAX_DEBUG_MESSAGE_LENGTH);
return GL_FALSE;
}
}
if (length >= MAX_DEBUG_MESSAGE_LENGTH) {
_mesa_error(ctx, GL_INVALID_VALUE,
"%s(length=%d, which is not less than "
@@ -989,9 +1011,7 @@ _mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,
if (!validate_params(ctx, INSERT, callerstr, source, type, severity))
return; /* GL_INVALID_ENUM */
if (length < 0)
length = strlen(buf);
if (!validate_length(ctx, callerstr, length))
if (!validate_length(ctx, callerstr, length, buf))
return; /* GL_INVALID_VALUE */
log_msg(ctx, gl_enum_to_debug_source(source),
@@ -1032,23 +1052,28 @@ _mesa_GetDebugMessageLog(GLuint count, GLsizei logSize, GLenum *sources,
for (ret = 0; ret < count; ret++) {
const struct gl_debug_message *msg = debug_fetch_message(debug);
GLsizei len;
if (!msg)
break;
if (logSize < msg->length && messageLog != NULL)
len = msg->length;
if (len < 0)
len = strlen(msg->message);
if (logSize < len+1 && messageLog != NULL)
break;
if (messageLog) {
assert(msg->message[msg->length-1] == '\0');
(void) strncpy(messageLog, msg->message, (size_t)msg->length);
assert(msg->message[len] == '\0');
(void) strncpy(messageLog, msg->message, (size_t)len+1);
messageLog += msg->length;
logSize -= msg->length;
messageLog += len+1;
logSize -= len+1;
}
if (lengths)
*lengths++ = msg->length;
*lengths++ = len+1;
if (severities)
*severities++ = debug_severity_enums[msg->severity];
if (sources)
@@ -1158,16 +1183,14 @@ _mesa_PushDebugGroup(GLenum source, GLuint id, GLsizei length,
return;
}
if (length < 0)
length = strlen(message);
if (!validate_length(ctx, callerstr, length))
if (!validate_length(ctx, callerstr, length, message))
return; /* GL_INVALID_VALUE */
debug = _mesa_lock_debug_state(ctx);
if (!debug)
return;
if (debug->GroupStackDepth >= MAX_DEBUG_GROUP_STACK_DEPTH-1) {
if (debug->CurrentGroup >= MAX_DEBUG_GROUP_STACK_DEPTH-1) {
_mesa_unlock_debug_state(ctx);
_mesa_error(ctx, GL_STACK_OVERFLOW, "%s", callerstr);
return;
@@ -1209,7 +1232,7 @@ _mesa_PopDebugGroup(void)
if (!debug)
return;
if (debug->GroupStackDepth <= 0) {
if (debug->CurrentGroup <= 0) {
_mesa_unlock_debug_state(ctx);
_mesa_error(ctx, GL_STACK_UNDERFLOW, "%s", callerstr);
return;
@@ -1599,20 +1622,19 @@ _mesa_log(const char *fmtString, ...)
* \param ctx GL context.
* \param type The namespace to which this message belongs.
* \param id The message ID within the given namespace.
* \param msg The message to output. Need not be null-terminated.
* \param len The length of 'msg'. If negative, 'msg' must be null-terminated.
* \param msg The message to output. Must be null-terminated.
*/
void
_mesa_shader_debug( struct gl_context *ctx, GLenum type, GLuint *id,
const char *msg, int len )
_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
const char *msg)
{
enum mesa_debug_source source = MESA_DEBUG_SOURCE_SHADER_COMPILER;
enum mesa_debug_severity severity = MESA_DEBUG_SEVERITY_HIGH;
int len;
debug_get_id(id);
if (len < 0)
len = strlen(msg);
len = strlen(msg);
/* Truncate the message if necessary. */
if (len >= MAX_DEBUG_MESSAGE_LENGTH)

View File

@@ -115,7 +115,7 @@ _mesa_get_debug_state_ptr(struct gl_context *ctx, GLenum pname);
extern void
_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
const char *msg, int len);
const char *msg);
void GLAPIENTRY
_mesa_DebugMessageInsert(GLenum source, GLenum type, GLuint id,

View File

@@ -258,7 +258,7 @@ EXT(INGR_blend_func_separate , EXT_blend_func_separate
EXT(INTEL_performance_query , INTEL_performance_query , GLL, GLC, x , ES2, 2013)
EXT(KHR_context_flush_control , dummy_true , GLL, GLC, x , ES2, 2014)
EXT(KHR_debug , dummy_true , GLL, GLC, ES1, ES2, 2012)
EXT(KHR_debug , dummy_true , GLL, GLC, 11, ES2, 2012)
EXT(KHR_texture_compression_astc_hdr , KHR_texture_compression_astc_hdr , GLL, GLC, x , ES2, 2012)
EXT(KHR_texture_compression_astc_ldr , KHR_texture_compression_astc_ldr , GLL, GLC, x , ES2, 2012)

View File

@@ -851,8 +851,8 @@ descriptor=[
[ "MAX_VIEWPORTS", "CONTEXT_INT(Const.MaxViewports), extra_ARB_viewport_array" ],
[ "VIEWPORT_SUBPIXEL_BITS", "CONTEXT_INT(Const.ViewportSubpixelBits), extra_ARB_viewport_array" ],
[ "VIEWPORT_BOUNDS_RANGE", "CONTEXT_FLOAT2(Const.ViewportBounds), extra_ARB_viewport_array" ],
[ "LAYER_PROVOKING_VERTEX", "CONTEXT_ENUM(Light.ProvokingVertex), extra_ARB_viewport_array" ],
[ "VIEWPORT_INDEX_PROVOKING_VERTEX", "CONTEXT_ENUM(Light.ProvokingVertex), extra_ARB_viewport_array" ],
[ "LAYER_PROVOKING_VERTEX", "CONTEXT_ENUM(Const.LayerAndVPIndexProvokingVertex), extra_ARB_viewport_array" ],
[ "VIEWPORT_INDEX_PROVOKING_VERTEX", "CONTEXT_ENUM(Const.LayerAndVPIndexProvokingVertex), extra_ARB_viewport_array" ],
# GL_ARB_gpu_shader5
[ "MAX_GEOMETRY_SHADER_INVOCATIONS", "CONST(MAX_GEOMETRY_SHADER_INVOCATIONS), extra_ARB_gpu_shader5" ],

View File

@@ -3449,6 +3449,9 @@ struct gl_constants
/** GL_EXT_provoking_vertex */
GLboolean QuadsFollowProvokingVertexConvention;
/** GL_ARB_viewport_array */
GLenum LayerAndVPIndexProvokingVertex;
/** OpenGL version 3.0 */
GLbitfield ContextFlags; /**< Ex: GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */

View File

@@ -1937,7 +1937,8 @@ const struct function gles11_functions_possible[] = {
{ "glGetLightxv", 11, -1 },
{ "glGetMaterialfv", 11, _gloffset_GetMaterialfv },
{ "glGetMaterialxv", 11, -1 },
{ "glGetPointerv", 11, _gloffset_GetPointerv },
// We check for the aliased -KHR version in GLES 1.1
// { "glGetPointerv", 11, _gloffset_GetPointerv },
{ "glGetRenderbufferParameterivOES", 11, -1 },
{ "glGetString", 11, _gloffset_GetString },
{ "glGetTexEnvfv", 11, _gloffset_GetTexEnvfv },
@@ -2049,6 +2050,7 @@ const struct function gles11_functions_possible[] = {
{ "glGetDebugMessageLogKHR", 11, -1 },
{ "glGetObjectLabelKHR", 11, -1 },
{ "glGetObjectPtrLabelKHR", 11, -1 },
{ "glGetPointervKHR", 11, _gloffset_GetPointerv },
{ "glObjectLabelKHR", 11, -1 },
{ "glObjectPtrLabelKHR", 11, -1 },
@@ -2284,6 +2286,7 @@ const struct function gles2_functions_possible[] = {
{ "glGetDebugMessageLogKHR", 20, -1 },
{ "glGetObjectLabelKHR", 20, -1 },
{ "glGetObjectPtrLabelKHR", 20, -1 },
{ "glGetPointervKHR", 20, -1 },
{ "glObjectLabelKHR", 20, -1 },
{ "glObjectPtrLabelKHR", 20, -1 },

View File

@@ -199,6 +199,7 @@ _mesa_override_gl_version(struct gl_context *ctx)
* <version number><space><vendor-specific information>"
*/
create_version_string(ctx, _mesa_is_gles(ctx) ? "OpenGL ES " : "");
ctx->Extensions.Version = ctx->Version;
}
}