Compare commits
47 Commits
mesa-10.0.
...
mesa-10.0.
Author | SHA1 | Date | |
---|---|---|---|
|
2cfd35186e | ||
|
7494e2e50c | ||
|
c29c9947a3 | ||
|
518526700e | ||
|
2f9e7f6394 | ||
|
9cdb86a1da | ||
|
4588a32dee | ||
|
aba40445c2 | ||
|
6a81f2bc9b | ||
|
a02c50ef4e | ||
|
af1831d003 | ||
|
59ab5bf0a0 | ||
|
85e04ad280 | ||
|
6b2cf05192 | ||
|
3fc389efeb | ||
|
bab122c320 | ||
|
cf7daac483 | ||
|
de6068a218 | ||
|
c074e34745 | ||
|
00d1daf2a8 | ||
|
09a346a1c1 | ||
|
5202312160 | ||
|
d6e83e9a7a | ||
|
ad54c842fa | ||
|
a4719eff1a | ||
|
5f35078700 | ||
|
aa1f7b4237 | ||
|
d141825eff | ||
|
d13adcae22 | ||
|
e91dd3661c | ||
|
490b810d0e | ||
|
d37086c6fc | ||
|
cfd8aed240 | ||
|
1b6aec4b5a | ||
|
6d6bdd88e7 | ||
|
2a19186953 | ||
|
dc0053b33f | ||
|
e70e368af5 | ||
|
e10b0e0f50 | ||
|
b74da80b71 | ||
|
89c6473ff0 | ||
|
a4a8af4cbb | ||
|
c1bcdcde1c | ||
|
d18b182134 | ||
|
5297fdc0c8 | ||
|
edf066f385 | ||
|
593484a1c4 |
@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*mesa-stable\)' HEAD..origin/master |\
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate.*10\.0\|CC:.*10\.0.*mesa-stable\)' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
@@ -31,6 +31,9 @@ because compatibility contexts not supported.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
5f9f463ef08129f6762106b434910adb MesaLib-10.0.3.tar.bz2
|
||||
fb3997b6500e153bc32370cb3fc4ca9e MesaLib-10.0.3.tar.gz
|
||||
a07b4b6b9eb449b88a6cb5061e51c331 MesaLib-10.0.3.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
188
docs/relnotes/10.0.4.html
Normal file
188
docs/relnotes/10.0.4.html
Normal file
@@ -0,0 +1,188 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.0.4 Release Notes / (March 12, 2014)</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.0.4 is a bug fix release which fixes bugs found since the 10.0.3 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.0.4 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71870">Bug 71870</a> - Metro: Last Light rendering issues</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72895">Bug 72895</a> - Missing trees in flightgear 2.12.1 with mesa 10.0.1</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74251">Bug 74251</a> - Segfault in st_finalize_texture with Texture Buffer</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74723">Bug 74723</a> - main/shaderapi.c:407: detach_shader: Assertion `shProg->Shaders[j]->Type == 0x8B31 || shProg->Shaders[j]->Type == 0x8B30' failed.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>The full set of changes can be viewed by using the following git command:</p>
|
||||
|
||||
<pre>
|
||||
git log mesa-10.0.3..mesa-10.0.4
|
||||
</pre>
|
||||
|
||||
<p>Anuj Phogat (4):</p>
|
||||
<ul>
|
||||
<li>mesa: Generate correct error code in glDrawBuffers()</li>
|
||||
<li>mesa: Add GL_TEXTURE_CUBE_MAP_ARRAY to legal_get_tex_level_parameter_target()</li>
|
||||
<li>glsl: Fix condition to generate shader link error</li>
|
||||
<li>i965: Fix the region's pitch condition to use blitter</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (8):</p>
|
||||
<ul>
|
||||
<li>r200: move driContextSetFlags(ctx) call after ctx var is initialized</li>
|
||||
<li>radeon: move driContextSetFlags(ctx) call after ctx var is initialized</li>
|
||||
<li>gallium/auxiliary/indices: replace free() with FREE()</li>
|
||||
<li>draw: fix incorrect color of flat-shaded clipped lines</li>
|
||||
<li>st/mesa: avoid sw fallback for getting/decompressing textures</li>
|
||||
<li>mesa: update assertion in detach_shader() for geom shaders</li>
|
||||
<li>mesa: do depth/stencil format conversion in glGetTexImage</li>
|
||||
<li>softpipe: use 64-bit arithmetic in softpipe_resource_layout()</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (4):</p>
|
||||
<ul>
|
||||
<li>docs: Add md5sums for 10.0.3 release</li>
|
||||
<li>main: Avoid double-free of shader Label</li>
|
||||
<li>get-pick-list: Update to only find patches nominated for the 10.0 branch</li>
|
||||
<li>Update version to 10.0.4</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>i965: Validate (and resolve) all the bound textures.</li>
|
||||
</ul>
|
||||
|
||||
<p>Christian König (1):</p>
|
||||
<ul>
|
||||
<li>radeon/uvd: fix feedback buffer handling v2</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Kurtz (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Add locking to builtin_builder singleton</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>dri/nouveau: Pass the API into _mesa_initialize_context</li>
|
||||
<li>nv50: correctly calculate the number of vertical blocks during transfer map</li>
|
||||
<li>dri/i9*5: correctly calculate the amount of system memory</li>
|
||||
</ul>
|
||||
|
||||
<p>Fredrik Höglund (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Preserve the NewArrays state when copying a VAO</li>
|
||||
<li>glx: Fix the default values for GLXFBConfig attributes</li>
|
||||
<li>glx: Fix the GLXFBConfig attrib sort priorities</li>
|
||||
</ul>
|
||||
|
||||
<p>Hans (2):</p>
|
||||
<ul>
|
||||
<li>util: don't define isfinite(), isnan() for MSVC >= 1800</li>
|
||||
<li>mesa: don't define c99 math functions for MSVC >= 1800</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (6):</p>
|
||||
<ul>
|
||||
<li>meta: Release resources used by decompress_texture_image</li>
|
||||
<li>meta: Release resources used by _mesa_meta_DrawPixels</li>
|
||||
<li>meta: Fallback to software for GetTexImage of compressed GL_TEXTURE_CUBE_MAP_ARRAY</li>
|
||||
<li>meta: Consistenly use non-Apple VAO functions</li>
|
||||
<li>glcpp: Only warn for macro names containing __</li>
|
||||
<li>glsl: Only warn for macro names containing __</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (3):</p>
|
||||
<ul>
|
||||
<li>nv30: report 8 maximum inputs</li>
|
||||
<li>nouveau/video: make sure that firmware is present when checking caps</li>
|
||||
<li>nouveau: fix chipset checks for nv1a by using the oclass instead</li>
|
||||
</ul>
|
||||
|
||||
<p>Julien Cristau (1):</p>
|
||||
<ul>
|
||||
<li>glx/dri2: fix build failure on HURD</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>glsl: Don't lose precision qualifiers when encountering "centroid".</li>
|
||||
<li>i965: Create a hardware context before initializing state module.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kusanagi Kouichi (1):</p>
|
||||
<ul>
|
||||
<li>targets/vdpau: Always use c++ to link</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (1):</p>
|
||||
<ul>
|
||||
<li>st/mesa: fix crash when a shader uses a TBO and it's not bound</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (1):</p>
|
||||
<ul>
|
||||
<li>glsl: Initialize ubo_binding_mask flags to zero.</li>
|
||||
</ul>
|
||||
|
||||
<p>Paul Berry (2):</p>
|
||||
<ul>
|
||||
<li>glsl: Make condition_to_hir() callable from outside ast_iteration_statement.</li>
|
||||
<li>glsl: Fix continue statements in do-while loops.</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (1):</p>
|
||||
<ul>
|
||||
<li>r600g/compute: PIPE_CAP_COMPUTE should be false for pre-evergreen GPUs</li>
|
||||
</ul>
|
||||
|
||||
<p>Topi Pohjolainen (1):</p>
|
||||
<ul>
|
||||
<li>i965/blorp: do not use unnecessary hw-blending support</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -588,7 +588,12 @@ do_clip_line( struct draw_stage *stage,
|
||||
|
||||
if (v0->clipmask) {
|
||||
interp( clipper, stage->tmp[0], t0, v0, v1, viewport_index );
|
||||
copy_flat(stage, stage->tmp[0], v0);
|
||||
if (stage->draw->rasterizer->flatshade_first) {
|
||||
copy_flat(stage, stage->tmp[0], v0); /* copy v0 color to tmp[0] */
|
||||
}
|
||||
else {
|
||||
copy_flat(stage, stage->tmp[0], v1); /* copy v1 color to tmp[0] */
|
||||
}
|
||||
newprim.v[0] = stage->tmp[0];
|
||||
}
|
||||
else {
|
||||
@@ -597,6 +602,12 @@ do_clip_line( struct draw_stage *stage,
|
||||
|
||||
if (v1->clipmask) {
|
||||
interp( clipper, stage->tmp[1], t1, v1, v0, viewport_index );
|
||||
if (stage->draw->rasterizer->flatshade_first) {
|
||||
copy_flat(stage, stage->tmp[1], v0); /* copy v0 color to tmp[1] */
|
||||
}
|
||||
else {
|
||||
copy_flat(stage, stage->tmp[1], v1); /* copy v1 color to tmp[1] */
|
||||
}
|
||||
newprim.v[1] = stage->tmp[1];
|
||||
}
|
||||
else {
|
||||
|
@@ -74,7 +74,7 @@ void
|
||||
util_primconvert_destroy(struct primconvert_context *pc)
|
||||
{
|
||||
util_primconvert_save_index_buffer(pc, NULL);
|
||||
free(pc);
|
||||
FREE(pc);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -112,10 +112,13 @@ static INLINE float logf( float f )
|
||||
#define logf(x) ((float)log((double)(x)))
|
||||
#endif /* logf */
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
#define isfinite(x) _finite((double)(x))
|
||||
#define isnan(x) _isnan((double)(x))
|
||||
#endif /* _MSC_VER < 1800 */
|
||||
#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
static INLINE double log2( double x )
|
||||
{
|
||||
const double invln2 = 1.442695041;
|
||||
@@ -133,6 +136,7 @@ roundf(float x)
|
||||
{
|
||||
return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define INFINITY (DBL_MAX + DBL_MAX)
|
||||
#define NAN (INFINITY - INFINITY)
|
||||
|
@@ -49,6 +49,11 @@ struct nouveau_screen {
|
||||
|
||||
boolean hint_buf_keep_sysmem_copy;
|
||||
|
||||
struct {
|
||||
unsigned profiles_checked;
|
||||
unsigned profiles_present;
|
||||
} firmware_info;
|
||||
|
||||
#ifdef NOUVEAU_ENABLE_DRIVER_STATISTICS
|
||||
union {
|
||||
uint64_t v[29];
|
||||
|
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -350,6 +351,77 @@ nouveau_vp3_load_firmware(struct nouveau_vp3_decoder *dec,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
firmware_present(struct pipe_screen *pscreen, enum pipe_video_profile profile)
|
||||
{
|
||||
struct nouveau_screen *screen = nouveau_screen(pscreen);
|
||||
int chipset = screen->device->chipset;
|
||||
int vp3 = chipset < 0xa3 || chipset == 0xaa || chipset == 0xac;
|
||||
int vp5 = chipset >= 0xd0;
|
||||
int ret;
|
||||
|
||||
/* For all chipsets, try to create a BSP objects. Assume that if firmware
|
||||
* is present for it, firmware is also present for VP/PPP */
|
||||
if (!(screen->firmware_info.profiles_checked & 1)) {
|
||||
struct nouveau_object *channel = NULL, *bsp = NULL;
|
||||
struct nv04_fifo nv04_data = {.vram = 0xbeef0201, .gart = 0xbeef0202};
|
||||
struct nvc0_fifo nvc0_args = {};
|
||||
struct nve0_fifo nve0_args = {.engine = NVE0_FIFO_ENGINE_BSP};
|
||||
void *data = NULL;
|
||||
int size, oclass;
|
||||
if (chipset < 0xc0)
|
||||
oclass = 0x85b1;
|
||||
else if (vp5)
|
||||
oclass = 0x95b1;
|
||||
else
|
||||
oclass = 0x90b1;
|
||||
|
||||
if (chipset < 0xc0) {
|
||||
data = &nv04_data;
|
||||
size = sizeof(nv04_data);
|
||||
} else if (chipset < 0xe0) {
|
||||
data = &nvc0_args;
|
||||
size = sizeof(nvc0_args);
|
||||
} else {
|
||||
data = &nve0_args;
|
||||
size = sizeof(nve0_args);
|
||||
}
|
||||
|
||||
/* kepler must have its own channel, so just do this for everyone */
|
||||
nouveau_object_new(&screen->device->object, 0,
|
||||
NOUVEAU_FIFO_CHANNEL_CLASS,
|
||||
data, size, &channel);
|
||||
|
||||
if (channel) {
|
||||
nouveau_object_new(channel, 0, oclass, NULL, 0, &bsp);
|
||||
if (bsp)
|
||||
screen->firmware_info.profiles_present |= 1;
|
||||
nouveau_object_del(&bsp);
|
||||
nouveau_object_del(&channel);
|
||||
}
|
||||
screen->firmware_info.profiles_checked |= 1;
|
||||
}
|
||||
|
||||
if (!(screen->firmware_info.profiles_present & 1))
|
||||
return 0;
|
||||
|
||||
/* For vp3/vp4 chipsets, make sure that the relevant firmware is present */
|
||||
if (!vp5 && !(screen->firmware_info.profiles_checked & (1 << profile))) {
|
||||
char path[PATH_MAX];
|
||||
struct stat s;
|
||||
if (vp3)
|
||||
vp3_getpath(profile, path);
|
||||
else
|
||||
vp4_getpath(profile, path);
|
||||
ret = stat(path, &s);
|
||||
if (!ret && s.st_size > 1000)
|
||||
screen->firmware_info.profiles_present |= (1 << profile);
|
||||
screen->firmware_info.profiles_checked |= (1 << profile);
|
||||
}
|
||||
|
||||
return vp5 || (screen->firmware_info.profiles_present & (1 << profile));
|
||||
}
|
||||
|
||||
int
|
||||
nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
|
||||
enum pipe_video_profile profile,
|
||||
@@ -363,8 +435,10 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
|
||||
switch (param) {
|
||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||
/* VP3 does not support MPEG4, VP4+ do. */
|
||||
return profile >= PIPE_VIDEO_PROFILE_MPEG1 && (
|
||||
!vp3 || codec != PIPE_VIDEO_FORMAT_MPEG4);
|
||||
return entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM &&
|
||||
profile >= PIPE_VIDEO_PROFILE_MPEG1 &&
|
||||
(!vp3 || codec != PIPE_VIDEO_FORMAT_MPEG4) &&
|
||||
firmware_present(pscreen, profile);
|
||||
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
||||
return 1;
|
||||
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
||||
|
@@ -218,7 +218,7 @@ nv30_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
||||
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
|
||||
return 0;
|
||||
case PIPE_SHADER_CAP_MAX_INPUTS:
|
||||
return (eng3d->oclass >= NV40_3D_CLASS) ? 12 : 10;
|
||||
return 8; /* should be possible to do 10 with nv4x */
|
||||
case PIPE_SHADER_CAP_MAX_CONSTS:
|
||||
return (eng3d->oclass >= NV40_3D_CLASS) ? 224 : 32;
|
||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
|
||||
|
@@ -278,7 +278,7 @@ nv50_miptree_transfer_map(struct pipe_context *pctx,
|
||||
|
||||
if (util_format_is_plain(res->format)) {
|
||||
tx->nblocksx = box->width << mt->ms_x;
|
||||
tx->nblocksy = box->height << mt->ms_x;
|
||||
tx->nblocksy = box->height << mt->ms_y;
|
||||
} else {
|
||||
tx->nblocksx = util_format_get_nblocksx(res->format, box->width);
|
||||
tx->nblocksy = util_format_get_nblocksy(res->format, box->height);
|
||||
|
@@ -741,16 +741,80 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define FIRMWARE_BSP_KERN 0x01
|
||||
#define FIRMWARE_VP_KERN 0x02
|
||||
#define FIRMWARE_BSP_H264 0x04
|
||||
#define FIRMWARE_VP_MPEG2 0x08
|
||||
#define FIRMWARE_VP_H264_1 0x10
|
||||
#define FIRMWARE_VP_H264_2 0x20
|
||||
#define FIRMWARE_PRESENT(val, fw) (val & FIRMWARE_ ## fw)
|
||||
|
||||
static int
|
||||
firmware_present(struct pipe_screen *pscreen, enum pipe_video_format codec)
|
||||
{
|
||||
struct nouveau_screen *screen = nouveau_screen(pscreen);
|
||||
struct nouveau_object *obj = NULL;
|
||||
struct stat s;
|
||||
int checked = screen->firmware_info.profiles_checked;
|
||||
int present, ret;
|
||||
|
||||
if (!FIRMWARE_PRESENT(checked, VP_KERN)) {
|
||||
nouveau_object_new(screen->channel, 0, 0x7476, NULL, 0, &obj);
|
||||
if (obj)
|
||||
screen->firmware_info.profiles_present |= FIRMWARE_VP_KERN;
|
||||
nouveau_object_del(&obj);
|
||||
screen->firmware_info.profiles_checked |= FIRMWARE_VP_KERN;
|
||||
}
|
||||
|
||||
if (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC) {
|
||||
if (!FIRMWARE_PRESENT(checked, BSP_KERN)) {
|
||||
nouveau_object_new(screen->channel, 0, 0x74b0, NULL, 0, &obj);
|
||||
if (obj)
|
||||
screen->firmware_info.profiles_present |= FIRMWARE_BSP_KERN;
|
||||
nouveau_object_del(&obj);
|
||||
screen->firmware_info.profiles_checked |= FIRMWARE_BSP_KERN;
|
||||
}
|
||||
|
||||
if (!FIRMWARE_PRESENT(checked, VP_H264_1)) {
|
||||
ret = stat("/lib/firmware/nouveau/nv84_vp-h264-1", &s);
|
||||
if (!ret && s.st_size > 1000)
|
||||
screen->firmware_info.profiles_present |= FIRMWARE_VP_H264_1;
|
||||
screen->firmware_info.profiles_checked |= FIRMWARE_VP_H264_1;
|
||||
}
|
||||
|
||||
/* should probably check the others, but assume that 1 means all */
|
||||
|
||||
present = screen->firmware_info.profiles_present;
|
||||
return FIRMWARE_PRESENT(present, VP_KERN) &&
|
||||
FIRMWARE_PRESENT(present, BSP_KERN) &&
|
||||
FIRMWARE_PRESENT(present, VP_H264_1);
|
||||
} else {
|
||||
if (!FIRMWARE_PRESENT(checked, VP_MPEG2)) {
|
||||
ret = stat("/lib/firmware/nouveau/nv84_vp-mpeg12", &s);
|
||||
if (!ret && s.st_size > 1000)
|
||||
screen->firmware_info.profiles_present |= FIRMWARE_VP_MPEG2;
|
||||
screen->firmware_info.profiles_checked |= FIRMWARE_VP_MPEG2;
|
||||
}
|
||||
present = screen->firmware_info.profiles_present;
|
||||
return FIRMWARE_PRESENT(present, VP_KERN) &&
|
||||
FIRMWARE_PRESENT(present, VP_MPEG2);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
nv84_screen_get_video_param(struct pipe_screen *pscreen,
|
||||
enum pipe_video_profile profile,
|
||||
enum pipe_video_entrypoint entrypoint,
|
||||
enum pipe_video_cap param)
|
||||
{
|
||||
enum pipe_video_format codec;
|
||||
|
||||
switch (param) {
|
||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||
return u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC ||
|
||||
u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG12;
|
||||
codec = u_reduce_video_profile(profile);
|
||||
return (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC ||
|
||||
codec == PIPE_VIDEO_FORMAT_MPEG12) &&
|
||||
firmware_present(pscreen, codec);
|
||||
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
||||
return 1;
|
||||
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
||||
|
@@ -413,7 +413,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
|
||||
case PIPE_CAP_USER_INDEX_BUFFERS:
|
||||
case PIPE_CAP_USER_CONSTANT_BUFFERS:
|
||||
case PIPE_CAP_COMPUTE:
|
||||
case PIPE_CAP_START_INSTANCE:
|
||||
case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
|
||||
case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
|
||||
@@ -422,6 +421,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_TEXTURE_MULTISAMPLE:
|
||||
return 1;
|
||||
|
||||
case PIPE_CAP_COMPUTE:
|
||||
return rscreen->b.chip_class > R700;
|
||||
|
||||
case PIPE_CAP_TGSI_TEXCOORD:
|
||||
return 0;
|
||||
|
||||
|
@@ -58,6 +58,9 @@
|
||||
#define NUM_H264_REFS 17
|
||||
#define NUM_VC1_REFS 5
|
||||
|
||||
#define FB_BUFFER_OFFSET 0x1000
|
||||
#define FB_BUFFER_SIZE 2048
|
||||
|
||||
/* UVD buffer representation */
|
||||
struct ruvd_buffer
|
||||
{
|
||||
@@ -81,6 +84,7 @@ struct ruvd_decoder {
|
||||
|
||||
struct ruvd_buffer msg_fb_buffers[NUM_BUFFERS];
|
||||
struct ruvd_msg *msg;
|
||||
uint32_t *fb;
|
||||
|
||||
struct ruvd_buffer bs_buffers[NUM_BUFFERS];
|
||||
void* bs_ptr;
|
||||
@@ -131,16 +135,21 @@ static void send_cmd(struct ruvd_decoder *dec, unsigned cmd,
|
||||
set_reg(dec, RUVD_GPCOM_VCPU_CMD, cmd << 1);
|
||||
}
|
||||
|
||||
/* map the next available message buffer */
|
||||
static void map_msg_buf(struct ruvd_decoder *dec)
|
||||
/* map the next available message/feedback buffer */
|
||||
static void map_msg_fb_buf(struct ruvd_decoder *dec)
|
||||
{
|
||||
struct ruvd_buffer* buf;
|
||||
uint8_t *ptr;
|
||||
|
||||
/* grap the current message buffer */
|
||||
/* grab the current message/feedback buffer */
|
||||
buf = &dec->msg_fb_buffers[dec->cur_buffer];
|
||||
|
||||
/* copy the message into it */
|
||||
dec->msg = dec->ws->buffer_map(buf->cs_handle, dec->cs, PIPE_TRANSFER_WRITE);
|
||||
/* and map it for CPU access */
|
||||
ptr = dec->ws->buffer_map(buf->cs_handle, dec->cs, PIPE_TRANSFER_WRITE);
|
||||
|
||||
/* calc buffer offsets */
|
||||
dec->msg = (struct ruvd_msg *)ptr;
|
||||
dec->fb = (uint32_t *)(ptr + FB_BUFFER_OFFSET);
|
||||
}
|
||||
|
||||
/* unmap and send a message command to the VCPU */
|
||||
@@ -148,8 +157,8 @@ static void send_msg_buf(struct ruvd_decoder *dec)
|
||||
{
|
||||
struct ruvd_buffer* buf;
|
||||
|
||||
/* ignore the request if message buffer isn't mapped */
|
||||
if (!dec->msg)
|
||||
/* ignore the request if message/feedback buffer isn't mapped */
|
||||
if (!dec->msg || !dec->fb)
|
||||
return;
|
||||
|
||||
/* grap the current message buffer */
|
||||
@@ -157,6 +166,8 @@ static void send_msg_buf(struct ruvd_decoder *dec)
|
||||
|
||||
/* unmap the buffer */
|
||||
dec->ws->buffer_unmap(buf->cs_handle);
|
||||
dec->msg = NULL;
|
||||
dec->fb = NULL;
|
||||
|
||||
/* and send it to the hardware */
|
||||
send_cmd(dec, RUVD_CMD_MSG_BUFFER, buf->cs_handle, 0,
|
||||
@@ -644,7 +655,7 @@ static void ruvd_destroy(struct pipe_video_codec *decoder)
|
||||
|
||||
assert(decoder);
|
||||
|
||||
map_msg_buf(dec);
|
||||
map_msg_fb_buf(dec);
|
||||
memset(dec->msg, 0, sizeof(*dec->msg));
|
||||
dec->msg->size = sizeof(*dec->msg);
|
||||
dec->msg->msg_type = RUVD_MSG_DESTROY;
|
||||
@@ -773,7 +784,7 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
|
||||
memset(dec->bs_ptr, 0, bs_size - dec->bs_size);
|
||||
dec->ws->buffer_unmap(bs_buf->cs_handle);
|
||||
|
||||
map_msg_buf(dec);
|
||||
map_msg_fb_buf(dec);
|
||||
dec->msg->size = sizeof(*dec->msg);
|
||||
dec->msg->msg_type = RUVD_MSG_DECODE;
|
||||
dec->msg->stream_handle = dec->stream_handle;
|
||||
@@ -813,6 +824,10 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
|
||||
|
||||
dec->msg->body.decode.db_surf_tile_config = dec->msg->body.decode.dt_surf_tile_config;
|
||||
dec->msg->body.decode.extension_support = 0x1;
|
||||
|
||||
/* set at least the feedback buffer size */
|
||||
dec->fb[0] = FB_BUFFER_SIZE;
|
||||
|
||||
send_msg_buf(dec);
|
||||
|
||||
send_cmd(dec, RUVD_CMD_DPB_BUFFER, dec->dpb.cs_handle, 0,
|
||||
@@ -822,7 +837,7 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
|
||||
send_cmd(dec, RUVD_CMD_DECODING_TARGET_BUFFER, dt, 0,
|
||||
RADEON_USAGE_WRITE, RADEON_DOMAIN_VRAM);
|
||||
send_cmd(dec, RUVD_CMD_FEEDBACK_BUFFER, msg_fb_buf->cs_handle,
|
||||
0x1000, RADEON_USAGE_WRITE, RADEON_DOMAIN_GTT);
|
||||
FB_BUFFER_OFFSET, RADEON_USAGE_WRITE, RADEON_DOMAIN_GTT);
|
||||
set_reg(dec, RUVD_ENGINE_CNTL, 1);
|
||||
|
||||
flush(dec);
|
||||
@@ -898,7 +913,8 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
|
||||
|
||||
bs_buf_size = width * height * 512 / (16 * 16);
|
||||
for (i = 0; i < NUM_BUFFERS; ++i) {
|
||||
unsigned msg_fb_size = align(sizeof(struct ruvd_msg), 0x1000) + 0x1000;
|
||||
unsigned msg_fb_size = FB_BUFFER_OFFSET + FB_BUFFER_SIZE;
|
||||
STATIC_ASSERT(sizeof(struct ruvd_msg) <= FB_BUFFER_OFFSET);
|
||||
if (!create_buffer(dec, &dec->msg_fb_buffers[i], msg_fb_size)) {
|
||||
RUVD_ERR("Can't allocated message buffers.\n");
|
||||
goto error;
|
||||
@@ -920,7 +936,7 @@ struct pipe_video_codec *ruvd_create_decoder(struct pipe_context *context,
|
||||
|
||||
clear_buffer(dec, &dec->dpb);
|
||||
|
||||
map_msg_buf(dec);
|
||||
map_msg_fb_buf(dec);
|
||||
dec->msg->size = sizeof(*dec->msg);
|
||||
dec->msg->msg_type = RUVD_MSG_CREATE;
|
||||
dec->msg->stream_handle = dec->stream_handle;
|
||||
|
@@ -60,7 +60,7 @@ softpipe_resource_layout(struct pipe_screen *screen,
|
||||
unsigned width = pt->width0;
|
||||
unsigned height = pt->height0;
|
||||
unsigned depth = pt->depth0;
|
||||
unsigned buffer_size = 0;
|
||||
uint64_t buffer_size = 0;
|
||||
|
||||
for (level = 0; level <= pt->last_level; level++) {
|
||||
unsigned slices;
|
||||
@@ -76,8 +76,8 @@ softpipe_resource_layout(struct pipe_screen *screen,
|
||||
|
||||
spr->level_offset[level] = buffer_size;
|
||||
|
||||
buffer_size += (util_format_get_nblocksy(pt->format, height) *
|
||||
slices * spr->stride[level]);
|
||||
buffer_size += (uint64_t) util_format_get_nblocksy(pt->format, height) *
|
||||
slices * spr->stride[level];
|
||||
|
||||
width = u_minify(width, 1);
|
||||
height = u_minify(height, 1);
|
||||
|
@@ -58,17 +58,13 @@ libvdpau_r600_la_LIBADD = \
|
||||
$(LIBDRM_LIBS) \
|
||||
$(RADEON_LIBS)
|
||||
|
||||
if HAVE_MESA_LLVM
|
||||
libvdpau_r600_la_LINK = $(CXXLINK) $(libvdpau_r600_la_LDFLAGS)
|
||||
# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
|
||||
nodist_EXTRA_libvdpau_r600_la_SOURCES = dummy-cpp.cpp
|
||||
|
||||
if HAVE_MESA_LLVM
|
||||
libvdpau_r600_la_LDFLAGS += $(LLVM_LDFLAGS)
|
||||
libvdpau_r600_la_LIBADD += $(LLVM_LIBS)
|
||||
else
|
||||
libvdpau_r600_la_LINK = $(LINK) $(libvdpau_r600_la_LDFLAGS)
|
||||
# Mention a dummy pure C file to trigger generation of the $(LINK) variable
|
||||
nodist_EXTRA_libvdpau_r600_la_SOURCES = dummy-c.c
|
||||
endif
|
||||
|
||||
# Provide compatibility with scripts for the old Mesa build system for
|
||||
|
@@ -846,14 +846,13 @@ public:
|
||||
|
||||
ast_node *body;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Generate IR from the condition of a loop
|
||||
*
|
||||
* This is factored out of ::hir because some loops have the condition
|
||||
* test at the top (for and while), and others have it at the end (do-while).
|
||||
*/
|
||||
void condition_to_hir(class ir_loop *, struct _mesa_glsl_parse_state *);
|
||||
void condition_to_hir(exec_list *, struct _mesa_glsl_parse_state *);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -2803,10 +2803,17 @@ validate_identifier(const char *identifier, YYLTYPE loc,
|
||||
* "In addition, all identifiers containing two
|
||||
* consecutive underscores (__) are reserved as
|
||||
* possible future keywords."
|
||||
*
|
||||
* The intention is that names containing __ are reserved for internal
|
||||
* use by the implementation, and names prefixed with GL_ are reserved
|
||||
* for use by Khronos. Names simply containing __ are dangerous to use,
|
||||
* but should be allowed.
|
||||
*
|
||||
* A future version of the GLSL specification will clarify this.
|
||||
*/
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"identifier `%s' uses reserved `__' string",
|
||||
identifier);
|
||||
_mesa_glsl_warning(&loc, state,
|
||||
"identifier `%s' uses reserved `__' string",
|
||||
identifier);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3979,17 +3986,22 @@ ast_jump_statement::hir(exec_list *instructions,
|
||||
_mesa_glsl_error(& loc, state,
|
||||
"break may only appear in a loop or a switch");
|
||||
} else {
|
||||
/* For a loop, inline the for loop expression again,
|
||||
* since we don't know where near the end of
|
||||
* the loop body the normal copy of it
|
||||
* is going to be placed.
|
||||
/* For a loop, inline the for loop expression again, since we don't
|
||||
* know where near the end of the loop body the normal copy of it is
|
||||
* going to be placed. Same goes for the condition for a do-while
|
||||
* loop.
|
||||
*/
|
||||
if (state->loop_nesting_ast != NULL &&
|
||||
mode == ast_continue &&
|
||||
state->loop_nesting_ast->rest_expression) {
|
||||
state->loop_nesting_ast->rest_expression->hir(instructions,
|
||||
state);
|
||||
}
|
||||
mode == ast_continue) {
|
||||
if (state->loop_nesting_ast->rest_expression) {
|
||||
state->loop_nesting_ast->rest_expression->hir(instructions,
|
||||
state);
|
||||
}
|
||||
if (state->loop_nesting_ast->mode ==
|
||||
ast_iteration_statement::ast_do_while) {
|
||||
state->loop_nesting_ast->condition_to_hir(instructions, state);
|
||||
}
|
||||
}
|
||||
|
||||
if (state->switch_state.is_switch_innermost &&
|
||||
mode == ast_break) {
|
||||
@@ -4319,14 +4331,14 @@ ast_case_label::hir(exec_list *instructions,
|
||||
}
|
||||
|
||||
void
|
||||
ast_iteration_statement::condition_to_hir(ir_loop *stmt,
|
||||
ast_iteration_statement::condition_to_hir(exec_list *instructions,
|
||||
struct _mesa_glsl_parse_state *state)
|
||||
{
|
||||
void *ctx = state;
|
||||
|
||||
if (condition != NULL) {
|
||||
ir_rvalue *const cond =
|
||||
condition->hir(& stmt->body_instructions, state);
|
||||
condition->hir(instructions, state);
|
||||
|
||||
if ((cond == NULL)
|
||||
|| !cond->type->is_boolean() || !cond->type->is_scalar()) {
|
||||
@@ -4347,7 +4359,7 @@ ast_iteration_statement::condition_to_hir(ir_loop *stmt,
|
||||
new(ctx) ir_loop_jump(ir_loop_jump::jump_break);
|
||||
|
||||
if_stmt->then_instructions.push_tail(break_stmt);
|
||||
stmt->body_instructions.push_tail(if_stmt);
|
||||
instructions->push_tail(if_stmt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4382,7 +4394,7 @@ ast_iteration_statement::hir(exec_list *instructions,
|
||||
state->switch_state.is_switch_innermost = false;
|
||||
|
||||
if (mode != ast_do_while)
|
||||
condition_to_hir(stmt, state);
|
||||
condition_to_hir(&stmt->body_instructions, state);
|
||||
|
||||
if (body != NULL)
|
||||
body->hir(& stmt->body_instructions, state);
|
||||
@@ -4391,7 +4403,7 @@ ast_iteration_statement::hir(exec_list *instructions,
|
||||
rest_expression->hir(& stmt->body_instructions, state);
|
||||
|
||||
if (mode == ast_do_while)
|
||||
condition_to_hir(stmt, state);
|
||||
condition_to_hir(&stmt->body_instructions, state);
|
||||
|
||||
if (mode != ast_do_while)
|
||||
state->symbols->pop_scope();
|
||||
|
@@ -123,6 +123,7 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
|
||||
ubo_layout_mask.flags.q.shared = 1;
|
||||
|
||||
ast_type_qualifier ubo_binding_mask;
|
||||
ubo_binding_mask.flags.i = 0;
|
||||
ubo_binding_mask.flags.q.explicit_binding = 1;
|
||||
ubo_binding_mask.flags.q.explicit_offset = 1;
|
||||
|
||||
|
@@ -3997,6 +3997,7 @@ builtin_builder::_atomic_op(const char *intrinsic,
|
||||
|
||||
/* The singleton instance of builtin_builder. */
|
||||
static builtin_builder builtins;
|
||||
_glthread_DECLARE_STATIC_MUTEX(builtins_lock);
|
||||
|
||||
/**
|
||||
* External API (exposing the built-in module to the rest of the compiler):
|
||||
@@ -4005,19 +4006,27 @@ static builtin_builder builtins;
|
||||
void
|
||||
_mesa_glsl_initialize_builtin_functions()
|
||||
{
|
||||
_glthread_LOCK_MUTEX(builtins_lock);
|
||||
builtins.initialize();
|
||||
_glthread_UNLOCK_MUTEX(builtins_lock);
|
||||
}
|
||||
|
||||
void
|
||||
_mesa_glsl_release_builtin_functions()
|
||||
{
|
||||
_glthread_LOCK_MUTEX(builtins_lock);
|
||||
builtins.release();
|
||||
_glthread_UNLOCK_MUTEX(builtins_lock);
|
||||
}
|
||||
|
||||
ir_function_signature *
|
||||
_mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state,
|
||||
const char *name, exec_list *actual_parameters)
|
||||
{
|
||||
return builtins.find(state, name, actual_parameters);
|
||||
ir_function_signature * s;
|
||||
_glthread_LOCK_MUTEX(builtins_lock);
|
||||
s = builtins.find(state, name, actual_parameters);
|
||||
_glthread_UNLOCK_MUTEX(builtins_lock);
|
||||
return s;
|
||||
}
|
||||
/** @} */
|
||||
|
@@ -1828,11 +1828,27 @@ static void
|
||||
_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc,
|
||||
const char *identifier)
|
||||
{
|
||||
/* According to the GLSL specification, macro names starting with "__"
|
||||
* or "GL_" are reserved for future use. So, don't allow them.
|
||||
/* Section 3.3 (Preprocessor) of the GLSL 1.30 spec (and later) and
|
||||
* the GLSL ES spec (all versions) say:
|
||||
*
|
||||
* "All macro names containing two consecutive underscores ( __ )
|
||||
* are reserved for future use as predefined macro names. All
|
||||
* macro names prefixed with "GL_" ("GL" followed by a single
|
||||
* underscore) are also reserved."
|
||||
*
|
||||
* The intention is that names containing __ are reserved for internal
|
||||
* use by the implementation, and names prefixed with GL_ are reserved
|
||||
* for use by Khronos. Since every extension adds a name prefixed
|
||||
* with GL_ (i.e., the name of the extension), that should be an
|
||||
* error. Names simply containing __ are dangerous to use, but should
|
||||
* be allowed.
|
||||
*
|
||||
* A future version of the GLSL specification will clarify this.
|
||||
*/
|
||||
if (strstr(identifier, "__")) {
|
||||
glcpp_error (loc, parser, "Macro names containing \"__\" are reserved.\n");
|
||||
glcpp_warning(loc, parser,
|
||||
"Macro names containing \"__\" are reserved "
|
||||
"for use by the implementation.\n");
|
||||
}
|
||||
if (strncmp(identifier, "GL_", 3) == 0) {
|
||||
glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n");
|
||||
|
@@ -1,8 +1,8 @@
|
||||
0:1(10): preprocessor error: Macro names containing "__" are reserved.
|
||||
0:1(10): preprocessor warning: Macro names containing "__" are reserved for use by the implementation.
|
||||
|
||||
0:2(9): preprocessor error: Macro names starting with "GL_" are reserved.
|
||||
|
||||
0:3(9): preprocessor error: Macro names containing "__" are reserved.
|
||||
0:3(9): preprocessor warning: Macro names containing "__" are reserved for use by the implementation.
|
||||
|
||||
|
||||
|
||||
|
@@ -1530,7 +1530,7 @@ type_qualifier:
|
||||
"just before storage qualifiers");
|
||||
}
|
||||
$$ = $1;
|
||||
$$.flags.i |= $2.flags.i;
|
||||
$$.merge_qualifier(&@1, state, $2);
|
||||
}
|
||||
| storage_qualifier type_qualifier
|
||||
{
|
||||
|
@@ -2373,11 +2373,12 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
goto done;
|
||||
|
||||
/* OpenGL ES requires that a vertex shader and a fragment shader both be
|
||||
* present in a linked program. By checking prog->IsES, we also
|
||||
* catch the GL_ARB_ES2_compatibility case.
|
||||
* present in a linked program. GL_ARB_ES2_compatibility doesn't say
|
||||
* anything about shader linking when one of the shaders (vertex or
|
||||
* fragment shader) is absent. So, the extension shouldn't change the
|
||||
* behavior specified in GLSL specification.
|
||||
*/
|
||||
if (!prog->InternalSeparateShader &&
|
||||
(ctx->API == API_OPENGLES2 || prog->IsES)) {
|
||||
if (!prog->InternalSeparateShader && ctx->API == API_OPENGLES2) {
|
||||
if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) {
|
||||
linker_error(prog, "program lacks a vertex shader\n");
|
||||
} else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) {
|
||||
|
@@ -20,6 +20,9 @@
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
|
||||
|
||||
#include "glxclient.h"
|
||||
#include "glx_error.h"
|
||||
#include "xf86drm.h"
|
||||
@@ -95,3 +98,5 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
|
||||
|
||||
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
|
||||
}
|
||||
|
||||
#endif /* GLX_DIRECT_RENDERING */
|
||||
|
@@ -917,13 +917,10 @@ init_fbconfig_for_chooser(struct glx_config * config,
|
||||
if (fbconfig_style_tags) {
|
||||
config->rgbMode = GL_TRUE;
|
||||
config->doubleBufferMode = GLX_DONT_CARE;
|
||||
/* allow any kind of drawable, including those for off-screen buffers */
|
||||
config->drawableType = 0;
|
||||
} else {
|
||||
/* allow configs which support on-screen drawing */
|
||||
config->drawableType = GLX_WINDOW_BIT;
|
||||
config->renderType = GLX_RGBA_BIT;
|
||||
}
|
||||
|
||||
config->drawableType = GLX_WINDOW_BIT;
|
||||
config->visualRating = GLX_DONT_CARE;
|
||||
config->transparentPixel = GLX_NONE;
|
||||
config->transparentRed = GLX_DONT_CARE;
|
||||
@@ -932,8 +929,6 @@ init_fbconfig_for_chooser(struct glx_config * config,
|
||||
config->transparentAlpha = GLX_DONT_CARE;
|
||||
config->transparentIndex = GLX_DONT_CARE;
|
||||
|
||||
/* Set GLX_RENDER_TYPE property to not expect any flags by default. */
|
||||
config->renderType = 0;
|
||||
config->xRenderable = GLX_DONT_CARE;
|
||||
config->fbconfigID = (GLXFBConfigID) (GLX_DONT_CARE);
|
||||
|
||||
@@ -1102,7 +1097,7 @@ static int
|
||||
fbconfig_compare(struct glx_config **a, struct glx_config **b)
|
||||
{
|
||||
/* The order of these comparisons must NOT change. It is defined by
|
||||
* the GLX 1.3 spec and ARB_multisample.
|
||||
* the GLX 1.4 specification.
|
||||
*/
|
||||
|
||||
PREFER_SMALLER(visualSelectGroup);
|
||||
@@ -1131,6 +1126,9 @@ fbconfig_compare(struct glx_config **a, struct glx_config **b)
|
||||
|
||||
PREFER_SMALLER(numAuxBuffers);
|
||||
|
||||
PREFER_SMALLER(sampleBuffers);
|
||||
PREFER_SMALLER(samples);
|
||||
|
||||
PREFER_LARGER_OR_ZERO(depthBits);
|
||||
PREFER_SMALLER(stencilBits);
|
||||
|
||||
@@ -1144,12 +1142,6 @@ fbconfig_compare(struct glx_config **a, struct glx_config **b)
|
||||
|
||||
PREFER_SMALLER(visualType);
|
||||
|
||||
/* None of the multisample specs say where this comparison should happen,
|
||||
* so I put it near the end.
|
||||
*/
|
||||
PREFER_SMALLER(sampleBuffers);
|
||||
PREFER_SMALLER(samples);
|
||||
|
||||
/* None of the pbuffer or fbconfig specs say that this comparison needs
|
||||
* to happen at all, but it seems like it should.
|
||||
*/
|
||||
|
@@ -355,6 +355,8 @@ static void cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *te
|
||||
static void meta_glsl_clear_cleanup(struct gl_context *ctx, struct clear_state *clear);
|
||||
static void meta_glsl_generate_mipmap_cleanup(struct gl_context *ctx,
|
||||
struct gen_mipmap_state *mipmap);
|
||||
static void meta_decompress_cleanup(struct decompress_state *decompress);
|
||||
static void meta_drawpix_cleanup(struct drawpix_state *drawpix);
|
||||
|
||||
static GLuint
|
||||
compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB *source)
|
||||
@@ -449,6 +451,8 @@ _mesa_meta_free(struct gl_context *ctx)
|
||||
meta_glsl_clear_cleanup(ctx, &ctx->Meta->Clear);
|
||||
meta_glsl_generate_mipmap_cleanup(ctx, &ctx->Meta->Mipmap);
|
||||
cleanup_temp_texture(ctx, &ctx->Meta->TempTex);
|
||||
meta_decompress_cleanup(&ctx->Meta->Decompress);
|
||||
meta_drawpix_cleanup(&ctx->Meta->DrawPix);
|
||||
if (old_context)
|
||||
_mesa_make_current(old_context, old_context->WinSysDrawBuffer, old_context->WinSysReadBuffer);
|
||||
else
|
||||
@@ -2489,7 +2493,24 @@ _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY,
|
||||
_mesa_meta_end(ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_drawpix_cleanup(struct drawpix_state *drawpix)
|
||||
{
|
||||
if (drawpix->ArrayObj != 0) {
|
||||
_mesa_DeleteVertexArrays(1, &drawpix->ArrayObj);
|
||||
drawpix->ArrayObj = 0;
|
||||
}
|
||||
|
||||
if (drawpix->StencilFP != 0) {
|
||||
_mesa_DeleteProgramsARB(1, &drawpix->StencilFP);
|
||||
drawpix->StencilFP = 0;
|
||||
}
|
||||
|
||||
if (drawpix->DepthFP != 0) {
|
||||
_mesa_DeleteProgramsARB(1, &drawpix->DepthFP);
|
||||
drawpix->DepthFP = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When the glDrawPixels() image size is greater than the max rectangle
|
||||
@@ -2951,8 +2972,8 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
|
||||
/* one-time setup */
|
||||
|
||||
/* create vertex array object */
|
||||
_mesa_GenVertexArraysAPPLE(1, &bitmap->ArrayObj);
|
||||
_mesa_BindVertexArrayAPPLE(bitmap->ArrayObj);
|
||||
_mesa_GenVertexArrays(1, &bitmap->ArrayObj);
|
||||
_mesa_BindVertexArray(bitmap->ArrayObj);
|
||||
|
||||
/* create vertex array buffer */
|
||||
_mesa_GenBuffers(1, &bitmap->VBO);
|
||||
@@ -3317,8 +3338,8 @@ setup_ff_generate_mipmap(struct gl_context *ctx,
|
||||
if (mipmap->ArrayObj == 0) {
|
||||
/* one-time setup */
|
||||
/* create vertex array object */
|
||||
_mesa_GenVertexArraysAPPLE(1, &mipmap->ArrayObj);
|
||||
_mesa_BindVertexArrayAPPLE(mipmap->ArrayObj);
|
||||
_mesa_GenVertexArrays(1, &mipmap->ArrayObj);
|
||||
_mesa_BindVertexArray(mipmap->ArrayObj);
|
||||
|
||||
/* create vertex array buffer */
|
||||
_mesa_GenBuffers(1, &mipmap->VBO);
|
||||
@@ -3891,6 +3912,25 @@ _mesa_meta_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
meta_decompress_cleanup(struct decompress_state *decompress)
|
||||
{
|
||||
if (decompress->FBO != 0) {
|
||||
_mesa_DeleteFramebuffers(1, &decompress->FBO);
|
||||
_mesa_DeleteRenderbuffers(1, &decompress->RBO);
|
||||
}
|
||||
|
||||
if (decompress->ArrayObj != 0) {
|
||||
_mesa_DeleteVertexArrays(1, &decompress->ArrayObj);
|
||||
_mesa_DeleteBuffers(1, &decompress->VBO);
|
||||
}
|
||||
|
||||
if (decompress->Sampler != 0)
|
||||
_mesa_DeleteSamplers(1, &decompress->Sampler);
|
||||
|
||||
memset(decompress, 0, sizeof(*decompress));
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress a texture image by drawing a quad with the compressed
|
||||
* texture and reading the pixels out of the color buffer.
|
||||
@@ -4125,7 +4165,8 @@ _mesa_meta_GetTexImage(struct gl_context *ctx,
|
||||
* unsigned, normalized values. We could handle signed and unnormalized
|
||||
* with floating point renderbuffers...
|
||||
*/
|
||||
if (_mesa_is_format_compressed(texImage->TexFormat) &&
|
||||
if (texImage->TexObject->Target != GL_TEXTURE_CUBE_MAP_ARRAY
|
||||
&& _mesa_is_format_compressed(texImage->TexFormat) &&
|
||||
_mesa_get_format_datatype(texImage->TexFormat)
|
||||
== GL_UNSIGNED_NORMALIZED) {
|
||||
struct gl_texture_object *texObj = texImage->TexObject;
|
||||
|
@@ -741,7 +741,7 @@ i915_query_renderer_integer(__DRIscreen *psp, int param, unsigned int *value)
|
||||
* (uint64_t) system_page_size;
|
||||
|
||||
const unsigned system_memory_megabytes =
|
||||
(unsigned) (system_memory_bytes / 1024);
|
||||
(unsigned) (system_memory_bytes / (1024 * 1024));
|
||||
|
||||
value[0] = MIN2(system_memory_megabytes, gpu_mappable_megabytes);
|
||||
return 0;
|
||||
|
@@ -699,12 +699,6 @@ brwCreateContext(gl_api api,
|
||||
|
||||
intel_batchbuffer_init(brw);
|
||||
|
||||
brw_init_state(brw);
|
||||
|
||||
intelInitExtensions(ctx);
|
||||
|
||||
intel_fbo_init(brw);
|
||||
|
||||
if (brw->gen >= 6) {
|
||||
/* Create a new hardware context. Using a hardware context means that
|
||||
* our GPU state will be saved/restored on context switch, allowing us
|
||||
@@ -722,6 +716,12 @@ brwCreateContext(gl_api api,
|
||||
}
|
||||
}
|
||||
|
||||
brw_init_state(brw);
|
||||
|
||||
intelInitExtensions(ctx);
|
||||
|
||||
intel_fbo_init(brw);
|
||||
|
||||
brw_init_surface_formats(brw);
|
||||
|
||||
if (brw->is_g4x || brw->gen >= 5) {
|
||||
|
@@ -273,7 +273,7 @@ brw_predraw_resolve_buffers(struct brw_context *brw)
|
||||
/* Resolve depth buffer of each enabled depth texture, and color buffer of
|
||||
* each fast-clear-enabled color texture.
|
||||
*/
|
||||
for (int i = 0; i < BRW_MAX_TEX_UNIT; i++) {
|
||||
for (int i = 0; i < ctx->Const.MaxCombinedTextureImageUnits; i++) {
|
||||
if (!ctx->Texture.Unit[i]._ReallyEnabled)
|
||||
continue;
|
||||
tex_obj = intel_texture_object(ctx->Texture.Unit[i]._Current);
|
||||
|
@@ -47,7 +47,7 @@ void brw_validate_textures( struct brw_context *brw )
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
|
||||
for (i = 0; i < ctx->Const.MaxCombinedTextureImageUnits; i++) {
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
|
||||
|
||||
if (texUnit->_ReallyEnabled) {
|
||||
|
@@ -254,26 +254,6 @@ gen6_blorp_emit_blend_state(struct brw_context *brw,
|
||||
blend->blend1.write_disable_b = params->color_write_disable[2];
|
||||
blend->blend1.write_disable_a = params->color_write_disable[3];
|
||||
|
||||
/* When blitting from an XRGB source to a ARGB destination, we need to
|
||||
* interpret the missing channel as 1.0. Blending can do that for us:
|
||||
* we simply use the RGB values from the fragment shader ("source RGB"),
|
||||
* but smash the alpha channel to 1.
|
||||
*/
|
||||
if (params->src.mt &&
|
||||
_mesa_get_format_bits(params->dst.mt->format, GL_ALPHA_BITS) > 0 &&
|
||||
_mesa_get_format_bits(params->src.mt->format, GL_ALPHA_BITS) == 0) {
|
||||
blend->blend0.blend_enable = 1;
|
||||
blend->blend0.ia_blend_enable = 1;
|
||||
|
||||
blend->blend0.blend_func = BRW_BLENDFUNCTION_ADD;
|
||||
blend->blend0.ia_blend_func = BRW_BLENDFUNCTION_ADD;
|
||||
|
||||
blend->blend0.source_blend_factor = BRW_BLENDFACTOR_SRC_COLOR;
|
||||
blend->blend0.dest_blend_factor = BRW_BLENDFACTOR_ZERO;
|
||||
blend->blend0.ia_source_blend_factor = BRW_BLENDFACTOR_ONE;
|
||||
blend->blend0.ia_dest_blend_factor = BRW_BLENDFACTOR_ZERO;
|
||||
}
|
||||
|
||||
return cc_blend_state_offset;
|
||||
}
|
||||
|
||||
|
@@ -199,9 +199,9 @@ intel_miptree_blit(struct brw_context *brw,
|
||||
* As a result of these two limitations, we can only use the blitter to do
|
||||
* this copy when the region's pitch is less than 32k.
|
||||
*/
|
||||
if (src_mt->region->pitch > 32768 ||
|
||||
dst_mt->region->pitch > 32768) {
|
||||
perf_debug("Falling back due to >32k pitch\n");
|
||||
if (src_mt->region->pitch >= 32768 ||
|
||||
dst_mt->region->pitch >= 32768) {
|
||||
perf_debug("Falling back due to >=32k pitch\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -843,7 +843,7 @@ brw_query_renderer_integer(__DRIscreen *psp, int param, unsigned int *value)
|
||||
* (uint64_t) system_page_size;
|
||||
|
||||
const unsigned system_memory_megabytes =
|
||||
(unsigned) (system_memory_bytes / 1024);
|
||||
(unsigned) (system_memory_bytes / (1024 * 1024));
|
||||
|
||||
value[0] = MIN2(system_memory_megabytes, gpu_mappable_megabytes);
|
||||
return 0;
|
||||
|
@@ -72,7 +72,7 @@ nouveau_context_create(gl_api api,
|
||||
return false;
|
||||
}
|
||||
|
||||
ctx = screen->driver->context_create(screen, visual, share_ctx);
|
||||
ctx = screen->driver->context_create(screen, api, visual, share_ctx);
|
||||
if (!ctx) {
|
||||
*error = __DRI_CTX_ERROR_NO_MEMORY;
|
||||
return GL_FALSE;
|
||||
@@ -107,7 +107,8 @@ nouveau_context_create(gl_api api,
|
||||
}
|
||||
|
||||
GLboolean
|
||||
nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
|
||||
nouveau_context_init(struct gl_context *ctx, gl_api api,
|
||||
struct nouveau_screen *screen,
|
||||
const struct gl_config *visual, struct gl_context *share_ctx)
|
||||
{
|
||||
struct nouveau_context *nctx = to_nouveau_context(ctx);
|
||||
@@ -125,7 +126,7 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
|
||||
nouveau_fbo_functions_init(&functions);
|
||||
|
||||
/* Initialize the mesa context. */
|
||||
_mesa_initialize_context(ctx, API_OPENGL_COMPAT, visual,
|
||||
_mesa_initialize_context(ctx, api, visual,
|
||||
share_ctx, &functions);
|
||||
|
||||
nouveau_state_init(ctx);
|
||||
|
@@ -115,7 +115,8 @@ nouveau_context_create(gl_api api,
|
||||
void *share_ctx);
|
||||
|
||||
GLboolean
|
||||
nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
|
||||
nouveau_context_init(struct gl_context *ctx, gl_api api,
|
||||
struct nouveau_screen *screen,
|
||||
const struct gl_config *visual, struct gl_context *share_ctx);
|
||||
|
||||
void
|
||||
|
@@ -48,6 +48,7 @@
|
||||
|
||||
struct nouveau_driver {
|
||||
struct gl_context *(*context_create)(struct nouveau_screen *screen,
|
||||
gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_ctx);
|
||||
void (*context_destroy)(struct gl_context *ctx);
|
||||
|
@@ -138,7 +138,8 @@ nv04_context_destroy(struct gl_context *ctx)
|
||||
}
|
||||
|
||||
static struct gl_context *
|
||||
nv04_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
|
||||
nv04_context_create(struct nouveau_screen *screen, gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_ctx)
|
||||
{
|
||||
struct nv04_context *nctx;
|
||||
@@ -153,7 +154,7 @@ nv04_context_create(struct nouveau_screen *screen, const struct gl_config *visua
|
||||
ctx = &nctx->base.base;
|
||||
hw = &nctx->base.hw;
|
||||
|
||||
if (!nouveau_context_init(ctx, screen, visual, share_ctx))
|
||||
if (!nouveau_context_init(ctx, api, screen, visual, share_ctx))
|
||||
goto fail;
|
||||
|
||||
/* GL constants. */
|
||||
|
@@ -63,7 +63,7 @@ nv10_use_viewport_zclear(struct gl_context *ctx)
|
||||
struct gl_framebuffer *fb = ctx->DrawBuffer;
|
||||
struct gl_renderbuffer *depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer;
|
||||
|
||||
return context_chipset(ctx) < 0x17 &&
|
||||
return context_eng3d(ctx)->oclass < NV17_3D_CLASS &&
|
||||
!nctx->hierz.clear_blocked && depthRb &&
|
||||
(_mesa_get_format_bits(depthRb->Format,
|
||||
GL_DEPTH_BITS) >= 24);
|
||||
@@ -184,7 +184,7 @@ nv10_clear(struct gl_context *ctx, GLbitfield buffers)
|
||||
}
|
||||
|
||||
if ((buffers & BUFFER_BIT_DEPTH) && ctx->Depth.Mask) {
|
||||
if (context_chipset(ctx) >= 0x17)
|
||||
if (context_eng3d(ctx)->oclass >= NV17_3D_CLASS)
|
||||
nv17_zclear(ctx, &buffers);
|
||||
else
|
||||
nv10_zclear(ctx, &buffers);
|
||||
@@ -245,7 +245,7 @@ nv10_hwctx_init(struct gl_context *ctx)
|
||||
BEGIN_NV04(push, NV04_GRAPH(3D, NOP), 1);
|
||||
PUSH_DATA (push, 0);
|
||||
|
||||
if (context_chipset(ctx) >= 0x17) {
|
||||
if (context_eng3d(ctx)->oclass >= NV17_3D_CLASS) {
|
||||
BEGIN_NV04(push, NV17_3D(UNK01AC), 2);
|
||||
PUSH_DATA (push, fifo->vram);
|
||||
PUSH_DATA (push, fifo->vram);
|
||||
@@ -257,7 +257,7 @@ nv10_hwctx_init(struct gl_context *ctx)
|
||||
PUSH_DATA (push, 1);
|
||||
}
|
||||
|
||||
if (context_chipset(ctx) >= 0x11) {
|
||||
if (context_eng3d(ctx)->oclass >= NV15_3D_CLASS) {
|
||||
BEGIN_NV04(push, SUBC_3D(0x120), 3);
|
||||
PUSH_DATA (push, 0);
|
||||
PUSH_DATA (push, 1);
|
||||
@@ -427,7 +427,8 @@ nv10_context_destroy(struct gl_context *ctx)
|
||||
}
|
||||
|
||||
static struct gl_context *
|
||||
nv10_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
|
||||
nv10_context_create(struct nouveau_screen *screen, gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_ctx)
|
||||
{
|
||||
struct nouveau_context *nctx;
|
||||
@@ -441,7 +442,7 @@ nv10_context_create(struct nouveau_screen *screen, const struct gl_config *visua
|
||||
|
||||
ctx = &nctx->base;
|
||||
|
||||
if (!nouveau_context_init(ctx, screen, visual, share_ctx))
|
||||
if (!nouveau_context_init(ctx, api, screen, visual, share_ctx))
|
||||
goto fail;
|
||||
|
||||
ctx->Extensions.ARB_texture_env_crossbar = true;
|
||||
|
@@ -106,7 +106,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
|
||||
|
||||
/* At least nv11 seems to get sad if we don't do this before
|
||||
* swapping RTs.*/
|
||||
if (context_chipset(ctx) < 0x17) {
|
||||
if (context_eng3d(ctx)->oclass < NV17_3D_CLASS) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
@@ -140,7 +140,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
|
||||
PUSH_MTHDl(push, NV10_3D(ZETA_OFFSET), BUFCTX_FB,
|
||||
s->bo, 0, bo_flags);
|
||||
|
||||
if (context_chipset(ctx) >= 0x17) {
|
||||
if (context_eng3d(ctx)->oclass >= NV17_3D_CLASS) {
|
||||
setup_hierz_buffer(ctx);
|
||||
context_dirty(ctx, ZCLEAR);
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "nouveau_context.h"
|
||||
#include "nouveau_gldefs.h"
|
||||
#include "nouveau_util.h"
|
||||
#include "nv_object.xml.h"
|
||||
#include "nv10_3d.xml.h"
|
||||
#include "nv10_driver.h"
|
||||
|
||||
@@ -120,7 +121,7 @@ nv10_emit_logic_opcode(struct gl_context *ctx, int emit)
|
||||
struct nouveau_pushbuf *push = context_push(ctx);
|
||||
|
||||
assert(!ctx->Color.ColorLogicOpEnabled
|
||||
|| context_chipset(ctx) >= 0x11);
|
||||
|| context_eng3d(ctx)->oclass >= NV15_3D_CLASS);
|
||||
|
||||
BEGIN_NV04(push, NV11_3D(COLOR_LOGIC_OP_ENABLE), 2);
|
||||
PUSH_DATAb(push, ctx->Color.ColorLogicOpEnabled);
|
||||
|
@@ -438,7 +438,8 @@ nv20_context_destroy(struct gl_context *ctx)
|
||||
}
|
||||
|
||||
static struct gl_context *
|
||||
nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visual,
|
||||
nv20_context_create(struct nouveau_screen *screen, gl_api api,
|
||||
const struct gl_config *visual,
|
||||
struct gl_context *share_ctx)
|
||||
{
|
||||
struct nouveau_context *nctx;
|
||||
@@ -452,7 +453,7 @@ nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visua
|
||||
|
||||
ctx = &nctx->base;
|
||||
|
||||
if (!nouveau_context_init(ctx, screen, visual, share_ctx))
|
||||
if (!nouveau_context_init(ctx, api, screen, visual, share_ctx))
|
||||
goto fail;
|
||||
|
||||
ctx->Extensions.ARB_texture_env_crossbar = true;
|
||||
|
@@ -279,12 +279,13 @@ GLboolean r200CreateContext( gl_api api,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
driContextSetFlags(ctx, flags);
|
||||
|
||||
rmesa->radeon.swtcl.RenderIndex = ~0;
|
||||
rmesa->radeon.hw.all_dirty = 1;
|
||||
|
||||
ctx = &rmesa->radeon.glCtx;
|
||||
|
||||
driContextSetFlags(ctx, flags);
|
||||
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext( ctx );
|
||||
|
@@ -242,12 +242,13 @@ r100CreateContext( gl_api api,
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
driContextSetFlags(ctx, flags);
|
||||
|
||||
rmesa->radeon.swtcl.RenderIndex = ~0;
|
||||
rmesa->radeon.hw.all_dirty = GL_TRUE;
|
||||
|
||||
ctx = &rmesa->radeon.glCtx;
|
||||
|
||||
driContextSetFlags(ctx, flags);
|
||||
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext( ctx );
|
||||
|
@@ -1377,6 +1377,7 @@ copy_array_object(struct gl_context *ctx,
|
||||
|
||||
/* _Enabled must be the same than on push */
|
||||
dest->_Enabled = src->_Enabled;
|
||||
dest->NewArrays = src->NewArrays;
|
||||
dest->_MaxElement = src->_MaxElement;
|
||||
}
|
||||
|
||||
|
@@ -360,16 +360,18 @@ _mesa_DrawBuffers(GLsizei n, const GLenum *buffers)
|
||||
return;
|
||||
}
|
||||
|
||||
/* From the OpenGL 3.0 specification, page 259:
|
||||
/* From the OpenGL 4.0 specification, page 256:
|
||||
* "For both the default framebuffer and framebuffer objects, the
|
||||
* constants FRONT, BACK, LEFT, RIGHT, and FRONT_AND_BACK are not
|
||||
* valid in the bufs array passed to DrawBuffers, and will result in
|
||||
* the error INVALID_OPERATION. This restriction is because these
|
||||
* the error INVALID_ENUM. This restriction is because these
|
||||
* constants may themselves refer to multiple buffers, as shown in
|
||||
* table 4.4."
|
||||
* Previous versions of the OpenGL specification say INVALID_OPERATION,
|
||||
* but the Khronos conformance tests expect INVALID_ENUM.
|
||||
*/
|
||||
if (_mesa_bitcount(destMask[output]) > 1) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffersARB(buffer)");
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawBuffersARB(buffer)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -132,7 +132,7 @@ typedef union { GLfloat f; GLint i; GLuint u; } fi_type;
|
||||
#define atanhf(f) ((float) atanh(f))
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1800) /* Not req'd on VS2013 and above */
|
||||
static inline float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
|
||||
static inline float exp2f(float x) { return powf(2.0f, x); }
|
||||
static inline float log2f(float x) { return logf(x) * 1.442695041f; }
|
||||
|
@@ -395,6 +395,7 @@ detach_shader(struct gl_context *ctx, GLuint program, GLuint shader)
|
||||
{
|
||||
for (j = 0; j < shProg->NumShaders; j++) {
|
||||
assert(shProg->Shaders[j]->Type == GL_VERTEX_SHADER ||
|
||||
shProg->Shaders[j]->Type == GL_GEOMETRY_SHADER ||
|
||||
shProg->Shaders[j]->Type == GL_FRAGMENT_SHADER);
|
||||
assert(shProg->Shaders[j]->RefCount > 0);
|
||||
}
|
||||
|
@@ -354,6 +354,7 @@ _mesa_free_shader_program_data(struct gl_context *ctx,
|
||||
}
|
||||
|
||||
free(shProg->Label);
|
||||
shProg->Label = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -130,6 +130,10 @@ get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions,
|
||||
const GLint depth = texImage->Depth;
|
||||
GLint img, row;
|
||||
|
||||
assert(format == GL_DEPTH_STENCIL);
|
||||
assert(type == GL_UNSIGNED_INT_24_8);
|
||||
/* XXX type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV is not handled yet */
|
||||
|
||||
for (img = 0; img < depth; img++) {
|
||||
GLubyte *srcMap;
|
||||
GLint rowstride;
|
||||
@@ -145,8 +149,11 @@ get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions,
|
||||
void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels,
|
||||
width, height, format, type,
|
||||
img, row, 0);
|
||||
/* XXX Z24_S8 vs. S8_Z24??? */
|
||||
memcpy(dest, src, width * sizeof(GLuint));
|
||||
/* Unpack from texture's format to GL's z24_s8 layout */
|
||||
_mesa_unpack_uint_24_8_depth_stencil_row(texImage->TexFormat,
|
||||
width,
|
||||
(const GLuint *) src,
|
||||
dest);
|
||||
if (ctx->Pack.SwapBytes) {
|
||||
_mesa_swap4((GLuint *) dest, width);
|
||||
}
|
||||
|
@@ -1039,6 +1039,9 @@ legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target)
|
||||
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
|
||||
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
|
||||
return ctx->Extensions.ARB_texture_cube_map;
|
||||
case GL_TEXTURE_CUBE_MAP_ARRAY_ARB:
|
||||
case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB:
|
||||
return ctx->Extensions.ARB_texture_cube_map_array;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
case GL_PROXY_TEXTURE_RECTANGLE_NV:
|
||||
return ctx->Extensions.NV_texture_rectangle;
|
||||
|
@@ -867,7 +867,9 @@ st_GetTexImage(struct gl_context * ctx,
|
||||
ubyte *map = NULL;
|
||||
boolean done = FALSE;
|
||||
|
||||
if (!st->prefer_blit_based_texture_transfer) {
|
||||
if (!st->prefer_blit_based_texture_transfer &&
|
||||
!_mesa_is_format_compressed(texImage->TexFormat)) {
|
||||
/* Try to avoid the fallback if we're doing texture decompression here */
|
||||
goto fallback;
|
||||
}
|
||||
|
||||
@@ -1485,6 +1487,12 @@ st_finalize_texture(struct gl_context *ctx,
|
||||
if (tObj->Target == GL_TEXTURE_BUFFER) {
|
||||
struct st_buffer_object *st_obj = st_buffer_object(tObj->BufferObject);
|
||||
|
||||
if (!st_obj) {
|
||||
pipe_resource_reference(&stObj->pt, NULL);
|
||||
pipe_sampler_view_reference(&stObj->sampler_view, NULL);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (st_obj->buffer != stObj->pt) {
|
||||
pipe_resource_reference(&stObj->pt, st_obj->buffer);
|
||||
pipe_sampler_view_release(st->pipe, &stObj->sampler_view);
|
||||
|
Reference in New Issue
Block a user