Compare commits
17 Commits
mesa-8.0.5
...
8.0
Author | SHA1 | Date | |
---|---|---|---|
|
13b415f101 | ||
|
9d6e12eb6b | ||
|
1b2f877c8e | ||
|
f0702d6e63 | ||
|
ba59a779ed | ||
|
629600450b | ||
|
9c50093adf | ||
|
a8ff9a4394 | ||
|
2286bd68a8 | ||
|
db8cb22503 | ||
|
a679e210f4 | ||
|
1c47744e3a | ||
|
0d0675c06d | ||
|
d7c9fcf6bf | ||
|
9cf1afbf8a | ||
|
b4867c24b0 | ||
|
025725e114 |
91
bin/.cherry-ignore
Normal file
91
bin/.cherry-ignore
Normal file
@@ -0,0 +1,91 @@
|
||||
# These commits were cherry picked without using -x.
|
||||
bca6cd2d71ad944031edeacd129eb0031a89c08e scons: Remove Haiku one-offs for gallium drivers
|
||||
efd73f72d8f34a40d6a1cd279fffa48dc13b6e5b mapi/glapi: Never use a generic no-op entry-point on Windows.
|
||||
ab1195cf1127781909d5158c7de68f8732458d75 swrast: Fix implicit declaration warnings
|
||||
e2dce7f7ee3e7da9cbb0bb33307ecd79e824426d intel: Fix rendering from textures after RenderTexture().
|
||||
b4082f492b4b55df4c636445e47b97d1f1e4b5b2 r600g: add support for TN (trinity) APUs
|
||||
5beba3d0ba593b661451217a5ffcdf68644cc903 mesa: use _mesa_rebase_rgba_float/uint() in glGetTexImage code
|
||||
4a269a8dc0170c75ff22af3910786228727ea41e r300/compiler: Clear loop registers in vertex shaders w/o loops
|
||||
73249239cf71e3595ee19f3c1a02b8b0f58994cd r300/compiler: Copy all instruction attributes during local transfoms
|
||||
|
||||
# There's no blorp in the 8.0 branch.
|
||||
32c7b2769cbe80ff56d1c73c4f9b62f13f577c8d i965/blorp: Clarify why width/height must be adjusted for Gen6 IMS surfaces.
|
||||
e14b1288ef5b5b6091facaecd42e86f0a8157f28 i965/blorp: Change gl_renderbuffer* params to intel_renderbuffer*.
|
||||
09b0fa8499d8035fa31ccb2b550056305fbd149b i965/blorp: store surface width/height in brw_blorp_mip_info.
|
||||
c130ce7b2b26b4b67d4bf2b6dd1044a200efe25d i965/blorp: store x and y offsets in brw_blorp_mip_info.
|
||||
3123f0621561549c4566248100661ef77cab2834 i965/blorp: Thread level and layer through brw_blorp_blit_miptrees().
|
||||
f04f219906e40a6647a10fd9c1928509fe25fb84 i965/blorp: Account for offsets when emitting SURFACE_STATE.
|
||||
1a75063d5f829547b75b60ae64bddf3905b4cb8f i965/blorp: don't reduce stencil alignment restrictions when multisampling.
|
||||
5fd67fac14d7f35c311eb5c671be8d4ae9b2ea37 i965/blorp: Reduce alignment restrictions for stencil blits.
|
||||
1a5d4f7cb2367c7863b28efbd78e9169114baf42 i965/blorp: Fix offsets and width/height for stencil blits.
|
||||
a33ce665a5827c598b85bb04d94b33e6a5e41c28 i965/blorp: Increase Y alignment for multisampled stencil blits.
|
||||
124b214f094fa63ff1ddb7e9f0a1c2e0ba8214fb i965/blorp: Fix sRGB MSAA resolves.
|
||||
e2249e8c4d06a85d6389ba1689e15d7e29aa4dff i965/blorp: Add support for blits between SRGB and linear formats.
|
||||
|
||||
# The old generated ES1/ES2 disptach code is still used in 8.0.
|
||||
aa129b0833052f613a6ec570aef092733769ee0e mesa: Don't set dispatch pointer for glPointSize in ES2
|
||||
850412b8ab272b9616da9a0df29e424b07bddde9 mesa: Don't set dispatch pointer for glGetDoublev in ES2
|
||||
11927bfc4a43aefbac5af35aae34d5cdf5d9e6bb mesa: Don't set dispatch pointer for glGetBufferSubData in ES2
|
||||
2a3a68e4c7b15860ac9398c5a56c0d6762573633 mesa: Don't set dispatch pointers for glClearDepth or glDepthRange in ES2
|
||||
1c0a44aaf5c095ca261d1ce11bb8a67dbbce54a2 mesa: Don't set dispatch pointers for glPointParameter[if][v] in ES2
|
||||
a83b01371e60356d2ed69c131bf9e0a0daba59a4 mesa: Don't set dispatch pointer for glResizeBuffersMESA in ES2
|
||||
7f7268d385cc1435264b8d3111e1596b2dae9183 mesa: Don't set dispatch pointer for glGetProgramivARB in ES2
|
||||
ee77061277b640d78befb43c26a3ffbe227e9244 mesa: Don't set dispatch pointer for glTexStorage in ES2
|
||||
3ef9e43865f38e9c8c5681768645513ce26e0488 mesa: Pass GL context to _mesa_create_save_table
|
||||
a13c07f7528c74fc433a7227777351110087b89d mesa: Don't set loopback dispatch pointers for most things in ES2 or core
|
||||
aa0f588e2d4c160879699180f0e7f4d3e52b55b9 mesa: Don't set vtxfmt dispatch pointers for many things in ES2 or core
|
||||
be66cf950e01d217b5341f8e56676dc5bf81ca47 mesa: Don't set shaderapi dispatch pointers for many things in ES2 or core
|
||||
6c01a0e770432eda0e29dbd7278a94efc688a6d3 mesa: Don't set uniform dispatch pointers for many things in ES2 or core
|
||||
8f0b81bf7ddcdf5715a3e00af67395b91f27a243 mesa: don't enable glVertexPointer() when using API_OPENGLES2.
|
||||
51b069e7aa81cdc8f38db71554ae3dd12ce0a6c4 meta: Don't save and restore fog state when there is no fog state
|
||||
|
||||
# The GLSL GenerateMipmaps does not exist in 8.0.
|
||||
299acac849eb8506de9760c94c6e8e8b1046d909 _mesa_meta_GenerateMipmap: Support all texture targets by generating shaders at runtime
|
||||
15bf3103b48a5928321fe56fbb3ed28a0f314418 _mesa_meta_GenerateMipmap: Generate separate shaders for glsl 120 / 130
|
||||
679c93ff89c71cbd3b1d24e88abd38f00b8c1f02 meta: Don't _mesa_set_enable() invalid targets in ES 1.
|
||||
ab097dde0c958dd8b1c06a07ef8913512753760c meta: Remove unsafe global mem_ctx pointer
|
||||
3308c079bd00e9b9aa546f5214ce197a904d059b meta: Rearrange shader creation in setup_glsl_generate_mipmap
|
||||
0242381f06edb09dcf0eaacd6d26ccd8584700cc meta: Don't use GLSL 1.30 shader on OpenGL ES 2
|
||||
eb1d87fb945783448cc40ad43c9cd4d98002d424 meta: Add on demand compilation of per target shader programs
|
||||
|
||||
# There's no dual-source blending in 8.0.
|
||||
354f2cb5c7330a7d43cf0b177daf758d2aa31e0a glsl: Generate compile errors for explicit blend indices < 0 or > 1.
|
||||
ea0d08872724b5e31e9e32db2338e15fdfdcc4de intel/i965: Disable SampleAlphaToOne if dual source blending enabled
|
||||
|
||||
# The S3TC over-ride codes doesn't exist in 8.0
|
||||
328961d95586931a17fe81ba816d362e8389c105 mesa: Don't override S3TC internalFormat if data is pre-compressed.
|
||||
|
||||
# Causes too many regressions... it's not even 9.0
|
||||
413c4914129cd26ca87960852d8c0264c0fb29e7 intel: Improve teximage perf for Google Chrome paint rects (v3)
|
||||
b1d0fe022dc4826dadce014ab8fe062a82f75a16 intel: Fix segfault in intel_texsubimage_tiled_memcpy
|
||||
b5891286202987dfc2606ac716050c0ee426de11 intel: Fix yet-another-bug in intel_texsubimage_tiled_memcpy
|
||||
|
||||
# Fixes bugs caused by pathes not on 8.0.
|
||||
043f66204b1a190e18747c3befa8826c82dd87a7 glapi/glx: rename 'table' variable to 'disp_table'
|
||||
22897c74979aa02facdd5cd729db8dadf86924f5 intel: Don't call intelDestroyContext if there is no context to destroy
|
||||
87f26214d6bdeb439b30615ec53c293c5141cf11 i965: Don't free the intel_context structure when intelCreateContext fails.
|
||||
de958de71b1450952e021af4e729c87406353db6 i915: Don't free the intel_context structure when intelCreateContext fails.
|
||||
7fa0f10cd85ccb5afbc3a961164011de70970ff3 mesa: Flag _NEW_VARYING_VP_INPUTS when TexEnv programs are active.
|
||||
|
||||
# GL_NV_draw_buffers doesn't exist in 8.0.
|
||||
23ff634c9c2eff744b5ddae7d1ba02bc1ef19ac5 gles2: Alias glReadBufferNV with desktop glReadBuffer
|
||||
|
||||
# Introduces performance regressions for other games
|
||||
fa58644855e44830e0b91dc627703c236fa6712a r600g: fix abysmal performance in Reaction Quake
|
||||
|
||||
# Candidates for 9.0 only
|
||||
61706915a3b5644faf7a5e67f47c9c593620bf8c gallium/u_blitter: fix stencil-only blits
|
||||
df5e2c058f73b72909fa99a2a189f5877525e3bf r600g: do not require MSAA renderbuffer support if not asked for
|
||||
2988fa940e1d8a4531fddff4d554eec1e6e04474 draw: fix non-indexed draw calls if there's an index buffer
|
||||
933faae2b8669f459e7ab27d6bcbfb6f4136b6d5 r600g: flush FMASK and CMASK when changing colorbuffers on Evergreen
|
||||
ed8d87c6a641efe8667c0ba580260ffaff5ffc7e radeonsi: add some new SI pci ids
|
||||
7da12426f7682ffc44ae40e31d1b5712521fbb70 build: Use AX_PTHREAD to detect pthreads
|
||||
9ed00075d8ea0ffaa675237e32b8611ad3064dbf build: Link libglapi with pthreads
|
||||
9dfca930d7fcfda6767d3be9b1690d010f08fea5 r600g: fix possible issue with stencil mipmap rendering
|
||||
93eba269351c6e256db3a4cc7c7018f5a3fae5a1 nouveau: use pre-calculated stride for resource_get_handle
|
||||
9a51edfb5af72a7a480f408f02d8ecd98c576b7b Re-add HAVE_PTHREADS preprocessor macro
|
||||
f42518962a08ce927e4ddd233d19d2661e135834 egl_dri2/x11: Fix eglPostSubBufferNV()
|
||||
a3b6b2d3055070da9bf7054fecfd0b171c398eb7 wayland: Destroy frame callback when destroying surface
|
||||
9785ae0973cc206afc36dbc7d5b9553f92d06b47 glsl_to_tgsi: fix dst register for texturing fetches.
|
||||
037b4f80384c72c12e31192d1a30411d4660972d r600g: fix lod bias/explicit lod with cube maps.
|
||||
eabbe5c45f5d05822c5f841628afa4008398d553 mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0
|
@@ -12,8 +12,8 @@ git log --reverse --pretty=%H -i --grep='^[[:space:]]*NOTE: This is a candidate'
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
if [ -f .git/cherry-ignore ] ; then
|
||||
if grep -q ^$sha .git/cherry-ignore ; then
|
||||
if [ -f bin/.cherry-ignore ] ; then
|
||||
if grep -q ^$sha bin/.cherry-ignore ; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
@@ -25,7 +25,9 @@ for DRI hardware acceleration.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
cda5d101f43b8784fa60bdeaca4056f2 MesaLib-8.0.5.tar.gz
|
||||
01305591073a76b65267f69f27d635a3 MesaLib-8.0.5.tar.bz2
|
||||
97f11c00cac8fb98aa0131990086dc8e MesaLib-8.0.5.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
@@ -71,6 +73,8 @@ TBD
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53618">Bug 53618</a> - [Bisected i915]Piglit glx_GLX_ARB_create_context_NULL_attribute_list Aborted</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=53972">Bug 53972</a> - Black Mirror III: too dark</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54183">Bug 54183</a> - [Bisected ILK regression]many piglit/oglc/ogles2 cases Segmentation fault</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54193">Bug 54193</a> - output_components uninitialized in fs_visitor::emit_fb_writes()</li>
|
||||
|
@@ -88,6 +88,12 @@ nvfx_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_MAX_TEXEL_OFFSET:
|
||||
case PIPE_CAP_CONDITIONAL_RENDER:
|
||||
case PIPE_CAP_TEXTURE_BARRIER:
|
||||
case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
|
||||
case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
|
||||
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
|
||||
case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME:
|
||||
case PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS:
|
||||
case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS:
|
||||
return 0;
|
||||
case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
|
||||
return 0;
|
||||
|
@@ -156,6 +156,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
|
||||
fakeCtx.API = API_OPENGL;
|
||||
fakeCtx.Const.GLSLVersion = 130;
|
||||
fakeCtx.Extensions.ARB_ES2_compatibility = true;
|
||||
fakeCtx.Const.ForceGLSLExtensionsWarn = false;
|
||||
gl_shader *sh = _mesa_new_shader(NULL, 0, target);
|
||||
struct _mesa_glsl_parse_state *st =
|
||||
new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);
|
||||
|
@@ -132,8 +132,6 @@ apple_glx_swap_buffers(void *ptr)
|
||||
{
|
||||
struct apple_glx_context *ac = ptr;
|
||||
|
||||
/* This may not be needed with CGLFlushDrawable: */
|
||||
glFlush();
|
||||
apple_cgl.flush_drawable(ac->context_obj);
|
||||
}
|
||||
|
||||
|
@@ -63,6 +63,16 @@ enum
|
||||
MAX_ATTR = 60
|
||||
};
|
||||
|
||||
static char __crashreporter_info_buff__[4096] = { 0 };
|
||||
static const char *__crashreporter_info__ __attribute__((__used__)) =
|
||||
&__crashreporter_info_buff__[0];
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||
// This is actually a toolchain requirement, but I'm not sure the correct check,
|
||||
// but it should be fine to just only include it for Leopard and later. This line
|
||||
// just tells the linker to never strip this symbol (such as for space optimization)
|
||||
__asm__ (".desc ___crashreporter_info__, 0x10");
|
||||
#endif
|
||||
|
||||
void
|
||||
apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * mode,
|
||||
bool * double_buffered, bool * uses_stereo,
|
||||
@@ -72,20 +82,13 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
|
||||
int numattr = 0;
|
||||
GLint vsref = 0;
|
||||
CGLError error = 0;
|
||||
|
||||
/* Request an OpenGL 3.2 profile if one is available */
|
||||
if(apple_cgl.version_major > 1 || (apple_cgl.version_major == 1 && apple_cgl.version_minor >= 3)) {
|
||||
attr[numattr++] = kCGLPFAOpenGLProfile;
|
||||
attr[numattr++] = kCGLOGLPVersion_3_2_Core;
|
||||
}
|
||||
bool use_core_profile = getenv("LIBGL_PROFILE_CORE");
|
||||
|
||||
if (offscreen) {
|
||||
apple_glx_diagnostic
|
||||
("offscreen rendering enabled. Using kCGLPFAOffScreen\n");
|
||||
|
||||
attr[numattr++] = kCGLPFAOffScreen;
|
||||
attr[numattr++] = kCGLPFAColorSize;
|
||||
attr[numattr++] = 32;
|
||||
}
|
||||
else if (getenv("LIBGL_ALWAYS_SOFTWARE") != NULL) {
|
||||
apple_glx_diagnostic
|
||||
@@ -153,14 +156,42 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * m
|
||||
attr[numattr++] = mode->samples;
|
||||
}
|
||||
|
||||
/* Debugging support for Core profiles to support newer versions of OpenGL */
|
||||
if (use_core_profile) {
|
||||
attr[numattr++] = kCGLPFAOpenGLProfile;
|
||||
attr[numattr++] = kCGLOGLPVersion_3_2_Core;
|
||||
}
|
||||
|
||||
attr[numattr++] = 0;
|
||||
|
||||
assert(numattr < MAX_ATTR);
|
||||
|
||||
error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
|
||||
|
||||
if ((error == kCGLBadAttribute || vsref == 0) && use_core_profile) {
|
||||
apple_glx_diagnostic
|
||||
("Trying again without CoreProfile: error=%s, vsref=%d\n", apple_cgl.error_string(error), vsref);
|
||||
|
||||
if (!error)
|
||||
apple_cgl.destroy_pixel_format(*pfobj);
|
||||
|
||||
numattr -= 3;
|
||||
attr[numattr++] = 0;
|
||||
|
||||
error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
fprintf(stderr, "error: %s\n", apple_cgl.error_string(error));
|
||||
snprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__),
|
||||
"CGLChoosePixelFormat error: %s\n", apple_cgl.error_string(error));
|
||||
fprintf(stderr, "%s", __crashreporter_info_buff__);
|
||||
abort();
|
||||
}
|
||||
|
||||
if (!*pfobj) {
|
||||
snprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__),
|
||||
"No matching pixelformats found, perhaps try using LIBGL_ALLOW_SOFTWARE\n");
|
||||
fprintf(stderr, "%s", __crashreporter_info_buff__);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) {
|
||||
|
||||
struct _glapi_table *
|
||||
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
|
||||
struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
|
||||
struct _glapi_table *disp = calloc(1, _glapi_get_dispatch_table_size() * sizeof(_glapi_proc));
|
||||
char symboln[512];
|
||||
|
||||
if(!disp)
|
||||
|
@@ -29,54 +29,71 @@
|
||||
#include "nouveau_array.h"
|
||||
#include "nouveau_bufferobj.h"
|
||||
|
||||
#define EXTRACT(in_t, out_t) extract_func_##in_t##_to_##out_t
|
||||
|
||||
#define EXTRACT_FUNC(in_t, out_t, k) \
|
||||
static out_t EXTRACT(in_t, out_t) \
|
||||
(struct nouveau_array *a, int i, int j) { \
|
||||
in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \
|
||||
\
|
||||
return (out_t)x / (k); \
|
||||
}
|
||||
|
||||
EXTRACT_FUNC(GLchar, unsigned, 1);
|
||||
EXTRACT_FUNC(GLchar, float, SCHAR_MAX);
|
||||
EXTRACT_FUNC(GLubyte, unsigned, 1);
|
||||
EXTRACT_FUNC(GLubyte, float, UCHAR_MAX);
|
||||
EXTRACT_FUNC(GLshort, unsigned, 1);
|
||||
EXTRACT_FUNC(GLshort, float, SHRT_MAX);
|
||||
EXTRACT_FUNC(GLushort, unsigned, 1);
|
||||
EXTRACT_FUNC(GLushort, float, USHRT_MAX);
|
||||
EXTRACT_FUNC(GLint, unsigned, 1);
|
||||
EXTRACT_FUNC(GLint, float, INT_MAX);
|
||||
EXTRACT_FUNC(GLuint, unsigned, 1);
|
||||
EXTRACT_FUNC(GLuint, float, UINT_MAX);
|
||||
EXTRACT_FUNC(GLfloat, unsigned, 1.0 / UINT_MAX);
|
||||
EXTRACT_FUNC(GLfloat, float, 1);
|
||||
|
||||
#undef EXTRACT_FUNC
|
||||
|
||||
static void
|
||||
get_array_extract(struct nouveau_array *a, extract_u_t *extract_u,
|
||||
extract_f_t *extract_f)
|
||||
{
|
||||
#define EXTRACT(in_t, out_t, k) \
|
||||
({ \
|
||||
auto out_t f(struct nouveau_array *, int, int); \
|
||||
out_t f(struct nouveau_array *a, int i, int j) { \
|
||||
in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \
|
||||
\
|
||||
return (out_t)x / (k); \
|
||||
}; \
|
||||
f; \
|
||||
});
|
||||
|
||||
switch (a->type) {
|
||||
case GL_BYTE:
|
||||
*extract_u = EXTRACT(char, unsigned, 1);
|
||||
*extract_f = EXTRACT(char, float, SCHAR_MAX);
|
||||
*extract_u = EXTRACT(GLchar, unsigned);
|
||||
*extract_f = EXTRACT(GLchar, float);
|
||||
break;
|
||||
case GL_UNSIGNED_BYTE:
|
||||
*extract_u = EXTRACT(unsigned char, unsigned, 1);
|
||||
*extract_f = EXTRACT(unsigned char, float, UCHAR_MAX);
|
||||
*extract_u = EXTRACT(GLubyte, unsigned);
|
||||
*extract_f = EXTRACT(GLubyte, float);
|
||||
break;
|
||||
case GL_SHORT:
|
||||
*extract_u = EXTRACT(short, unsigned, 1);
|
||||
*extract_f = EXTRACT(short, float, SHRT_MAX);
|
||||
*extract_u = EXTRACT(GLshort, unsigned);
|
||||
*extract_f = EXTRACT(GLshort, float);
|
||||
break;
|
||||
case GL_UNSIGNED_SHORT:
|
||||
*extract_u = EXTRACT(unsigned short, unsigned, 1);
|
||||
*extract_f = EXTRACT(unsigned short, float, USHRT_MAX);
|
||||
*extract_u = EXTRACT(GLushort, unsigned);
|
||||
*extract_f = EXTRACT(GLushort, float);
|
||||
break;
|
||||
case GL_INT:
|
||||
*extract_u = EXTRACT(int, unsigned, 1);
|
||||
*extract_f = EXTRACT(int, float, INT_MAX);
|
||||
*extract_u = EXTRACT(GLint, unsigned);
|
||||
*extract_f = EXTRACT(GLint, float);
|
||||
break;
|
||||
case GL_UNSIGNED_INT:
|
||||
*extract_u = EXTRACT(unsigned int, unsigned, 1);
|
||||
*extract_f = EXTRACT(unsigned int, float, UINT_MAX);
|
||||
*extract_u = EXTRACT(GLuint, unsigned);
|
||||
*extract_f = EXTRACT(GLuint, float);
|
||||
break;
|
||||
case GL_FLOAT:
|
||||
*extract_u = EXTRACT(float, unsigned, 1.0 / UINT_MAX);
|
||||
*extract_f = EXTRACT(float, float, 1);
|
||||
*extract_u = EXTRACT(GLfloat, unsigned);
|
||||
*extract_f = EXTRACT(GLfloat, float);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
#undef EXTRACT
|
||||
|
||||
void
|
||||
nouveau_init_array(struct nouveau_array *a, int attr, int stride,
|
||||
|
@@ -97,52 +97,49 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static void
|
||||
dispatch_l(struct gl_context *ctx, unsigned int start, int delta,
|
||||
unsigned int n)
|
||||
{
|
||||
struct nouveau_channel *chan = context_chan(ctx);
|
||||
RENDER_LOCALS(ctx);
|
||||
|
||||
EMIT_VBO(L, ctx, start, delta, n);
|
||||
}
|
||||
|
||||
static void
|
||||
dispatch_i32(struct gl_context *ctx, unsigned int start, int delta,
|
||||
unsigned int n)
|
||||
{
|
||||
struct nouveau_channel *chan = context_chan(ctx);
|
||||
RENDER_LOCALS(ctx);
|
||||
|
||||
EMIT_VBO(I32, ctx, start, delta, n);
|
||||
}
|
||||
|
||||
static void
|
||||
dispatch_i16(struct gl_context *ctx, unsigned int start, int delta,
|
||||
unsigned int n)
|
||||
{
|
||||
struct nouveau_channel *chan = context_chan(ctx);
|
||||
RENDER_LOCALS(ctx);
|
||||
|
||||
EMIT_VBO(I32, ctx, start, delta, n & 1);
|
||||
EMIT_VBO(I16, ctx, start, delta, n & ~1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Select an appropriate dispatch function for the given index buffer.
|
||||
*/
|
||||
static dispatch_t
|
||||
get_array_dispatch(struct nouveau_array *a)
|
||||
{
|
||||
if (!a->fields) {
|
||||
auto void f(struct gl_context *, unsigned int, int, unsigned int);
|
||||
|
||||
void f(struct gl_context *ctx, unsigned int start, int delta,
|
||||
unsigned int n) {
|
||||
struct nouveau_channel *chan = context_chan(ctx);
|
||||
RENDER_LOCALS(ctx);
|
||||
|
||||
EMIT_VBO(L, ctx, start, delta, n);
|
||||
};
|
||||
|
||||
return f;
|
||||
|
||||
} else if (a->type == GL_UNSIGNED_INT) {
|
||||
auto void f(struct gl_context *, unsigned int, int, unsigned int);
|
||||
|
||||
void f(struct gl_context *ctx, unsigned int start, int delta,
|
||||
unsigned int n) {
|
||||
struct nouveau_channel *chan = context_chan(ctx);
|
||||
RENDER_LOCALS(ctx);
|
||||
|
||||
EMIT_VBO(I32, ctx, start, delta, n);
|
||||
};
|
||||
|
||||
return f;
|
||||
|
||||
} else {
|
||||
auto void f(struct gl_context *, unsigned int, int, unsigned int);
|
||||
|
||||
void f(struct gl_context *ctx, unsigned int start, int delta,
|
||||
unsigned int n) {
|
||||
struct nouveau_channel *chan = context_chan(ctx);
|
||||
RENDER_LOCALS(ctx);
|
||||
|
||||
EMIT_VBO(I32, ctx, start, delta, n & 1);
|
||||
EMIT_VBO(I16, ctx, start, delta, n & ~1);
|
||||
};
|
||||
|
||||
return f;
|
||||
}
|
||||
if (!a->fields)
|
||||
return dispatch_l;
|
||||
else if (a->type == GL_UNSIGNED_INT)
|
||||
return dispatch_i32;
|
||||
else
|
||||
return dispatch_i16;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -993,7 +993,8 @@ _mesa_PopAttrib(void)
|
||||
_mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
|
||||
|
||||
/* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
|
||||
_mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB, color->sRGBEnabled);
|
||||
if (ctx->Extensions.EXT_framebuffer_sRGB)
|
||||
_mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB, color->sRGBEnabled);
|
||||
}
|
||||
break;
|
||||
case GL_CURRENT_BIT:
|
||||
|
@@ -1251,11 +1251,12 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
|
||||
switch (target) {
|
||||
case GL_PROXY_TEXTURE_1D:
|
||||
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
|
||||
if (width < 2 * border || width > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (level >= ctx->Const.MaxTextureLevels)
|
||||
return GL_FALSE;
|
||||
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); /* level zero size */
|
||||
maxSize >>= level; /* level size */
|
||||
if (width < 2 * border || width > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
|
||||
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
|
||||
return GL_FALSE;
|
||||
@@ -1263,13 +1264,14 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_PROXY_TEXTURE_2D:
|
||||
if (level >= ctx->Const.MaxTextureLevels)
|
||||
return GL_FALSE;
|
||||
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
|
||||
maxSize >>= level;
|
||||
if (width < 2 * border || width > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (height < 2 * border || height > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (level >= ctx->Const.MaxTextureLevels)
|
||||
return GL_FALSE;
|
||||
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
|
||||
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
|
||||
return GL_FALSE;
|
||||
@@ -1279,15 +1281,16 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_PROXY_TEXTURE_3D:
|
||||
if (level >= ctx->Const.Max3DTextureLevels)
|
||||
return GL_FALSE;
|
||||
maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1);
|
||||
maxSize >>= level;
|
||||
if (width < 2 * border || width > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (height < 2 * border || height > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (depth < 2 * border || depth > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (level >= ctx->Const.Max3DTextureLevels)
|
||||
return GL_FALSE;
|
||||
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
|
||||
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
|
||||
return GL_FALSE;
|
||||
@@ -1299,23 +1302,24 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_PROXY_TEXTURE_RECTANGLE_NV:
|
||||
if (level != 0)
|
||||
return GL_FALSE;
|
||||
maxSize = ctx->Const.MaxTextureRectSize;
|
||||
if (width < 0 || width > maxSize)
|
||||
return GL_FALSE;
|
||||
if (height < 0 || height > maxSize)
|
||||
return GL_FALSE;
|
||||
if (level != 0)
|
||||
return GL_FALSE;
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
|
||||
if (level >= ctx->Const.MaxCubeTextureLevels)
|
||||
return GL_FALSE;
|
||||
maxSize = 1 << (ctx->Const.MaxCubeTextureLevels - 1);
|
||||
maxSize >>= level;
|
||||
if (width < 2 * border || width > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (height < 2 * border || height > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (level >= ctx->Const.MaxCubeTextureLevels)
|
||||
return GL_FALSE;
|
||||
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
|
||||
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
|
||||
return GL_FALSE;
|
||||
@@ -1325,13 +1329,14 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
|
||||
if (level >= ctx->Const.MaxTextureLevels)
|
||||
return GL_FALSE;
|
||||
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
|
||||
maxSize >>= level;
|
||||
if (width < 2 * border || width > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (height < 1 || height > ctx->Const.MaxArrayTextureLayers)
|
||||
return GL_FALSE;
|
||||
if (level >= ctx->Const.MaxTextureLevels)
|
||||
return GL_FALSE;
|
||||
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
|
||||
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
|
||||
return GL_FALSE;
|
||||
@@ -1339,15 +1344,16 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
|
||||
return GL_TRUE;
|
||||
|
||||
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
|
||||
if (level >= ctx->Const.MaxTextureLevels)
|
||||
return GL_FALSE;
|
||||
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
|
||||
maxSize >>= level;
|
||||
if (width < 2 * border || width > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (height < 2 * border || height > 2 * border + maxSize)
|
||||
return GL_FALSE;
|
||||
if (depth < 1 || depth > ctx->Const.MaxArrayTextureLayers)
|
||||
return GL_FALSE;
|
||||
if (level >= ctx->Const.MaxTextureLevels)
|
||||
return GL_FALSE;
|
||||
if (!ctx->Extensions.ARB_texture_non_power_of_two) {
|
||||
if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
|
||||
return GL_FALSE;
|
||||
|
Reference in New Issue
Block a user