Re: [Mesa-dev] [PATCH] build/glsl: fix android build
On 08/17/2012 01:05 AM, Matt Turner wrote: On Thu, Aug 16, 2012 at 2:13 AM, Tapani Pälli tapani.pa...@intel.com wrote: Commit 77a3efc6b907943903190b385fdf107c4acfcdca broke android build that sets its own value for GLSL_SRCDIR. Patch sets the value in Makefile.sources only if it is not defined previously. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/glsl/Makefile.sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources index aafb53e..1529b12 100644 --- a/src/glsl/Makefile.sources +++ b/src/glsl/Makefile.sources @@ -1,6 +1,6 @@ # shared source lists for Makefile, SConscript, and Android.mk -GLSL_SRCDIR = $(top_srcdir)/src/glsl +GLSL_SRCDIR ?= $(top_srcdir)/src/glsl GLSL_BUILDDIR = $(top_builddir)/src/glsl # libglcpp -- 1.7.11.4 This looks like it should work, but (at least on my machine) leaves GLSL_SRCDIR undefined and breaks the autotools build. argh, it seems I'm trying to use a gnumake condition with automake here, also ifeq type of conditional would not work. I'll try to come up with an alternative. Sorry about the Android breakage. Chad asked if the patch you mention broke anything, but I never heard back. no problem, we can fix it! -- // Tapani signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH weston] compositor: add support for OES_EGL_image_external
On Thu, 16 Aug 2012 17:28:20 -0500 Rob Clark rob.cl...@linaro.org wrote: From: Rob Clark r...@ti.com In cases where the GPU can natively handle certain YUV formats, eglQueryWaylandBufferWL() can return the value EGL_TEXTURE_EXTERNAL_WL and the compositor will treat the buffer as a single egl-image-external. See: http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt v1: original v2: rename EGL_TEXTURE_EXTERNAL_OES - EGL_TEXTURE_EXTERNAL_WL and query for the extension Signed-off-by: Rob Clark r...@ti.com Looks good to me now. The only thing I could still say is that maybe it would be nice to log a warning, if the extension is not detected, but querySurface still returns EGL_TEXTURE_EXTERNAL_WL. Hmm, that reminds me, I don't think we have any EGL or GL error reporting in Weston... but that's a whole different story. Thanks, pq --- src/compositor.c | 47 +-- src/compositor.h |2 ++ src/weston-egl-ext.h |1 + 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index b2a3ae9..5c6782e 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -719,14 +719,14 @@ ensure_textures(struct weston_surface *es, int num_textures) for (i = es-num_textures; i num_textures; i++) { glGenTextures(1, es-textures[i]); - glBindTexture(GL_TEXTURE_2D, es-textures[i]); - glTexParameteri(GL_TEXTURE_2D, + glBindTexture(es-target, es-textures[i]); + glTexParameteri(es-target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, + glTexParameteri(es-target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); } es-num_textures = num_textures; - glBindTexture(GL_TEXTURE_2D, 0); + glBindTexture(es-target, 0); } static void @@ -771,6 +771,7 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) if (wl_buffer_is_shm(buffer)) { es-pitch = wl_shm_buffer_get_stride(buffer) / 4; es-shader = ec-texture_shader_rgba; + es-target = GL_TEXTURE_2D; ensure_textures(es, 1); glBindTexture(GL_TEXTURE_2D, es-textures[0]); @@ -786,7 +787,7 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) for (i = 0; i es-num_images; i++) ec-destroy_image(ec-egl_display, es-images[i]); es-num_images = 0; - + es-target = GL_TEXTURE_2D; switch (format) { case EGL_TEXTURE_RGB: case EGL_TEXTURE_RGBA: @@ -794,6 +795,11 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) num_planes = 1; es-shader = ec-texture_shader_rgba; break; + case EGL_TEXTURE_EXTERNAL_WL: + num_planes = 1; + es-target = GL_TEXTURE_EXTERNAL_OES; + es-shader = ec-texture_shader_egl_external; + break; case EGL_TEXTURE_Y_UV_WL: num_planes = 2; es-shader = ec-texture_shader_y_uv; @@ -824,8 +830,8 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) es-num_images++; glActiveTexture(GL_TEXTURE0 + i); - glBindTexture(GL_TEXTURE_2D, es-textures[i]); - ec-image_target_texture_2d(GL_TEXTURE_2D, + glBindTexture(es-target, es-textures[i]); + ec-image_target_texture_2d(es-target, es-images[i]); } @@ -942,9 +948,9 @@ weston_surface_draw(struct weston_surface *es, struct weston_output *output, for (i = 0; i es-num_textures; i++) { glUniform1i(es-shader-tex_uniforms[i], i); glActiveTexture(GL_TEXTURE0 + i); - glBindTexture(GL_TEXTURE_2D, es-textures[i]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); + glBindTexture(es-target, es-textures[i]); + glTexParameteri(es-target, GL_TEXTURE_MIN_FILTER, filter); + glTexParameteri(es-target, GL_TEXTURE_MAG_FILTER, filter); } v = ec-vertices.data; @@ -2842,6 +2848,19 @@ static const char texture_fragment_shader_rgba[] = FRAGMENT_SHADER_EXIT }\n; +static const char texture_fragment_shader_egl_external[] = + #extension GL_OES_EGL_image_external : require\n + precision mediump float;\n + varying vec2 v_texcoord;\n + uniform
[Mesa-dev] parallel build failure in glsl
This was in a make -j16 on a machine with automake-1.11, maybe our personal yacc rule is failing or something. I'm not sure how reproducible it is. Dave. gmake[2]: Leaving directory `/builddir/build/BUILD/mesa-20120816/src/mapi/es2api' Making all in glsl gmake[2]: Entering directory `/builddir/build/BUILD/mesa-20120816/src/glsl' GEN glsl_parser.h CC hash_table.o CC symbol_table.o CXX standalone_scaffolding.o CXX main.o CXX builtin_stubs.o LEX glsl_lexer.cc GEN glsl_parser.cc CC strtod.lo CC ralloc.lo CXX ast_expr.lo CXX ast_function.lo CXX ast_to_hir.lo CXX ast_type.lo CXX builtin_variables.lo CXX glsl_parser_extras.lo conflicts: 1 shift/reduce conflicts: 1 shift/reduce CXX glsl_types.lo CXX glsl_symbol_table.lo ../../src/glsl/glsl_parser_extras.cpp:36:25: fatal error: glsl_parser.h: No such file or directory compilation terminated. CXX hir_field_selection.lo CXX ir_basic_block.lo CXX ir_builder.lo CXX ir_clone.lo CXX ir_constant_expression.lo CXX ir.lo CXX ir_expression_flattening.lo CXX ir_function_can_inline.lo ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa/dlopen: use HAVE_DLOPEN instead of _GNU_SOURCE
On 08/16/2012 09:15 PM, Matt Turner wrote: On Thu, Aug 16, 2012 at 3:59 AM, Tapani Pälli tapani.pa...@intel.com wrote: Patches changes mesa to use 'HAVE_DLOPEN' defined by configure and Android.mk instead of _GNU_SOURCE for detecting dlopen capability. This makes dlopen to work also on Android where _GNU_SOURCE is not defined. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- Android.common.mk | 4 +++- configure.ac | 5 +++-- src/mesa/main/dlopen.c | 8 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Android.common.mk b/Android.common.mk index e8b9006..1e9f040 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -47,7 +47,9 @@ LOCAL_CFLAGS += \ ifeq ($(strip $(MESA_ENABLE_ASM)),true) ifeq ($(TARGET_ARCH),x86) LOCAL_CFLAGS += \ - -DUSE_X86_ASM + -DUSE_X86_ASM \ + -DHAVE_DLOPEN \ + endif endif diff --git a/configure.ac b/configure.ac index 0329bad..5174280 100644 --- a/configure.ac +++ b/configure.ac @@ -503,8 +503,9 @@ MESA_PIC_FLAGS dnl Check to see if dlopen is in default libraries (like Solaris, which dnl has it in libc), or if libdl is needed to get it. -AC_CHECK_FUNC([dlopen], [], -[AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS=-ldl])]) +AC_CHECK_FUNC([dlopen], [DEFINES=$DEFINES -DHAVE_DLOPEN], +[AC_CHECK_LIB([dl], [dlopen], + [DEFINES=$DEFINES -DHAVE_DLOPEN; DLOPEN_LIBS=-ldl])]) AC_SUBST([DLOPEN_LIBS]) dnl See if posix_memalign is available diff --git a/src/mesa/main/dlopen.c b/src/mesa/main/dlopen.c index 57a3329..30fcd1d 100644 --- a/src/mesa/main/dlopen.c +++ b/src/mesa/main/dlopen.c @@ -31,7 +31,7 @@ #include compiler.h #include dlopen.h -#if defined(_GNU_SOURCE) !defined(__MINGW32__) !defined(__blrts) +#if defined(HAVE_DLOPEN) !defined(__MINGW32__) !defined(__blrts) I imagine that __MINGW32__ and __blrts (whatever that is) are special-cased because they define _GNU_SOURCE, but don't have dlopen. It'd probably be okay to simplify that to just #if defined(HAVE_DLOPEN) and let configure.ac decide if dlopen is available. I don't think that mingw32 build has _GNU_SOURCE defined, check the conditions in dlclose() for example, there the current assumption is that they are mutually exclusive. Otherwise, seems reasonable. Acked-by: Matt Turner matts...@gmail.com (send an updated patch and I'll commit it for you) -- // Tapani signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] build/glsl: fix android build v2
Commit 77a3efc6b907943903190b385fdf107c4acfcdca broke android build that sets its own value for GLSL_SRCDIR before including Makefile.sources. Patch moves overriding the value after include, this works as GLSL_SRCDIR variable gets expanded only later. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/glsl/Android.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk index 66c8bec..87a02f5 100644 --- a/src/glsl/Android.mk +++ b/src/glsl/Android.mk @@ -25,9 +25,9 @@ LOCAL_PATH := $(call my-dir) -GLSL_SRCDIR = . include $(LOCAL_PATH)/Makefile.sources +GLSL_SRCDIR = . # --- # Build libmesa_glsl # --- -- 1.7.11.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] egl_dri2: Fix checking DRI version in the swrast driver
--- src/egl/drivers/dri2/egl_dri2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 423d18d..a6ee9e1 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -481,7 +481,8 @@ dri2_setup_screen(_EGLDisplay *disp) assert(dri2_dpy-dri2 || dri2_dpy-swrast); disp-Extensions.KHR_surfaceless_context = EGL_TRUE; - if (dri2_dpy-dri2-base.version = 3) { + if ((dri2_dpy-dri2 dri2_dpy-dri2-base.version = 3) || + dri2_dpy-swrast-base.version = 3) { disp-Extensions.KHR_create_context = EGL_TRUE; if (dri2_dpy-robustness) -- 1.7.11.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 24207] Extension for S3TC decompression only
https://bugs.freedesktop.org/show_bug.cgi?id=24207 --- Comment #9 from antistress thibaut.beth...@gmail.com 2012-08-17 10:28:34 UTC --- about the the potential legal problem pointed by Ian Romanick, has anyone noticed that Firefox 15 will support the WEBGL_compressed_texture_s3tc extension [1] ? Does anyone know what is Mozilla's position regarding this situation ? [1] https://developer.mozilla.org/en-US/docs/Firefox_15_for_developers -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 50754] Building 32 bit mesa on 64 bit OS fails since change for automake
https://bugs.freedesktop.org/show_bug.cgi?id=50754 --- Comment #8 from Tapani Pälli lem...@gmail.com 2012-08-17 10:45:33 UTC --- Created attachment 65690 -- https://bugs.freedesktop.org/attachment.cgi?id=65690 hopeful fix attached patch fixes the issue for me -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 0/2] Add VA-API / EGL interoperability
Hi, This patch series implements the new VA/EGL API for Intel Gen graphics. That's based on the Wayland work but applicable more generically to VA-API. So, the first patch just moves Wayland buffer format descriptors to something more general. The second patch actually implements the VA/EGL API. The same EGL tokens than for Wayland are re-used since they represent the same things. Regards, Gwenole Beauchesne (2): egl_dri2: move DRI image descriptors to common code. egl: add initial implementation for VA/EGL interop. configure.ac | 27 include/EGL/eglmesaext.h |9 ++ src/egl/drivers/dri2/Makefile.am |1 + src/egl/drivers/dri2/egl_dri2.c | 268 +++--- src/egl/drivers/dri2/egl_dri2.h |5 + src/egl/main/eglimage.c |8 ++ src/egl/main/eglimage.h |4 + 7 files changed, 278 insertions(+), 44 deletions(-) -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] egl: add initial implementation for VA/EGL interop.
Signed-off-by: Gwenole Beauchesne gwenole.beauche...@intel.com --- configure.ac | 27 +++ include/EGL/eglmesaext.h |9 +++ src/egl/drivers/dri2/Makefile.am |1 + src/egl/drivers/dri2/egl_dri2.c | 155 ++ src/egl/drivers/dri2/egl_dri2.h |5 ++ src/egl/main/eglimage.c |8 ++ src/egl/main/eglimage.h |4 + 7 files changed, 209 insertions(+) diff --git a/configure.ac b/configure.ac index 89686b4..a177abe 100644 --- a/configure.ac +++ b/configure.ac @@ -604,6 +604,11 @@ AC_ARG_ENABLE([va], [enable va library @:@default=auto@:@])], [enable_va=$enableval], [enable_va=auto]) +AC_ARG_ENABLE([vaapi], + [AS_HELP_STRING([--enable-vaapi-egl], + [enable VA/EGL interop @:@default=auto@:@])], + [enable_vaapi_egl=$enableval], + [enable_vaapi_egl=yes]) AC_ARG_ENABLE([opencl], [AS_HELP_STRING([--enable-opencl], [enable OpenCL library @:@default=no@:@])], @@ -1558,6 +1563,27 @@ if test x$enable_va = xyes; then fi dnl +dnl VA-API / EGL interop +dnl + +if test x$enable_egl != xyes; then +enable_vaapi_egl=no +fi +if test x$enable_vaapi_egl = xyes; then +PKG_CHECK_MODULES([LIBVA_EGL], [libva-egl], [:], [enable_vaapi_egl=no]) +fi +if test x$enable_vaapi_egl = xyes; then +saved_CPPFLAGS=$CPPFLAGS +CPPFLAGS=$CPPFLAGS $LIBVA_EGL_CFLAGS +AC_CHECK_HEADERS([va/va_egl.h], [:], [enable_vaapi_egl=no]) +AC_CHECK_HEADERS([va/va_backend_egl.h], [:], [enable_vaapi_egl=no]) +CPPFLAGS=$saved_CPPFLAGS +fi +if test x$enable_vaapi_egl = xyes; then +DEFINES=$DEFINES -DHAVE_VA_EGL_INTEROP +fi + +dnl dnl OpenCL configuration dnl @@ -2252,6 +2278,7 @@ if test $enable_egl = yes; then else echo EGL drivers:$egl_drivers fi +echo VA/EGL interop: $enable_vaapi_egl fi echo diff --git a/include/EGL/eglmesaext.h b/include/EGL/eglmesaext.h index d476d18..82b5652 100644 --- a/include/EGL/eglmesaext.h +++ b/include/EGL/eglmesaext.h @@ -153,6 +153,15 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EG #define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */ #endif +#ifndef EGL_INTEL_VA_pixel_buffer +#define EGL_INTEL_VA_pixel_buffer 1 + +#define EGL_VA_PIXEL_BUFFER_INTEL 0x31DB /* eglCreateImageKHR target */ +#define EGL_VA_BUFFER_PLANE_INTEL 0x31D6 /* eglCreateImageKHR attribute */ +#define EGL_VA_BUFFER_STRUCTURE_INTEL 0x3080 /* eglCreateImageKHR attribute */ +#define EGL_VA_PICTURE_STRUCTURE_INTEL 0x31DA /* eglCreateImageKHR attribute */ +#endif + #ifdef __cplusplus } #endif diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am index 49ec06b..c11ee3c 100644 --- a/src/egl/drivers/dri2/Makefile.am +++ b/src/egl/drivers/dri2/Makefile.am @@ -30,6 +30,7 @@ AM_CFLAGS = \ $(DEFINES) \ $(LIBDRM_CFLAGS) \ $(LIBUDEV_CFLAGS) \ +$(LIBVA_EGL_CFLAGS) \ -DDEFAULT_DRIVER_DIR=\$(DRI_DRIVER_SEARCH_DIR)\ noinst_LTLIBRARIES = libegl_dri2.la diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 464f768..fb9f91e 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1175,6 +1175,157 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx, } #endif +#ifdef HAVE_VA_EGL_INTEROP +/* Ensure the DRIimage is attached to the VA/EGL client buffer */ +static __DRIimage * +dri2_va_reference_buffer(_EGLDisplay *disp, struct va_egl_client_buffer *buffer) +{ + struct dri2_egl_display * const dri2_dpy = dri2_egl_display(disp); + int format, stride; + + switch (buffer-format) { + case VA_EGL_PIXEL_FORMAT_ARGB: + format = __DRI_IMAGE_FORMAT_ARGB; + stride = buffer-pitches[0] / 4; + break; + case VA_EGL_PIXEL_FORMAT_XRGB: + format = __DRI_IMAGE_FORMAT_XRGB; + stride = buffer-pitches[0] / 4; + break; + case VA_EGL_PIXEL_FORMAT_ABGR: + format = __DRI_IMAGE_FORMAT_ABGR; + stride = buffer-pitches[0] / 4; + break; + case VA_EGL_PIXEL_FORMAT_NV12: + case VA_EGL_PIXEL_FORMAT_YUV410P: + case VA_EGL_PIXEL_FORMAT_YUV411P: + case VA_EGL_PIXEL_FORMAT_YUV420P: + case VA_EGL_PIXEL_FORMAT_YUV422P: + case VA_EGL_PIXEL_FORMAT_YUV444P: + format = __DRI_IMAGE_FORMAT_NONE; + stride = buffer-pitches[0]; + break; + default: + _eglLog(_EGL_DEBUG, DRI2-VA: failed to validate pixel format %d, + buffer-format); + return NULL; + } + return dri2_dpy-image-createImageFromName(dri2_dpy-dri_screen, + buffer-width, + buffer-height, + format, + buffer-handle, + stride, +
[Mesa-dev] [PATCH 1/2] egl_dri2: move DRI image descriptors to common code.
Define common a dri_image_descriptor data structure that holds the structure of supported DRIimage formats in Mesa. This is mostly useful to describe multi-planar YUV buffer formats, e.g. for Wayland. Signed-off-by: Gwenole Beauchesne gwenole.beauche...@intel.com --- src/egl/drivers/dri2/egl_dri2.c | 113 --- 1 file changed, 69 insertions(+), 44 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index a78ee8b..464f768 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1030,17 +1030,8 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx, return dri2_create_image(disp, dri_image); } -#ifdef HAVE_WAYLAND_PLATFORM - -/* This structure describes how a wl_buffer maps to one or more - * __DRIimages. A wl_drm_buffer stores the wl_drm format code and the - * offsets and strides of the planes in the buffer. This table maps a - * wl_drm format code to a description of the planes in the buffer - * that lets us create a __DRIimage for each of the planes. */ - -static const struct wl_drm_format_descriptor { - uint32_t wl_format; - EGLint components; +struct dri_image_descriptor { + EGLint format; int nplanes; struct { int buffer_index; @@ -1049,45 +1040,55 @@ static const struct wl_drm_format_descriptor { uint32_t dri_format; int cpp; } planes[3]; -} wl_drm_formats[] = { - { WL_DRM_FORMAT_ARGB, EGL_TEXTURE_RGBA, 1, - { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 }, } }, +}; + +static const struct dri_image_descriptor dri_image_desc_ARGB = + { EGL_TEXTURE_RGBA, 1, + { { 0, 0, 0, __DRI_IMAGE_FORMAT_ARGB, 4 }, } }; - { WL_DRM_FORMAT_XRGB, EGL_TEXTURE_RGB, 1, - { { 0, 0, 0, __DRI_IMAGE_FORMAT_XRGB, 4 }, } }, +static const struct dri_image_descriptor dri_image_desc_XRGB = + { EGL_TEXTURE_RGB, 1, + { { 0, 0, 0, __DRI_IMAGE_FORMAT_XRGB, 4 }, } }; - { WL_DRM_FORMAT_YUV410, EGL_TEXTURE_Y_U_V_WL, 3, +static const struct dri_image_descriptor dri_image_desc_YUV410 = + { EGL_TEXTURE_Y_U_V_WL, 3, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, { 1, 2, 2, __DRI_IMAGE_FORMAT_R8, 1 }, - { 2, 2, 2, __DRI_IMAGE_FORMAT_R8, 1 } } }, + { 2, 2, 2, __DRI_IMAGE_FORMAT_R8, 1 } } }; - { WL_DRM_FORMAT_YUV411, EGL_TEXTURE_Y_U_V_WL, 3, +static const struct dri_image_descriptor dri_image_desc_YUV411 = + { EGL_TEXTURE_Y_U_V_WL, 3, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, { 1, 2, 0, __DRI_IMAGE_FORMAT_R8, 1 }, - { 2, 2, 0, __DRI_IMAGE_FORMAT_R8, 1 } } }, + { 2, 2, 0, __DRI_IMAGE_FORMAT_R8, 1 } } }; - { WL_DRM_FORMAT_YUV420, EGL_TEXTURE_Y_U_V_WL, 3, +static const struct dri_image_descriptor dri_image_desc_YUV420 = + { EGL_TEXTURE_Y_U_V_WL, 3, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, { 1, 1, 1, __DRI_IMAGE_FORMAT_R8, 1 }, - { 2, 1, 1, __DRI_IMAGE_FORMAT_R8, 1 } } }, + { 2, 1, 1, __DRI_IMAGE_FORMAT_R8, 1 } } }; - { WL_DRM_FORMAT_YUV422, EGL_TEXTURE_Y_U_V_WL, 3, +static const struct dri_image_descriptor dri_image_desc_YUV422 = + { EGL_TEXTURE_Y_U_V_WL, 3, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, { 1, 1, 0, __DRI_IMAGE_FORMAT_R8, 1 }, - { 2, 1, 0, __DRI_IMAGE_FORMAT_R8, 1 } } }, + { 2, 1, 0, __DRI_IMAGE_FORMAT_R8, 1 } } }; - { WL_DRM_FORMAT_YUV444, EGL_TEXTURE_Y_U_V_WL, 3, +static const struct dri_image_descriptor dri_image_desc_YUV444 = + { EGL_TEXTURE_Y_U_V_WL, 3, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, { 1, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, - { 2, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 } } }, + { 2, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 } } }; - { WL_DRM_FORMAT_NV12, EGL_TEXTURE_Y_UV_WL, 2, +static const struct dri_image_descriptor dri_image_desc_NV12 = + { EGL_TEXTURE_Y_UV_WL, 2, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, - { 1, 1, 1, __DRI_IMAGE_FORMAT_GR88, 2 } } }, + { 1, 1, 1, __DRI_IMAGE_FORMAT_GR88, 2 } } }; - { WL_DRM_FORMAT_NV16, EGL_TEXTURE_Y_UV_WL, 2, +static const struct dri_image_descriptor dri_image_desc_NV16 = + { EGL_TEXTURE_Y_UV_WL, 2, { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 }, - { 1, 1, 0, __DRI_IMAGE_FORMAT_GR88, 2 } } }, + { 1, 1, 0, __DRI_IMAGE_FORMAT_GR88, 2 } } }; /* For YUYV buffers, we set up two overlapping DRI images and treat * them as planar buffers in the compositors. Plane 0 is GR88 and @@ -1097,9 +1098,33 @@ static const struct wl_drm_format_descriptor { * texture sampler interpolate the Y components correctly when * sampling from plane 0, and interpolate U and V correctly when * sampling from plane 1. */ - { WL_DRM_FORMAT_YUYV, EGL_TEXTURE_Y_XUXV_WL, 2, +static const struct dri_image_descriptor dri_image_desc_YUYV = + { EGL_TEXTURE_Y_XUXV_WL, 2, { { 0, 0, 0, __DRI_IMAGE_FORMAT_GR88, 2 }, - { 0, 1, 0, __DRI_IMAGE_FORMAT_ARGB, 4 } } } + { 0, 1, 0,
[Mesa-dev] [PATCH] st/mesa: fix sampler view counting
In the past, when we called pipe::set_sampler_views(n) the drivers set samplers [n..MAX] to NULL. We no longer do that. The state tracker code was already trying to set unused sampler views to NULL to cover that case, but the logic was broken and unnoticed until now. This patch fixes it. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53617 --- src/mesa/state_tracker/st_atom_texture.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 6e2efd9..df05e83 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -265,7 +265,7 @@ update_textures(struct st_context *st, { const GLuint old_max = *num_textures; GLbitfield samplers_used = prog-SamplersUsed; - GLuint unit; + GLuint unit, new_count; if (samplers_used == 0x0 old_max == 0) return; @@ -294,9 +294,16 @@ update_textures(struct st_context *st, pipe_sampler_view_reference((sampler_views[unit]), sampler_view); } + /* Ex: if old_max = 3 and *num_textures = 1, we need to pass an +* array of views={X, NULL, NULL} to unref the old texture views +* at positions [1] and [2]. +*/ + new_count = MAX2(*num_textures, old_max); + assert(new_count = max_units); + cso_set_sampler_views(st-cso_context, shader_stage, - MIN2(*num_textures, max_units), + new_count, sampler_views); } -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53616] [softpipe] sp_state_derived.c:308:update_polygon_stipple_enable: Assertion `unit = softpipe-num_samplers[1]' failed.
https://bugs.freedesktop.org/show_bug.cgi?id=53616 Brian Paul brian.e.p...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Brian Paul brian.e.p...@gmail.com 2012-08-17 15:09:15 UTC --- The assertion is invalid and I've removed it in commit f69273f9522a0c1486cf1870e35b3a16516f7233 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: do more teximage error checking for generic compressed formats
Am 16.08.2012 23:29, schrieb Anuj Phogat: On Thu, Aug 16, 2012 at 10:23 AM, Brian Paul bri...@vmware.com wrote: On 08/15/2012 02:31 PM, Anuj Phogat wrote: On Tue, May 1, 2012 at 2:07 PM, Brian Paul bri...@vmware.com mailto:bri...@vmware.com wrote: When glTexImage or glCopyTexImage is called with internalFormat being a generic compressed format (like GL_COMPRESSED_RGB) we need to do the same error checks as for specific compressed formats. In particular, check if the texture target is compatible with the format. None of the texture compression formats we support so far work with GL_TEXTURE_1D, for example. See also https://bugs.freedesktop.org/show_bug.cgi?id=49124 Brian, generic texture compression formats with GL_TEXTURE_1D seem to work fine on i965 drivers. Does that wind up using one of the DXT formats? It uses RGTC for GL_COMPRESSED_RED GL_COMPRESSED_RG FXT for GL_COMPRESSED_RGB GL_COMPRESSED_RGBA Those are also 4x4 based. That said, I think you are right. An implementation must not fail teximage[123]d calls with generic compressed formats. If there's no suitable format available, it is however free to use some suitable uncompressed format (for the specific case, using rgtc here really doesn't make much sense as that's going to be twice as big as uncompressed, unless the hw needs some block-alignment anyway, but I could see why you'd chose that with the code being the same for 1d and 2d textures - it's not like you'd want to optimize that case). Roland ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 1/2] mesa: querying GL_TEXTURE_COMPRESSED_IMAGE_SIZE for a buffer obj is illegal
GL_INVALID_OPERATION is to be raised when querying a non-compressed image/buffer. Since a buffer object can't have a compressed format this query always generates an error. --- src/mesa/main/texparam.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 8a5abe5..5a5547d 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1136,13 +1136,9 @@ get_tex_level_parameter_buffer(struct gl_context *ctx, /* GL_ARB_texture_compression */ case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - if (_mesa_is_format_compressed(texFormat) - !_mesa_is_proxy_texture(target)) { -*params = _mesa_format_image_size(texFormat, bo-Size, 0, 0); - } else { -_mesa_error(ctx, GL_INVALID_OPERATION, -glGetTexLevelParameter[if]v(pname)); - } + /* Always illegal for GL_TEXTURE_BUFFER */ + _mesa_error(ctx, GL_INVALID_OPERATION, + glGetTexLevelParameter[if]v(pname)); break; /* GL_ARB_texture_float */ -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 2/2] mesa: remove unused params, add const qualifiers
--- src/mesa/main/texparam.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 5a5547d..41b9f97 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -926,7 +926,7 @@ legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target) static void get_tex_level_parameter_image(struct gl_context *ctx, - struct gl_texture_object *texObj, + const struct gl_texture_object *texObj, GLenum target, GLint level, GLenum pname, GLint *params) { @@ -1073,11 +1073,10 @@ invalid_pname: static void get_tex_level_parameter_buffer(struct gl_context *ctx, - struct gl_texture_object *texObj, - GLenum target, GLint level, + const struct gl_texture_object *texObj, GLenum pname, GLint *params) { - struct gl_buffer_object *bo = texObj-BufferObject; + const struct gl_buffer_object *bo = texObj-BufferObject; gl_format texFormat = texObj-_BufferObjectFormat; GLenum internalFormat = texObj-BufferObjectFormat; GLenum baseFormat = _mesa_get_format_base_format(texFormat); @@ -1216,7 +1215,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, texObj = _mesa_select_tex_object(ctx, texUnit, target); if (target == GL_TEXTURE_BUFFER) - get_tex_level_parameter_buffer(ctx, texObj, target, level, pname, params); + get_tex_level_parameter_buffer(ctx, texObj, pname, params); else get_tex_level_parameter_image(ctx, texObj, target, level, pname, params); } -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] egl_dri2: Fix segmentation fault
The segmentation fault occurs when DRI2 is not loaded up and dri2_setup_screen() function deferences dri2_dpy-dri2 (since it's NULL at this point). This patch fixes the segmentation fault by checking if dri2 pointer is not NULL before deferencing it. Signed-off-by: Paulo Alcantara pca...@profusion.mobi --- src/egl/drivers/dri2/egl_dri2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 423d18d..7326b85 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -481,7 +481,7 @@ dri2_setup_screen(_EGLDisplay *disp) assert(dri2_dpy-dri2 || dri2_dpy-swrast); disp-Extensions.KHR_surfaceless_context = EGL_TRUE; - if (dri2_dpy-dri2-base.version = 3) { + if (dri2_dpy-dri2 dri2_dpy-dri2-base.version = 3) { disp-Extensions.KHR_create_context = EGL_TRUE; if (dri2_dpy-robustness) -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH weston] compositor: add support for OES_EGL_image_external
On Fri, Aug 17, 2012 at 1:09 AM, Pekka Paalanen ppaala...@gmail.com wrote: On Thu, 16 Aug 2012 17:28:20 -0500 Rob Clark rob.cl...@linaro.org wrote: From: Rob Clark r...@ti.com In cases where the GPU can natively handle certain YUV formats, eglQueryWaylandBufferWL() can return the value EGL_TEXTURE_EXTERNAL_WL and the compositor will treat the buffer as a single egl-image-external. See: http://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt v1: original v2: rename EGL_TEXTURE_EXTERNAL_OES - EGL_TEXTURE_EXTERNAL_WL and query for the extension Signed-off-by: Rob Clark r...@ti.com Looks good to me now. The only thing I could still say is that maybe it would be nice to log a warning, if the extension is not detected, but querySurface still returns EGL_TEXTURE_EXTERNAL_WL. I was debating about putting an assert in there to make it more explicit that query_surface should never return EGL_TEXTURE_EXTERNAL_WL if the gl driver doesn't support OES_EGL_image_external. I guess it could be a warning too, although there is nothing really sane that weston could do as a fallback BR, -R Hmm, that reminds me, I don't think we have any EGL or GL error reporting in Weston... but that's a whole different story. Thanks, pq --- src/compositor.c | 47 +-- src/compositor.h |2 ++ src/weston-egl-ext.h |1 + 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index b2a3ae9..5c6782e 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -719,14 +719,14 @@ ensure_textures(struct weston_surface *es, int num_textures) for (i = es-num_textures; i num_textures; i++) { glGenTextures(1, es-textures[i]); - glBindTexture(GL_TEXTURE_2D, es-textures[i]); - glTexParameteri(GL_TEXTURE_2D, + glBindTexture(es-target, es-textures[i]); + glTexParameteri(es-target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, + glTexParameteri(es-target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); } es-num_textures = num_textures; - glBindTexture(GL_TEXTURE_2D, 0); + glBindTexture(es-target, 0); } static void @@ -771,6 +771,7 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) if (wl_buffer_is_shm(buffer)) { es-pitch = wl_shm_buffer_get_stride(buffer) / 4; es-shader = ec-texture_shader_rgba; + es-target = GL_TEXTURE_2D; ensure_textures(es, 1); glBindTexture(GL_TEXTURE_2D, es-textures[0]); @@ -786,7 +787,7 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) for (i = 0; i es-num_images; i++) ec-destroy_image(ec-egl_display, es-images[i]); es-num_images = 0; - + es-target = GL_TEXTURE_2D; switch (format) { case EGL_TEXTURE_RGB: case EGL_TEXTURE_RGBA: @@ -794,6 +795,11 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) num_planes = 1; es-shader = ec-texture_shader_rgba; break; + case EGL_TEXTURE_EXTERNAL_WL: + num_planes = 1; + es-target = GL_TEXTURE_EXTERNAL_OES; + es-shader = ec-texture_shader_egl_external; + break; case EGL_TEXTURE_Y_UV_WL: num_planes = 2; es-shader = ec-texture_shader_y_uv; @@ -824,8 +830,8 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer) es-num_images++; glActiveTexture(GL_TEXTURE0 + i); - glBindTexture(GL_TEXTURE_2D, es-textures[i]); - ec-image_target_texture_2d(GL_TEXTURE_2D, + glBindTexture(es-target, es-textures[i]); + ec-image_target_texture_2d(es-target, es-images[i]); } @@ -942,9 +948,9 @@ weston_surface_draw(struct weston_surface *es, struct weston_output *output, for (i = 0; i es-num_textures; i++) { glUniform1i(es-shader-tex_uniforms[i], i); glActiveTexture(GL_TEXTURE0 + i); - glBindTexture(GL_TEXTURE_2D, es-textures[i]); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter); + glBindTexture(es-target, es-textures[i]); + glTexParameteri(es-target, GL_TEXTURE_MIN_FILTER, filter); + glTexParameteri(es-target, GL_TEXTURE_MAG_FILTER,
[Mesa-dev] [PATCH] mesa/es: Don't generate ES1 type conversion wrappers
From: Ian Romanick ian.d.roman...@intel.com These are gradually going to get whittled away and eventually folded into the source files with the native type functions. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- This just copies the generated code to a non-generated file. I'm sending this out now, and the giant series that depends on it will be out soon. I really want to get this one in ASAP. src/mesa/main/es1_conversion.c | 1508 src/mesa/main/es1_conversion.h | 157 + src/mesa/main/es_generator.py |7 + src/mesa/sources.mak |3 +- 4 files changed, 1674 insertions(+), 1 deletions(-) create mode 100644 src/mesa/main/es1_conversion.c create mode 100644 src/mesa/main/es1_conversion.h diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c new file mode 100644 index 000..a1d3b76 --- /dev/null +++ b/src/mesa/main/es1_conversion.c @@ -0,0 +1,1508 @@ +#include stdbool.h +#include main/mfeatures.h + +#ifdef FEATURE_ES1 + +#include api_loopback.h +#include api_exec.h +#include blend.h +#include clear.h +#include clip.h +#include context.h +#include depth.h +#include fog.h +#include imports.h +#include light.h +#include lines.h +#include matrix.h +#include multisample.h +#include pixelstore.h +#include points.h +#include polygon.h +#include readpix.h +#include texenv.h +#include texgen.h +#include texobj.h +#include texparam.h +#include mtypes.h +#include viewport.h +#include main/drawtex.h +#include vbo/vbo.h + +#ifndef GL_APIENTRY +#define GL_APIENTRY GLAPIENTRY +#endif + +#include main/es1_conversion.h + +void GL_APIENTRY +_es_AlphaFuncx(GLenum func, GLclampx ref) +{ + switch(func) { + case GL_NEVER: + case GL_LESS: + case GL_EQUAL: + case GL_LEQUAL: + case GL_GREATER: + case GL_NOTEQUAL: + case GL_GEQUAL: + case GL_ALWAYS: + break; + default: + _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, + glAlphaFuncx(func=0x%x), func); + return; + } + + _mesa_AlphaFunc(func, (GLclampf) (ref / 65536.0f)); +} + +void GL_APIENTRY +_es_ClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) +{ + _mesa_ClearColor((GLclampf) (red / 65536.0f), +(GLclampf) (green / 65536.0f), +(GLclampf) (blue / 65536.0f), +(GLclampf) (alpha / 65536.0f)); +} + +void GL_APIENTRY +_es_ClearDepthx(GLclampx depth) +{ + _mesa_ClearDepthf((GLclampf) (depth / 65536.0f)); +} + +void GL_APIENTRY +_es_ClipPlanef(GLenum plane, const GLfloat *equation) +{ + unsigned int i; + GLdouble converted_equation[4]; + + for (i = 0; i Elements(converted_equation); i++) { + converted_equation[i] = (GLdouble) (equation[i]); + } + + _mesa_ClipPlane(plane, converted_equation); +} + +void GL_APIENTRY +_es_ClipPlanex(GLenum plane, const GLfixed *equation) +{ + unsigned int i; + GLdouble converted_equation[4]; + + for (i = 0; i Elements(converted_equation); i++) { + converted_equation[i] = (GLdouble) (equation[i] / 65536.0); + } + + _mesa_ClipPlane(plane, converted_equation); +} + +void GL_APIENTRY +_es_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) +{ +_es_Color4f((GLfloat) (red / 255.0f), +(GLfloat) (green / 255.0f), +(GLfloat) (blue / 255.0f), +(GLfloat) (alpha / 255.0f)); +} + +void GL_APIENTRY +_es_Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) +{ +_es_Color4f((GLfloat) (red / 65536.0f), +(GLfloat) (green / 65536.0f), +(GLfloat) (blue / 65536.0f), +(GLfloat) (alpha / 65536.0f)); +} + +void GL_APIENTRY +_es_DepthRangex(GLclampx zNear, GLclampx zFar) +{ +_mesa_DepthRangef((GLclampf) (zNear / 65536.0f), + (GLclampf) (zFar / 65536.0f)); +} + +void GL_APIENTRY +_es_DrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed w, GLfixed h) +{ + +_mesa_DrawTexf((GLfloat) (x / 65536.0f), + (GLfloat) (y / 65536.0f), + (GLfloat) (z / 65536.0f), + (GLfloat) (w / 65536.0f), + (GLfloat) (h / 65536.0f)); +} + +void GL_APIENTRY +_es_DrawTexxvOES(const GLfixed *coords) +{ +unsigned int i; +GLfloat converted_coords[5]; + +for (i = 0; i Elements(converted_coords); i++) { +converted_coords[i] = (GLfloat) (coords[i] / 65536.0f); +} + +_mesa_DrawTexfv(converted_coords); +} + +void GL_APIENTRY +_es_Fogx(GLenum pname, GLfixed param) +{ + bool convert_param_value = true; + + switch(pname) { + case GL_FOG_MODE: + if (param != GL_EXP param != GL_EXP2 param != GL_LINEAR) { + _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, + glFogx(pname=0x%x), pname); + return; + } + convert_param_value = false; + break; + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: +
Re: [Mesa-dev] [PATCH] st/mesa: fix sampler view counting
This looks good, but I don't see how it could fix anything. Bound-but-unused sampler views should have no effect on rendering. Marek On Fri, Aug 17, 2012 at 4:28 PM, Brian Paul bri...@vmware.com wrote: In the past, when we called pipe::set_sampler_views(n) the drivers set samplers [n..MAX] to NULL. We no longer do that. The state tracker code was already trying to set unused sampler views to NULL to cover that case, but the logic was broken and unnoticed until now. This patch fixes it. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53617 --- src/mesa/state_tracker/st_atom_texture.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 6e2efd9..df05e83 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -265,7 +265,7 @@ update_textures(struct st_context *st, { const GLuint old_max = *num_textures; GLbitfield samplers_used = prog-SamplersUsed; - GLuint unit; + GLuint unit, new_count; if (samplers_used == 0x0 old_max == 0) return; @@ -294,9 +294,16 @@ update_textures(struct st_context *st, pipe_sampler_view_reference((sampler_views[unit]), sampler_view); } + /* Ex: if old_max = 3 and *num_textures = 1, we need to pass an +* array of views={X, NULL, NULL} to unref the old texture views +* at positions [1] and [2]. +*/ + new_count = MAX2(*num_textures, old_max); + assert(new_count = max_units); + cso_set_sampler_views(st-cso_context, shader_stage, - MIN2(*num_textures, max_units), + new_count, sampler_views); } -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: do more teximage error checking for generic compressed formats
On 08/17/2012 09:34 AM, Roland Scheidegger wrote: Am 16.08.2012 23:29, schrieb Anuj Phogat: On Thu, Aug 16, 2012 at 10:23 AM, Brian Paul bri...@vmware.com wrote: On 08/15/2012 02:31 PM, Anuj Phogat wrote: On Tue, May 1, 2012 at 2:07 PM, Brian Paul bri...@vmware.com mailto:bri...@vmware.com wrote: When glTexImage or glCopyTexImage is called with internalFormat being a generic compressed format (like GL_COMPRESSED_RGB) we need to do the same error checks as for specific compressed formats. In particular, check if the texture target is compatible with the format. None of the texture compression formats we support so far work with GL_TEXTURE_1D, for example. See also https://bugs.freedesktop.org/show_bug.cgi?id=49124 Brian, generic texture compression formats with GL_TEXTURE_1D seem to work fine on i965 drivers. Does that wind up using one of the DXT formats? It uses RGTC for GL_COMPRESSED_RED GL_COMPRESSED_RG FXT for GL_COMPRESSED_RGB GL_COMPRESSED_RGBA Those are also 4x4 based. I'm surprised we do that. I would have expected uncompressed. That said, I think you are right. An implementation must not fail teximage[123]d calls with generic compressed formats. If there's no suitable format available, it is however free to use some suitable uncompressed format (for the specific case, using rgtc here really doesn't make much sense as that's going to be twice as big as uncompressed, unless the hw needs some block-alignment anyway, but I could see why you'd chose that with the code being the same for 1d and 2d textures - it's not like you'd want to optimize that case). Yeah. The idea is that a GL_COMPRESSED_WHATEVER internal format means feel free to pick a compressed format, if you want. So we need to allow those internal formats for 1D/3D, but we should probably always pick an uncompressed format. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] st/mesa: fix sampler view counting
The bug in question was happening because when all texturing got turned off we were calling pipe-set_sampler_views(count=0). In llvmpipe this caused the function to return early, before we set the LP_NEW_SAMPLER_VIEW flag. That caused us to miss some state validation. I agree that unused sampler views shouldn't have an effect on rendering, but in this case it does (and perhaps would effect other drivers as well). As I mentioned, drivers used to null-out the sampler views not specified by pipe::set_sampler_views(n) but that behavior is going away. During the transition, this patch gives a bit of a safety net. -Brian On 08/17/2012 12:03 PM, Marek Olšák wrote: This looks good, but I don't see how it could fix anything. Bound-but-unused sampler views should have no effect on rendering. Marek On Fri, Aug 17, 2012 at 4:28 PM, Brian Paulbri...@vmware.com wrote: In the past, when we called pipe::set_sampler_views(n) the drivers set samplers [n..MAX] to NULL. We no longer do that. The state tracker code was already trying to set unused sampler views to NULL to cover that case, but the logic was broken and unnoticed until now. This patch fixes it. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53617 --- src/mesa/state_tracker/st_atom_texture.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 6e2efd9..df05e83 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -265,7 +265,7 @@ update_textures(struct st_context *st, { const GLuint old_max = *num_textures; GLbitfield samplers_used = prog-SamplersUsed; - GLuint unit; + GLuint unit, new_count; if (samplers_used == 0x0 old_max == 0) return; @@ -294,9 +294,16 @@ update_textures(struct st_context *st, pipe_sampler_view_reference((sampler_views[unit]), sampler_view); } + /* Ex: if old_max = 3 and *num_textures = 1, we need to pass an +* array of views={X, NULL, NULL} to unref the old texture views +* at positions [1] and [2]. +*/ + new_count = MAX2(*num_textures, old_max); + assert(new_count= max_units); + cso_set_sampler_views(st-cso_context, shader_stage, - MIN2(*num_textures, max_units), + new_count, sampler_views); } -- 1.7.3.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa/es: Don't generate ES1 type conversion wrappers
On 08/17/2012 11:36 AM, Ian Romanick wrote: From: Ian Romanickian.d.roman...@intel.com These are gradually going to get whittled away and eventually folded into the source files with the native type functions. Signed-off-by: Ian Romanickian.d.roman...@intel.com --- This just copies the generated code to a non-generated file. I'm sending this out now, and the giant series that depends on it will be out soon. I really want to get this one in ASAP. LGTM but I think you need to add the new es1_conversion.c file to src/mesa/SConscript. Reviewed-by: Brian Paul bri...@vmware.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/3] intel: Eliminate unneeded hiz resolves
On 14 August 2012 16:58, Chad Versace chad.vers...@linux.intel.com wrote: On creating a hiz miptree, we conservatively marked that each miptree slice needed a hiz resolve. But the resolves are unneeded when creating a non-texture miptree, so this patch removes them. This eliminates one hiz resolve per each creation of a non-texture depth miptree. Hence, this eliminates many resolves when resizing a window. So, with this change, are the contents of the HiZ buffer uninitialized for a newly created (or resized) non-texture miptree? The HW docs don't specify the exact format of the HiZ buffer, so it's possible that there may be some possible states of the HiZ buffer that are invalid. If there are, and the hardware doesn't deal with those invalid states well, then we run the risk of sporadic incorrect results (if subsequent rendering fails to bring the HiZ buffer into a valid state) or possibly sporadic GPU hangs (if the hardware is unable to cope with the invalid states). Alternatively, perhaps we could initialize non-texture HiZ buffers to a state that indicates that they need a fast depth clear rather than a HiZ resolve. Clears are likely to be much faster than HiZ resolves, because they don't require reading from the depth buffer. So we would still get most of the benefit of avoiding the HiZ resolve, and no risk of undefined behaviour. In fact, we might conceivably get even more benefit, since after a fast depth clear, the HiZ buffer is in a state where future rendering is very efficient (since the depth buffer doesn't need to be read). Signed-off-by: Chad Versace chad.vers...@linux.intel.com --- src/mesa/drivers/dri/intel/intel_fbo.c | 4 ++- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 39 +- src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 3 +- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index 3a610c2..ada0f69 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -538,7 +538,9 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel, if (mt-hiz_mt == NULL intel-vtbl.is_hiz_depth_format(intel, rb-Format)) { - intel_miptree_alloc_hiz(intel, mt, 0 /* num_samples */); + intel_miptree_alloc_hiz(intel, mt, + 0 /*num_samples*/, + true /*for_texture*/); if (!mt-hiz_mt) return false; } diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index 24cd9e9..143f2e3 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -467,7 +467,8 @@ intel_miptree_create_for_renderbuffer(struct intel_context *intel, goto fail; if (intel-vtbl.is_hiz_depth_format(intel, format)) { - ok = intel_miptree_alloc_hiz(intel, mt, num_samples); + ok = intel_miptree_alloc_hiz(intel, mt, num_samples, + false /*for_texture*/); if (!ok) goto fail; } @@ -825,7 +826,8 @@ intel_miptree_alloc_mcs(struct intel_context *intel, bool intel_miptree_alloc_hiz(struct intel_context *intel, struct intel_mipmap_tree *mt, -GLuint num_samples) +GLuint num_samples, +bool for_texture) { assert(mt-hiz_mt == NULL); /* MSAA HiZ surfaces always use IMS layout. */ @@ -844,18 +846,27 @@ intel_miptree_alloc_hiz(struct intel_context *intel, if (!mt-hiz_mt) return false; - /* Mark that all slices need a HiZ resolve. */ - struct intel_resolve_map *head = mt-hiz_map; - for (int level = mt-first_level; level = mt-last_level; ++level) { - for (int layer = 0; layer mt-level[level].depth; ++layer) { -head-next = malloc(sizeof(*head-next)); -head-next-prev = head; -head-next-next = NULL; -head = head-next; - -head-level = level; -head-layer = layer; -head-need = GEN6_HIZ_OP_HIZ_RESOLVE; + if (for_texture) { + /* Mark that all slices need a HiZ resolve. This is necessary for + * renderbuffers that wrap textures because the user may have previously + * uploaded texture data into the parent depth miptree. + * + * This is skipped for non-texture miptrees. In the non-texture case, + * the depth miptree and the hiz miptree are created together, and hence + * the content of each is undefined here. + */ + struct intel_resolve_map *head = mt-hiz_map; + for (int level = mt-first_level; level = mt-last_level; ++level) { + for (int layer = 0; layer mt-level[level].depth; ++layer) { +head-next = malloc(sizeof(*head-next)); +head-next-prev
Re: [Mesa-dev] [PATCH 3/3] i965: Remove redundant null check
On 14 August 2012 16:58, Chad Versace chad.vers...@linux.intel.com wrote: intel_renderbuffer_resolve_hiz checks if rb-mt is null, so there is no need for the caller to do so. Signed-off-by: Chad Versace chad.vers...@linux.intel.com Reviewed-by: Paul Berry stereotype...@gmail.com --- src/mesa/drivers/dri/i965/brw_draw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 0b1a4e0..f9e4445 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -305,9 +305,8 @@ brw_predraw_resolve_buffers(struct brw_context *brw) /* Resolve the depth buffer's HiZ buffer. */ depth_irb = intel_get_renderbuffer(ctx-DrawBuffer, BUFFER_DEPTH); - if (depth_irb depth_irb-mt) { + if (depth_irb) intel_renderbuffer_resolve_hiz(intel, depth_irb); - } /* Resolve depth buffer of each enabled depth texture. */ for (int i = 0; i BRW_MAX_TEX_UNIT; i++) { -- 1.7.11.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] breakage from Make shared-glapi the default
On Thu, Aug 9, 2012 at 8:09 AM, Brian Paul bri...@vmware.com wrote: As of commit 9f7b3d171306ed2ae588e1a4145c5a364cf986ff, when I try to configure and build with: $ CFLAGS=-g ./autogen.sh --enable-xlib-glx --with-x --disable-driglx-direct --disable-dri --enable-debug --enable-gles1 --enable-gles2 --enable-openvg --enable-gallium-egl --enable-xa --enable-xorg I notice that you're building GLES/EGL with Xlib-GLX. I'm working on this problem, but I can't make GLES/EGL test programs (es2gears, es2_info) work even before Ian's shared-glapi changes. I get: MESA_DEBUG=1 LIBGL_DEBUG=verbose EGL_LOG_LEVEL=debug LD_LIBRARY_PATH=/home/mattst88/projects/mesa/lib EGL_DRIVERS_PATH=/home/mattst88/projects/mesa/lib LIBGL_DRIVERS_PATH=/home/mattst88/projects/mesa/lib libEGL debug: Native platform type: x11 (autodetected) libEGL debug: EGL search path is /home/mattst88/projects/mesa/lib:/usr/local/lib/egl libEGL debug: added egl_glx to module array libEGL warning: GLX: failed to load GLX libEGL debug: EGL user error 0x3001 (EGL_NOT_INITIALIZED) in eglInitialize Error: eglInitialize() failed Is there something I need to do? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 01/10] build: Remove deprecated --with-driver= flag
--- configure.ac | 37 ++--- 1 files changed, 6 insertions(+), 31 deletions(-) diff --git a/configure.ac b/configure.ac index 7dac091..10d7b66 100644 --- a/configure.ac +++ b/configure.ac @@ -698,10 +698,7 @@ fi AC_SUBST([SHARED_GLAPI]) AM_CONDITIONAL(HAVE_SHARED_GLAPI, test $SHARED_GLAPI = 1) -dnl -dnl Driver configuration. Options are xlib, dri and osmesa right now. -dnl More later: fbdev, ... -dnl +dnl Driver configuration. Options are xlib, dri and osmesa. default_driver=xlib case $host_os in @@ -719,52 +716,30 @@ if test x$enable_opengl = xno; then default_driver=no fi -AC_ARG_WITH([driver], -[AS_HELP_STRING([--with-driver=DRIVER], [DEPRECATED])], -[mesa_driver=$withval], -[mesa_driver=auto]) -dnl Check for valid option -case x$mesa_driver in -xxlib|xdri|xosmesa|xno) -if test x$enable_dri != xauto -o \ -x$enable_glx != xauto -o \ -x$enable_osmesa != xauto -o \ -x$enable_xlib_glx != xauto; then -AC_MSG_ERROR([--with-driver=$mesa_driver is deprecated]) -fi -;; -xauto) -mesa_driver=$default_driver -;; -*) -AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option]) -;; -esac - -# map $mesa_driver to APIs +# map $default_driver to APIs if test x$enable_dri = xauto; then -case x$mesa_driver in +case x$default_driver in xdri) enable_dri=yes ;; *)enable_dri=no ;; esac fi if test x$enable_glx = xauto; then -case x$mesa_driver in +case x$default_driver in xdri|xxlib) enable_glx=yes ;; *) enable_glx=no ;; esac fi if test x$enable_osmesa = xauto; then -case x$mesa_driver in +case x$default_driver in xxlib|xosmesa) enable_osmesa=yes ;; *) enable_osmesa=no ;; esac fi if test x$enable_xlib_glx = xauto; then -case x$mesa_driver in +case x$default_driver in xxlib) enable_xlib_glx=yes ;; *) enable_xlib_glx=no ;; esac -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 02/10] build/x11: Don't link against shared-glapi
--- src/mesa/drivers/x11/Makefile.am |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am index 263c441..d9f3423 100644 --- a/src/mesa/drivers/x11/Makefile.am +++ b/src/mesa/drivers/x11/Makefile.am @@ -62,10 +62,6 @@ lib@GL_LIB@_la_LDFLAGS = \ -no-undefined \ $(GL_LIB_DEPS) -if HAVE_SHARED_GLAPI -lib@GL_LIB@_la_LDFLAGS += -L$(top_builddir)/$(LIB_DIR) -l$(GLAPI_LIB) -endif - # Provide compatibility with scripts for the old Mesa build system for # a while by putting a link to the driver into /lib of the build tree. all-local: lib@GL_LIB@.la -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/10] build/x11: Force usage of C++ linker
--- src/mesa/drivers/x11/Makefile.am |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am index d9f3423..dab4d6b 100644 --- a/src/mesa/drivers/x11/Makefile.am +++ b/src/mesa/drivers/x11/Makefile.am @@ -50,6 +50,9 @@ lib@GL_LIB@_la_SOURCES = \ xm_line.c \ xm_tri.c +# Force usage of a C++ linker +nodist_EXTRA_lib@GL_LIB@_la_SOURCES = dummy.cpp + GL_MAJOR = 1 GL_MINOR = 6 GL_PATCH = 0 -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 04/10] build: Print whether shared-glapi is enabled
--- configure.ac |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 10d7b66..2fe04ab 100644 --- a/configure.ac +++ b/configure.ac @@ -2199,6 +2199,7 @@ dnl Libraries echo echo Shared libs: $enable_shared echo Static libs: $enable_static +echo Shared-glapi:$enable_shared_glapi dnl Compiler options # cleanup the CFLAGS/CXXFLAGS/DEFINES vars -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 05/10] build: Set sensible DRI/X11/OSMesa defaults
--- configure.ac | 72 +++-- 1 files changed, 19 insertions(+), 53 deletions(-) diff --git a/configure.ac b/configure.ac index 2fe04ab..d411e52 100644 --- a/configure.ac +++ b/configure.ac @@ -543,19 +543,19 @@ AC_ARG_ENABLE([openvg], AC_ARG_ENABLE([dri], [AS_HELP_STRING([--enable-dri], -[enable DRI modules @:@default=auto@:@])], +[enable DRI modules @:@default=enabled@:@])], [enable_dri=$enableval], -[enable_dri=auto]) +[enable_dri=yes]) AC_ARG_ENABLE([glx], [AS_HELP_STRING([--enable-glx], -[enable GLX library @:@default=auto@:@])], +[enable GLX library @:@default=enabled@:@])], [enable_glx=$enableval], -[enable_glx=auto]) +[enable_glx=yes]) AC_ARG_ENABLE([osmesa], [AS_HELP_STRING([--enable-osmesa], -[enable OSMesa library @:@default=auto@:@])], +[enable OSMesa library @:@default=disabled@:@])], [enable_osmesa=$enableval], -[enable_osmesa=auto]) +[enable_osmesa=no]) AC_ARG_ENABLE([egl], [AS_HELP_STRING([--disable-egl], [disable EGL library @:@default=enabled@:@])], @@ -605,9 +605,9 @@ AC_ARG_ENABLE([opencl], [enable_opencl=no]) AC_ARG_ENABLE([xlib_glx], [AS_HELP_STRING([--enable-xlib-glx], -[make GLX library Xlib-based instead of DRI-based @:@default=disable@:@])], +[make GLX library Xlib-based instead of DRI-based @:@default=disabled@:@])], [enable_xlib_glx=$enableval], -[enable_xlib_glx=auto]) +[enable_xlib_glx=no]) AC_ARG_ENABLE([gallium_egl], [AS_HELP_STRING([--enable-gallium-egl], [enable optional EGL state tracker (not required @@ -698,55 +698,21 @@ fi AC_SUBST([SHARED_GLAPI]) AM_CONDITIONAL(HAVE_SHARED_GLAPI, test $SHARED_GLAPI = 1) -dnl Driver configuration. Options are xlib, dri and osmesa. -default_driver=xlib - -case $host_os in -linux*) -default_driver=dri -;; -*freebsd* | dragonfly* | *netbsd*) -case $host_cpu in -i*86|x86_64|powerpc*|sparc*) default_driver=dri;; -esac -;; -esac - -if test x$enable_opengl = xno; then -default_driver=no -fi - -# map $default_driver to APIs -if test x$enable_dri = xauto; then -case x$default_driver in -xdri) enable_dri=yes ;; -*)enable_dri=no ;; -esac -fi - -if test x$enable_glx = xauto; then -case x$default_driver in -xdri|xxlib) enable_glx=yes ;; -*) enable_glx=no ;; -esac -fi - -if test x$enable_osmesa = xauto; then -case x$default_driver in -xxlib|xosmesa) enable_osmesa=yes ;; -*) enable_osmesa=no ;; -esac +if test x$enable_glx = xno; then +AC_MSG_WARN([GLX disabled, disabling Xlib-GLX]) +enable_xlib_glx=no fi -if test x$enable_xlib_glx = xauto; then -case x$default_driver in -xxlib) enable_xlib_glx=yes ;; -*) enable_xlib_glx=no ;; -esac +if test x$enable_dri$enable_xlib_glx = xyesyes; then +AC_MSG_ERROR([DRI and Xlib-GLX cannot be built together]) fi -if test x$enable_glx = xno; then -enable_xlib_glx=no +# Disable GLX if DRI and Xlib-GLX are not enabled +if test x$enable_glx = xyes -a \ +x$enable_dri = xno -a \ +x$enable_xlib_glx = xno; then +AC_MSG_WARN([Neither DRI nor Xlib-GLX enabled, disabling GLX]) +enable_glx=no fi AM_CONDITIONAL(HAVE_DRI, test x$enable_dri = xyes) -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 06/10] build: Only allow shared-glapi with DRI
--- configure.ac | 47 +++ 1 files changed, 27 insertions(+), 20 deletions(-) diff --git a/configure.ac b/configure.ac index d411e52..7fa773f 100644 --- a/configure.ac +++ b/configure.ac @@ -681,23 +681,6 @@ if test x$enable_gles2 = xyes; then fi AC_SUBST([API_DEFINES]) -AC_ARG_ENABLE([shared-glapi], -[AS_HELP_STRING([--enable-shared-glapi], -[Enable shared glapi for OpenGL @:@default=yes@:@])], -[enable_shared_glapi=$enableval], -[enable_shared_glapi=yes]) - -SHARED_GLAPI=0 -if test x$enable_shared_glapi = xyes; then -SHARED_GLAPI=1 -# libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use -# the remap table) -DEFINES=$DEFINES -DIN_DRI_DRIVER -SRC_DIRS=$SRC_DIRS mapi/shared-glapi -fi -AC_SUBST([SHARED_GLAPI]) -AM_CONDITIONAL(HAVE_SHARED_GLAPI, test $SHARED_GLAPI = 1) - if test x$enable_glx = xno; then AC_MSG_WARN([GLX disabled, disabling Xlib-GLX]) enable_xlib_glx=no @@ -717,6 +700,30 @@ fi AM_CONDITIONAL(HAVE_DRI, test x$enable_dri = xyes) +AC_ARG_ENABLE([shared-glapi], +[AS_HELP_STRING([--enable-shared-glapi], +[Enable shared glapi for OpenGL @:@default=yes@:@])], +[enable_shared_glapi=$enableval], +[enable_shared_glapi=$enable_dri]) + +# Shared GLAPI is only useful for DRI +if test x$enable_dri = xno; then +AC_MSG_NOTICE([Shared GLAPI is only useful for DRI, disabling]) +enable_shared_glapi=no +fi + +# TODO: Get rid of SHARED_GLAPI variable +SHARED_GLAPI=0 +if test x$enable_shared_glapi = xyes; then +SHARED_GLAPI=1 +# libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use +# the remap table) +DEFINES=$DEFINES -DIN_DRI_DRIVER +SRC_DIRS=$SRC_DIRS mapi/shared-glapi +fi +AC_SUBST([SHARED_GLAPI]) +AM_CONDITIONAL(HAVE_SHARED_GLAPI, test x$enable_shared_glapi = xyes) + dnl dnl Driver specific build directories dnl @@ -1236,7 +1243,7 @@ if test x$enable_gbm = xyes; then if test x$enable_dri = xyes; then GBM_BACKEND_DIRS=$GBM_BACKEND_DIRS dri -if test $SHARED_GLAPI -eq 0; then +if test x$enable_shared_glapi = xno; then AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi]) fi fi @@ -2034,12 +2041,12 @@ AC_CONFIG_FILES([configs/current src/glsl/tests/Makefile src/glx/Makefile src/glx/tests/Makefile + src/gtest/Makefile src/mapi/glapi/Makefile src/mapi/glapi/gen/Makefile - src/mapi/shared-glapi/Makefile src/mapi/glapi/tests/Makefile + src/mapi/shared-glapi/Makefile src/mapi/shared-glapi/tests/Makefile - src/gtest/Makefile src/mesa/Makefile src/mesa/libdricore/Makefile src/mesa/main/tests/Makefile -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/10] build: Put mapi/shared-glapi in CORE_DIRS
SRC_DIRS was overwritten (visible in the second hunk). Also don't require mapi/shared-glapi to be built for GLES in the case of not-DRI, e.g., Xlib-GLX. --- configure.ac | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 7fa773f..758879b 100644 --- a/configure.ac +++ b/configure.ac @@ -719,7 +719,7 @@ if test x$enable_shared_glapi = xyes; then # libGL will use libglapi for function lookups (IN_DRI_DRIVER means to use # the remap table) DEFINES=$DEFINES -DIN_DRI_DRIVER -SRC_DIRS=$SRC_DIRS mapi/shared-glapi +CORE_DIRS=mapi/shared-glapi fi AC_SUBST([SHARED_GLAPI]) AM_CONDITIONAL(HAVE_SHARED_GLAPI, test x$enable_shared_glapi = xyes) @@ -727,10 +727,6 @@ AM_CONDITIONAL(HAVE_SHARED_GLAPI, test x$enable_shared_glapi = xyes) dnl dnl Driver specific build directories dnl - -dnl this variable will be prepended to SRC_DIRS and is not exported -CORE_DIRS= - SRC_DIRS=gtest GLU_DIRS=sgi GALLIUM_DIRS=auxiliary drivers state_trackers @@ -739,13 +735,6 @@ GALLIUM_WINSYS_DIRS=sw GALLIUM_DRIVERS_DIRS=galahad trace rbug noop identity GALLIUM_STATE_TRACKERS_DIRS= -# build shared-glapi if enabled for OpenGL or if OpenGL ES is enabled -case x$enable_shared_glapi$enable_gles1$enable_gles2 in -x*yes*) -CORE_DIRS=$CORE_DIRS mapi/shared-glapi -;; -esac - # build glapi if OpenGL is enabled if test x$enable_opengl = xyes; then CORE_DIRS=$CORE_DIRS mapi/glapi -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 08/10] build: Clean glx Makefile.am
mapi/glapi is already built when make is run in src/glx. --- src/glx/Makefile.am |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index 40e6b60..4aa900a 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -26,7 +26,7 @@ endif SUBDIRS=. tests -GLAPI_LIB = ../mapi/glapi/libglapi.la +GLAPI_LIB = $(top_builddir)/src/mapi/glapi/libglapi.la if HAVE_XF86VIDMODE EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE @@ -113,6 +113,3 @@ all-local: lib@GL_LIB@.la $(MKDIR_P) $(top_builddir)/$(LIB_DIR); ln -f .libs/lib@GL_LIB@.so.1.2.0 $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so.1 ln -sf lib@GL_LIB@.so.1 $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so - -$(GLAPI_LIB): - @$(MAKE) -C $(TOP)/src/mapi/glapi -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 09/10] build: Only build libmesagallium.la if building Gallium
--- configure.ac |1 + src/mesa/Makefile.am |9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 758879b..872aa0c 100644 --- a/configure.ac +++ b/configure.ac @@ -1530,6 +1530,7 @@ dnl if test x$with_gallium_drivers != x; then SRC_DIRS=$SRC_DIRS gallium gallium/winsys gallium/targets fi +AM_CONDITIONAL(HAVE_GALLIUM, test x$with_gallium_drivers != x) AC_SUBST([LLVM_BINDIR]) AC_SUBST([LLVM_CFLAGS]) diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am index f1cd6d6..3b5ef24 100644 --- a/src/mesa/Makefile.am +++ b/src/mesa/Makefile.am @@ -92,7 +92,10 @@ program/lex.yy.c: program/program_lexer.l $(MKDIR_P) program $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $ -noinst_LTLIBRARIES = libmesa.la libmesagallium.la +noinst_LTLIBRARIES = libmesa.la +if HAVE_GALLIUM +noinst_LTLIBRARIES += libmesagallium.la +endif SRCDIR = $(top_srcdir)/src/mesa/ BUILDDIR = $(top_builddir)/src/mesa/ @@ -142,9 +145,11 @@ libmesagallium_la_LDFLAGS = # Provide compatibility with scripts for the old Mesa build system for # a while by putting a link to the library in the current directory. -all-local: libmesa.la libmesagallium.la +all-local: $(noinst_LTLIBRARIES) ln -f .libs/libmesa.a . +if HAVE_GALLIUM ln -f .libs/libmesagallium.a . +endif CLEANFILES += libmesa.a libmesagallium.a -- 1.7.8.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 47607] [advocacy] Make Anomaly Warzone Earth work with Mesa
https://bugs.freedesktop.org/show_bug.cgi?id=47607 imamdxl8...@gmail.com changed: What|Removed |Added CC||imamdxl8...@gmail.com -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 47607] [advocacy] Make Anomaly Warzone Earth work with Mesa
https://bugs.freedesktop.org/show_bug.cgi?id=47607 --- Comment #4 from imamdxl8...@gmail.com 2012-08-18 00:16:12 UTC --- same with GMA 4500, but Windows version runs fine in Windows. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53664] New: es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration]
https://bugs.freedesktop.org/show_bug.cgi?id=53664 Bug #: 53664 Summary: es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration] Classification: Unclassified Product: Mesa Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: blocker Priority: medium Component: Mesa core AssignedTo: mesa-dev@lists.freedesktop.org ReportedBy: v...@freedesktop.org CC: i...@freedesktop.org mesa: 34472a0d8713c4eb300c9d1de0844c8b78bcf1ab (master) $ make [...] CC es1_conversion.lo ../../src/mesa/main/es1_conversion.c: In function '_es_DrawTexxOES': ../../src/mesa/main/es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration] ../../src/mesa/main/es1_conversion.c: In function '_es_DrawTexxvOES': ../../src/mesa/main/es1_conversion.c:147:5: error: implicit declaration of function '_mesa_DrawTexfv' [-Werror=implicit-function-declaration] 34472a0d8713c4eb300c9d1de0844c8b78bcf1ab is the first bad commit commit 34472a0d8713c4eb300c9d1de0844c8b78bcf1ab Author: Ian Romanick ian.d.roman...@intel.com Date: Fri Jul 27 14:38:37 2012 -0700 mesa/es: Don't generate ES1 type conversion wrappers These are gradually going to get whittled away and eventually folded into the source files with the native type functions. v2: Add (speculative) SConscript changes. These may be broken. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Reviewed-by: Brian Paul bri...@vmware.com :04 04 316b3b1391077e9d035f9003301d4e426233327d c976a2a6b27c781382a7e3282f08c66fe4a4290f Msrc -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53664] es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration]
https://bugs.freedesktop.org/show_bug.cgi?id=53664 Ian Romanick i...@freedesktop.org changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #1 from Ian Romanick i...@freedesktop.org 2012-08-18 02:39:37 UTC --- I can't reproduce that here. These function prototypes come from src/mesa/main/drawtex.h, which is included at line 29 of es1_conversion.c. Is this limited to scons builds? If you can reproduce it with automake, what options do you use? -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53664] es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration]
https://bugs.freedesktop.org/show_bug.cgi?id=53664 --- Comment #2 from Brian Paul brian.e.p...@gmail.com 2012-08-18 02:49:18 UTC --- I can't repro this either. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 00/26] Eventually remove ES and ES2 filter wrappers
This is the first of several patch bombs that remove the generated ES1 and ES2 parameter filter wrapper functions. This wrappers need to be removed for several reasons: - Extra CPU hit that only penalizes ES applications. - Changing ES functionality has one more place to touch Mesa... because you don't already have to modify enough places. - All of the filtering that is done for ES also needs to be done for desktop core contexts. - A subset of the filtering that is currently done for ES2 needs to be done for ES3. This first batch is the easy stuff. There are a lot of the generated filter functions that filter enums down to the set that core Mesa already accepts. Patch 01 is the perfect example. The generated function makes sure that the mag filter can only be GL_NEAREST or GL_LINEAR. Strong work! The next batch (about 65 patches) moves the validation out of the wrappers and into the core Mesa functions. I will send these out in batches, grouped by functional area, to keep the review burden to a minimum. Lol. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 04/26] mesa/es: Remove redundant blend equation mode validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 36 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index b957db4..964a407 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -2112,18 +2112,6 @@ return type=void/ param name=mode type=GLenum/ /proto - - desc name=mode - value name=GL_FUNC_ADD category=GLES2.0/ - value name=GL_FUNC_SUBTRACT category=GLES2.0/ - value name=GL_FUNC_REVERSE_SUBTRACT category=GLES2.0/ - value name=GL_FUNC_ADD_OES category=OES_blend_subtract/ - value name=GL_FUNC_SUBTRACT_OES category=OES_blend_subtract/ - value name=GL_FUNC_REVERSE_SUBTRACT_OES category=OES_blend_subtract/ - - value name=GL_MIN_EXT category=EXT_blend_minmax/ - value name=GL_MAX_EXT category=EXT_blend_minmax/ - /desc /template template name=BlendEquationSeparate @@ -2132,30 +2120,6 @@ param name=modeRGB type=GLenum/ param name=modeAlpha type=GLenum/ /proto - - desc name=modeRGB - value name=GL_FUNC_ADD category=GLES2.0/ - value name=GL_FUNC_SUBTRACT category=GLES2.0/ - value name=GL_FUNC_REVERSE_SUBTRACT category=GLES2.0/ - value name=GL_FUNC_ADD_OES category=OES_blend_subtract/ - value name=GL_FUNC_SUBTRACT_OES category=OES_blend_subtract/ - value name=GL_FUNC_REVERSE_SUBTRACT_OES category=OES_blend_subtract/ - - value name=GL_MIN_EXT category=EXT_blend_minmax/ - value name=GL_MAX_EXT category=EXT_blend_minmax/ - /desc - - desc name=modeAlpha - value name=GL_FUNC_ADD category=GLES2.0/ - value name=GL_FUNC_SUBTRACT category=GLES2.0/ - value name=GL_FUNC_REVERSE_SUBTRACT category=GLES2.0/ - value name=GL_FUNC_ADD_OES category=OES_blend_subtract/ - value name=GL_FUNC_SUBTRACT_OES category=OES_blend_subtract/ - value name=GL_FUNC_REVERSE_SUBTRACT_OES category=OES_blend_subtract/ - - value name=GL_MIN_EXT category=EXT_blend_minmax/ - value name=GL_MAX_EXT category=EXT_blend_minmax/ - /desc /template template name=TexImage3D -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 05/26] mesa/es: Remove redundant face culling mode validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 964a407..e22a5a9 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -48,12 +48,6 @@ return type=void/ param name=mode type=GLenum/ /proto - - desc name=mode - value name=GL_FRONT/ - value name=GL_BACK/ - value name=GL_FRONT_AND_BACK/ - /desc /template template name=Fog -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 06/26] mesa/es: Remove redundant front-face mode validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index e22a5a9..a418dca 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -88,11 +88,6 @@ return type=void/ param name=mode type=GLenum/ /proto - - desc name=mode - value name=GL_CW/ - value name=GL_CCW/ - /desc /template template name=Hint -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 01/26] mesa/es: Remove redundant min/mag filter validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 25 - src/mesa/main/es1_conversion.c | 25 - 2 files changed, 4 insertions(+), 46 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index b6cf52d..1b8dae3 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -304,27 +304,10 @@ /desc /desc - desc name=pname - value name=GL_TEXTURE_MIN_FILTER/ - - desc name=param - value name=GL_NEAREST/ - value name=GL_LINEAR/ - value name=GL_NEAREST_MIPMAP_NEAREST/ - value name=GL_NEAREST_MIPMAP_LINEAR/ - value name=GL_LINEAR_MIPMAP_NEAREST/ - value name=GL_LINEAR_MIPMAP_LINEAR/ - /desc - /desc - - desc name=pname - value name=GL_TEXTURE_MAG_FILTER/ - - desc name=param - value name=GL_NEAREST/ - value name=GL_LINEAR/ - /desc - /desc +desc name=pname + value name=GL_TEXTURE_MIN_FILTER/ + value name=GL_TEXTURE_MAG_FILTER/ +/desc desc name=pname category=GLES1.1 value name=GL_GENERATE_MIPMAP/ diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c index a1d3b76..16e3f57 100644 --- a/src/mesa/main/es1_conversion.c +++ b/src/mesa/main/es1_conversion.c @@ -1376,19 +1376,7 @@ _es_TexParameterx(GLenum target, GLenum pname, GLfixed param) convert_param_value = false; break; case GL_TEXTURE_MIN_FILTER: - if (param != GL_NEAREST param != GL_LINEAR param != GL_NEAREST_MIPMAP_NEAREST param != GL_NEAREST_MIPMAP_LINEAR param != GL_LINEAR_MIPMAP_NEAREST param != GL_LINEAR_MIPMAP_LINEAR) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glTexParameterx(pname=0x%x), pname); - return; - } - convert_param_value = false; - break; case GL_TEXTURE_MAG_FILTER: - if (param != GL_NEAREST param != GL_LINEAR) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glTexParameterx(pname=0x%x), pname); - return; - } convert_param_value = false; break; case GL_GENERATE_MIPMAP: @@ -1446,20 +1434,7 @@ _es_TexParameterxv(GLenum target, GLenum pname, const GLfixed *params) n_params = 1; break; case GL_TEXTURE_MIN_FILTER: - if (params[0] != GL_NEAREST params[0] != GL_LINEAR params[0] != GL_NEAREST_MIPMAP_NEAREST params[0] != GL_NEAREST_MIPMAP_LINEAR params[0] != GL_LINEAR_MIPMAP_NEAREST params[0] != GL_LINEAR_MIPMAP_LINEAR) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glTexParameterxv(pname=0x%x), pname); - return; - } - convert_params_value = false; - n_params = 1; - break; case GL_TEXTURE_MAG_FILTER: - if (params[0] != GL_NEAREST params[0] != GL_LINEAR) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glTexParameterxv(pname=0x%x), pname); - return; - } convert_params_value = false; n_params = 1; break; -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 07/26] mesa/es: Remove redundant separate stencil mask face validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index a418dca..c3066af 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -730,12 +730,6 @@ param name=face type=GLenum/ param name=mask type=GLuint/ /proto - - desc name=face - value name=GL_FRONT/ - value name=GL_BACK/ - value name=GL_FRONT_AND_BACK/ - /desc /template template name=ColorMask -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 03/26] mesa/es: Remove redundant texture target validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 12 - src/mesa/main/es1_conversion.c | 51 2 files changed, 0 insertions(+), 63 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 68e6535..b957db4 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -2345,10 +2345,6 @@ param name=q type=GLtype/ /vector /proto - - desc name=texture - range base=GL_TEXTURE from=0 to=31/ - /desc /template template name=CompressedTexImage3D @@ -2404,10 +2400,6 @@ return type=void/ param name=texture type=GLenum/ /proto - - desc name=texture - range base=GL_TEXTURE from=0 to=31/ - /desc /template template name=ClientActiveTexture @@ -2415,10 +2407,6 @@ return type=void/ param name=texture type=GLenum/ /proto - - desc name=texture - range base=GL_TEXTURE from=0 to=31/ - /desc /template template name=SampleCoverage diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c index 16e3f57..32dda67 100644 --- a/src/mesa/main/es1_conversion.c +++ b/src/mesa/main/es1_conversion.c @@ -801,47 +801,6 @@ _es_MultMatrixx(const GLfixed *m) void GL_APIENTRY _es_MultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q) { - switch(texture) { - case GL_TEXTURE0: - case GL_TEXTURE1: - case GL_TEXTURE2: - case GL_TEXTURE3: - case GL_TEXTURE4: - case GL_TEXTURE5: - case GL_TEXTURE6: - case GL_TEXTURE7: - case GL_TEXTURE8: - case GL_TEXTURE9: - case GL_TEXTURE10: - case GL_TEXTURE11: - case GL_TEXTURE12: - case GL_TEXTURE13: - case GL_TEXTURE14: - case GL_TEXTURE15: - case GL_TEXTURE16: - case GL_TEXTURE17: - case GL_TEXTURE18: - case GL_TEXTURE19: - case GL_TEXTURE20: - case GL_TEXTURE21: - case GL_TEXTURE22: - case GL_TEXTURE23: - case GL_TEXTURE24: - case GL_TEXTURE25: - case GL_TEXTURE26: - case GL_TEXTURE27: - case GL_TEXTURE28: - case GL_TEXTURE29: - case GL_TEXTURE30: - case GL_TEXTURE31: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glMultiTexCoord4x(texture=0x%x), texture); - return; - } - - _es_MultiTexCoord4f(texture, (GLfloat) (s / 65536.0f), (GLfloat) (t / 65536.0f), @@ -1041,11 +1000,6 @@ _es_TexEnvx(GLenum target, GLenum pname, GLfixed param) case GL_SRC0_ALPHA: case GL_SRC1_ALPHA: case GL_SRC2_ALPHA: - if (param != GL_TEXTURE param != GL_CONSTANT param != GL_PRIMARY_COLOR param != GL_PREVIOUS param != GL_TEXTURE0 param != GL_TEXTURE1 param != GL_TEXTURE2 param != GL_TEXTURE3 param != GL_TEXTURE4 param != GL_TEXTURE5 param != GL_TEXTURE6 param != GL_TEXTURE7 param != GL_TEXTURE8 param != GL_TEXTURE9 param != GL_TEXTURE10 param != GL_TEXTURE11 param != GL_TEXTURE12 param != GL_TEXTURE13 param != GL_TEXTURE14 param != GL_TEXTURE15 param != GL_TEXTURE16 param != GL_TEXTURE17 param != GL_TEXTURE18 param != GL_TEXTURE19 param != GL_TEXTURE20 param != GL_TEXTURE21 param != GL_TEXTURE22 param != GL_TEXTURE23 param != GL_TEXTURE24 param != GL_TEXTURE25 param != GL_TEXTURE26 param != GL_TEXTURE27 param != GL_TEXTURE28 param != GL_TEXTURE29 param != GL_TEXTURE30 param != GL_TEXTURE31) { - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glTexEnvx(pname=0x%x), pname); - return; - } convert_param_value = false; break; case GL_OPERAND0_RGB: @@ -1167,11 +1121,6 @@ _es_TexEnvxv(GLenum target, GLenum pname, const GLfixed *params) case GL_SRC0_ALPHA: case GL_SRC1_ALPHA: case GL_SRC2_ALPHA: - if (params[0] != GL_TEXTURE params[0] != GL_CONSTANT params[0] != GL_PRIMARY_COLOR params[0] != GL_PREVIOUS params[0] != GL_TEXTURE0 params[0] != GL_TEXTURE1 params[0] != GL_TEXTURE2 params[0] != GL_TEXTURE3 params[0] != GL_TEXTURE4 params[0] != GL_TEXTURE5 params[0] != GL_TEXTURE6 params[0] != GL_TEXTURE7 params[0] != GL_TEXTURE8 params[0] != GL_TEXTURE9 params[0] != GL_TEXTURE10 params[0] != GL_TEXTURE11 params[0] != GL_TEXTURE12 params[0] != GL_TEXTURE13 params[0] != GL_TEXTURE14 params[0] != GL_TEXTURE15 params[0] != GL_TEXTURE16 params[0] != GL_TEXTURE17 params[0] != GL_TEXTURE18 params[0] != GL_TEXTURE19 params[0] != GL_TEXTURE20 params[0] != GL_TEXTURE21 params[0] != GL_TEXTURE22 params[0] != GL_TEXTURE23 params[0] != GL_TEXTURE24 params[0] != GL_TEXTURE25 params[0] != GL_TEXTURE26 params[0] != GL_TEXTURE27 params[0] != GL_TEXTURE28 params[0] != GL_TEXTURE29 pa! rams[0] != GL_TEXTURE30 params[0] != GL_TEXTURE31) { -
[Mesa-dev] [PATCH 02/26] mesa/es: Rearrange placement of GL_TEXTURE_MAX_ANISOTROPY_EXT in APIspec
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 1b8dae3..68e6535 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -307,6 +307,7 @@ desc name=pname value name=GL_TEXTURE_MIN_FILTER/ value name=GL_TEXTURE_MAG_FILTER/ + value name=GL_TEXTURE_MAX_ANISOTROPY_EXT category=EXT_texture_filter_anisotropic/ /desc desc name=pname category=GLES1.1 @@ -318,11 +319,6 @@ /desc /desc - desc name=pname category=EXT_texture_filter_anisotropic - value name=GL_TEXTURE_MAX_ANISOTROPY_EXT/ - desc name=params vector_size=1/ - /desc - desc name=pname category=OES_draw_texture value name=GL_TEXTURE_CROP_RECT_OES/ desc name=params vector_size=4/ -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 10/26] mesa/es: Remove redundant stencil function validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 22 -- 1 files changed, 0 insertions(+), 22 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index fde479d..0ab404b 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -943,17 +943,6 @@ param name=ref type=GLint/ param name=mask type=GLuint/ /proto - - desc name=func - value name=GL_NEVER/ - value name=GL_LESS/ - value name=GL_LEQUAL/ - value name=GL_GREATER/ - value name=GL_GEQUAL/ - value name=GL_EQUAL/ - value name=GL_NOTEQUAL/ - value name=GL_ALWAYS/ - /desc /template template name=StencilFuncSeparate @@ -970,17 +959,6 @@ value name=GL_BACK/ value name=GL_FRONT_AND_BACK/ /desc - - desc name=func - value name=GL_NEVER/ - value name=GL_LESS/ - value name=GL_LEQUAL/ - value name=GL_GREATER/ - value name=GL_GEQUAL/ - value name=GL_EQUAL/ - value name=GL_NOTEQUAL/ - value name=GL_ALWAYS/ - /desc /template template name=StencilOp -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 09/26] mesa/es: Remove redundant logic op operand validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 19 --- 1 files changed, 0 insertions(+), 19 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index c0e6bc4..fde479d 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -934,25 +934,6 @@ return type=void/ param name=opcode type=GLenum/ /proto - - desc name=opcode - value name=GL_CLEAR/ - value name=GL_SET/ - value name=GL_COPY/ - value name=GL_COPY_INVERTED/ - value name=GL_NOOP/ - value name=GL_INVERT/ - value name=GL_AND/ - value name=GL_NAND/ - value name=GL_OR/ - value name=GL_NOR/ - value name=GL_XOR/ - value name=GL_EQUIV/ - value name=GL_AND_REVERSE/ - value name=GL_AND_INVERTED/ - value name=GL_OR_REVERSE/ - value name=GL_OR_INVERTED/ - /desc /template template name=StencilFunc -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 08/26] mesa/es: Remove redundant alpha function validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 10 -- src/mesa/main/es1_conversion.c | 16 2 files changed, 0 insertions(+), 26 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index c3066af..c0e6bc4 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -882,16 +882,6 @@ param name=func type=GLenum/ param name=ref type=GLtype/ /proto - desc name=func - value name=GL_NEVER/ - value name=GL_LESS/ - value name=GL_EQUAL/ - value name=GL_LEQUAL/ - value name=GL_GREATER/ - value name=GL_NOTEQUAL/ - value name=GL_GEQUAL/ - value name=GL_ALWAYS/ - /desc /template template name=BlendFunc diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c index 32dda67..bf0b48d 100644 --- a/src/mesa/main/es1_conversion.c +++ b/src/mesa/main/es1_conversion.c @@ -38,22 +38,6 @@ void GL_APIENTRY _es_AlphaFuncx(GLenum func, GLclampx ref) { - switch(func) { - case GL_NEVER: - case GL_LESS: - case GL_EQUAL: - case GL_LEQUAL: - case GL_GREATER: - case GL_NOTEQUAL: - case GL_GEQUAL: - case GL_ALWAYS: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glAlphaFuncx(func=0x%x), func); - return; - } - _mesa_AlphaFunc(func, (GLclampf) (ref / 65536.0f)); } -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 13/26] mesa/es: Remove redundant hint mode validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 606e546..18653ca 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -109,12 +109,6 @@ desc name=target value name=GL_GENERATE_MIPMAP_HINT/ /desc - - desc name=mode - value name=GL_FASTEST/ - value name=GL_NICEST/ - value name=GL_DONT_CARE/ - /desc /template template name=Light -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 12/26] mesa/es: Remove redundant clear bitmask validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 11 --- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 53d9aa9..606e546 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -680,17 +680,6 @@ return type=void/ param name=mask type=GLbitfield/ /proto - - desc name=mask error=GL_INVALID_VALUE - value name=0/ - value name=(GL_COLOR_BUFFER_BIT)/ - value name=(GL_DEPTH_BUFFER_BIT)/ - value name=(GL_STENCIL_BUFFER_BIT)/ - value name=(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)/ - value name=(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)/ - value name=(GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)/ - value name=(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)/ - /desc /template template name=ClearColor -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 15/26] mesa/es: Remove redundant shade model mode validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index a7a1778..1b58e43 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -220,11 +220,6 @@ return type=void/ param name=mode type=GLenum/ /proto - - desc name=mode - value name=GL_FLAT/ - value name=GL_SMOOTH/ - /desc /template template name=TexParameter -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 16/26] mesa/es: Remove redundant stencil op fail/zfail/zpass validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 72 - 1 files changed, 0 insertions(+), 72 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 1b58e43..5e53218 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -911,45 +911,6 @@ param name=zfail type=GLenum/ param name=zpass type=GLenum/ /proto - - desc name=fail - value name=GL_KEEP/ - value name=GL_ZERO/ - value name=GL_REPLACE/ - value name=GL_INCR/ - value name=GL_DECR/ - value name=GL_INVERT/ - value name=GL_INCR_WRAP category=GLES2.0/ - value name=GL_DECR_WRAP category=GLES2.0/ - value name=GL_INCR_WRAP_OES category=OES_stencil_wrap/ - value name=GL_DECR_WRAP_OES category=OES_stencil_wrap/ - /desc - - desc name=zfail - value name=GL_KEEP/ - value name=GL_ZERO/ - value name=GL_REPLACE/ - value name=GL_INCR/ - value name=GL_DECR/ - value name=GL_INVERT/ - value name=GL_INCR_WRAP category=GLES2.0/ - value name=GL_DECR_WRAP category=GLES2.0/ - value name=GL_INCR_WRAP_OES category=OES_stencil_wrap/ - value name=GL_DECR_WRAP_OES category=OES_stencil_wrap/ - /desc - - desc name=zpass - value name=GL_KEEP/ - value name=GL_ZERO/ - value name=GL_REPLACE/ - value name=GL_INCR/ - value name=GL_DECR/ - value name=GL_INVERT/ - value name=GL_INCR_WRAP category=GLES2.0/ - value name=GL_DECR_WRAP category=GLES2.0/ - value name=GL_INCR_WRAP_OES category=OES_stencil_wrap/ - value name=GL_DECR_WRAP_OES category=OES_stencil_wrap/ - /desc /template template name=StencilOpSeparate @@ -960,39 +921,6 @@ param name=zfail type=GLenum/ param name=zpass type=GLenum/ /proto - - desc name=fail - value name=GL_KEEP/ - value name=GL_ZERO/ - value name=GL_REPLACE/ - value name=GL_INCR/ - value name=GL_DECR/ - value name=GL_INVERT/ - value name=GL_INCR_WRAP/ - value name=GL_DECR_WRAP/ - /desc - - desc name=zfail - value name=GL_KEEP/ - value name=GL_ZERO/ - value name=GL_REPLACE/ - value name=GL_INCR/ - value name=GL_DECR/ - value name=GL_INVERT/ - value name=GL_INCR_WRAP/ - value name=GL_DECR_WRAP/ - /desc - - desc name=zpass - value name=GL_KEEP/ - value name=GL_ZERO/ - value name=GL_REPLACE/ - value name=GL_INCR/ - value name=GL_DECR/ - value name=GL_INVERT/ - value name=GL_INCR_WRAP/ - value name=GL_DECR_WRAP/ - /desc /template template name=DepthFunc -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 14/26] mesa/es: Remove redundant light pname and light validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 58 src/mesa/main/es1_conversion.c | 52 +-- 2 files changed, 2 insertions(+), 108 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 18653ca..a7a1778 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -120,35 +120,6 @@ param name=param type=GLtype/ /vector /proto - - desc name=light - range base=GL_LIGHT from=0 to=7/ - /desc - - desc name=pname - value name=GL_AMBIENT/ - value name=GL_DIFFUSE/ - value name=GL_SPECULAR/ - value name=GL_POSITION/ - - desc name=params vector_size=4/ - /desc - - desc name=pname - value name=GL_SPOT_DIRECTION/ - - desc name=params vector_size=3/ - /desc - - desc name=pname - value name=GL_SPOT_EXPONENT/ - value name=GL_SPOT_CUTOFF/ - value name=GL_CONSTANT_ATTENUATION/ - value name=GL_LINEAR_ATTENUATION/ - value name=GL_QUADRATIC_ATTENUATION/ - - desc name=params vector_size=1/ - /desc /template template name=LightModel @@ -1179,35 +1150,6 @@ param name=pname type=GLenum/ vector name=params type=GLtype * size=dynamic/ /proto - - desc name=light - range base=GL_LIGHT from=0 to=7/ - /desc - - desc name=pname - value name=GL_AMBIENT/ - value name=GL_DIFFUSE/ - value name=GL_SPECULAR/ - value name=GL_POSITION/ - - desc name=params vector_size=4/ - /desc - - desc name=pname - value name=GL_SPOT_DIRECTION/ - - desc name=params vector_size=3/ - /desc - - desc name=pname - value name=GL_SPOT_EXPONENT/ - value name=GL_SPOT_CUTOFF/ - value name=GL_CONSTANT_ATTENUATION/ - value name=GL_LINEAR_ATTENUATION/ - value name=GL_QUADRATIC_ATTENUATION/ - - desc name=params vector_size=1/ - /desc /template template name=GetMaterial direction=get diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c index bf0b48d..468eb61 100644 --- a/src/mesa/main/es1_conversion.c +++ b/src/mesa/main/es1_conversion.c @@ -263,17 +263,7 @@ _es_GetLightxv(GLenum light, GLenum pname, GLfixed *params) unsigned int n_params = 4; GLfloat converted_params[4]; - switch(light) { - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - break; - default: + if (light GL_LIGHT0 || light GL_LIGHT7) { _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, glGetLightxv(light=0x%x), light); return; @@ -605,34 +595,6 @@ _es_LightModelxv(GLenum pname, const GLfixed *params) void GL_APIENTRY _es_Lightx(GLenum light, GLenum pname, GLfixed param) { - switch(light) { - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glLightx(light=0x%x), light); - return; - } - switch(pname) { - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - break; - default: - _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, - glLightx(pname=0x%x), pname); - return; - } - _mesa_Lightf(light, pname, (GLfloat) (param / 65536.0f)); } @@ -643,17 +605,7 @@ _es_Lightxv(GLenum light, GLenum pname, const GLfixed *params) unsigned int n_params = 4; GLfloat converted_params[4]; - switch(light) { - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - break; - default: + if (light GL_LIGHT0 || light GL_LIGHT7) { _mesa_error(_mesa_get_current_context(), GL_INVALID_ENUM, glLightxv(light=0x%x), light); return; -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 17/26] mesa/es: Remove redundant depth func validation
From: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 11 --- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 5e53218..1ce1ec7 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -928,17 +928,6 @@ return type=void/ param name=func type=GLenum/ /proto - - desc name=func - value name=GL_NEVER/ - value name=GL_LESS/ - value name=GL_EQUAL/ - value name=GL_LEQUAL/ - value name=GL_GREATER/ - value name=GL_NOTEQUAL/ - value name=GL_GEQUAL/ - value name=GL_ALWAYS/ - /desc /template template name=PixelStore -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 18/26] mesa/es: Remove redundant glGetShaderPrecisionFormat shader type validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 1ce1ec7..a0d3af2 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -3100,20 +3100,6 @@ param name=range type=GLint */ param name=precision type=GLint */ /proto - - desc name=shadertype - value name=GL_VERTEX_SHADER/ - value name=GL_FRAGMENT_SHADER/ - /desc - - desc name=precisiontype - value name=GL_LOW_FLOAT/ - value name=GL_MEDIUM_FLOAT/ - value name=GL_HIGH_FLOAT/ - value name=GL_LOW_INT/ - value name=GL_MEDIUM_INT/ - value name=GL_HIGH_INT/ - /desc /template template name=GetUniform direction=get -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 19/26] mesa/es: Remove redundant element type validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 12 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index a0d3af2..f29ece0 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -1506,12 +1506,6 @@ value name=GL_TRIANGLE_STRIP/ value name=GL_TRIANGLE_FAN/ /desc - - desc name=type - value name=GL_UNSIGNED_BYTE/ - value name=GL_UNSIGNED_SHORT/ - value name=GL_UNSIGNED_INT category=OES_element_index_uint/ - /desc /template template name=EnableClientState @@ -3171,12 +3165,6 @@ value name=GL_TRIANGLE_STRIP/ value name=GL_TRIANGLE_FAN/ /desc - - desc name=type - value name=GL_UNSIGNED_BYTE/ - value name=GL_UNSIGNED_SHORT/ - value name=GL_UNSIGNED_INT category=OES_element_index_uint/ - /desc /template template name=EGLImageTargetTexture2D -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 21/26] mesa/es: Remove redundant glGetBufferPointer pname validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 70b1462..4ac9149 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -2479,10 +2479,6 @@ value name=GL_ARRAY_BUFFER/ value name=GL_ELEMENT_ARRAY_BUFFER/ /desc - - desc name=pname - value name=GL_BUFFER_MAP_POINTER_OES/ - /desc /template template name=MapBuffer direction=get -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 20/26] mesa/es: Remove redundant glGetVertexAttribPointer pname validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index f29ece0..70b1462 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -2465,10 +2465,6 @@ param name=pname type=GLenum/ vector name=pointer type=GLvoid ** size=dynamic/ /proto - - desc name=pname - value name=GL_VERTEX_ATTRIB_ARRAY_POINTER/ - /desc /template template name=GetBufferPointer direction=get -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 22/26] mesa/es: Remove redundant glPointSizePointer type validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 4ac9149..679b748 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -198,11 +198,6 @@ param name=stride type=GLsizei/ param name=pointer type=const GLvoid */ /proto - - desc name=type - value name=GL_FLOAT/ - value name=GL_FIXED/ - /desc /template template name=Scissor -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 25/26] mesa/es: Remove redundant glFramebufferTexture3D textarget validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index dd7bf90..63a2b35 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -2916,10 +2916,6 @@ param name=level type=GLint/ param name=zoffset type=GLint/ /proto - - desc name=textarget error=GL_INVALID_OPERATION - value name=GL_TEXTURE_3D_OES category=OES_texture_3D/ - /desc /template template name=CheckFramebufferStatus direction=get -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 24/26] mesa/es: Remove redundant glGetShaderiv pname validation
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 0628298..dd7bf90 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -3019,14 +3019,6 @@ param name=pname type=GLenum/ vector name=params type=GLtype * size=dynamic/ /proto - - desc name=pname - value name=GL_SHADER_TYPE/ - value name=GL_COMPILE_STATUS/ - value name=GL_DELETE_STATUS/ - value name=GL_INFO_LOG_LENGTH/ - value name=GL_SHADER_SOURCE_LENGTH/ - /desc /template template name=GetAttachedShaders direction=get -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH 26/26] APIspec: Remove cruft about AMD_compressed_???_texture
From: Ian Romanick ian.d.roman...@intel.com Mesa doesn't support these extensions, and it seems unlikely that it ever will Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/APIspec.xml | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git a/src/mesa/main/APIspec.xml b/src/mesa/main/APIspec.xml index 63a2b35..66f5234 100644 --- a/src/mesa/main/APIspec.xml +++ b/src/mesa/main/APIspec.xml @@ -2074,14 +2074,6 @@ desc name=target value name=GL_TEXTURE_3D_OES/ /desc - - desc name=internalFormat - value name=GL_3DC_X_AMD category=AMD_compressed_3DC_texture/ - value name=GL_3DC_XY_AMD category=AMD_compressed_3DC_texture/ - value name=GL_ATC_RGB_AMD category=AMD_compressed_ATC_texture/ - value name=GL_ATC_RGBA_EXPLICIT_ALPHA_AMD category=AMD_compressed_ATC_texture/ - value name=GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD category=AMD_compressed_ATC_texture/ - /desc /template template name=CompressedTexSubImage3D @@ -2170,13 +2162,6 @@ value name=GL_PALETTE8_RGBA4_OES category=OES_compressed_paletted_texture/ value name=GL_PALETTE8_RGB5_A1_OES category=OES_compressed_paletted_texture/ - value name=GL_3DC_X_AMD category=AMD_compressed_3DC_texture/ - value name=GL_3DC_XY_AMD category=AMD_compressed_3DC_texture/ - - value name=GL_ATC_RGB_AMD category=AMD_compressed_ATC_texture/ - value name=GL_ATC_RGBA_EXPLICIT_ALPHA_AMD category=AMD_compressed_ATC_texture/ - value name=GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD category=AMD_compressed_ATC_texture/ - value name=GL_COMPRESSED_RGB_S3TC_DXT1_EXT category=EXT_texture_compression_dxt1/ value name=GL_COMPRESSED_RGBA_S3TC_DXT1_EXT category=EXT_texture_compression_dxt1/ /desc -- 1.7.6.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53664] es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration]
https://bugs.freedesktop.org/show_bug.cgi?id=53664 --- Comment #3 from Ian Romanick i...@freedesktop.org 2012-08-18 03:16:20 UTC --- The only way I could see this occurring is if FEATURE_OES_draw_texture was somehow undefined. This only happens when FEATURE_ES1 is not defined. In this case, es1_conversion.c shouldn't even be built. If this is scons-only, then my speculative SConscript changes are, in fact, broken. :( -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: do more teximage error checking for generic compressed formats
On 08/16/2012 02:29 PM, Anuj Phogat wrote: On Thu, Aug 16, 2012 at 10:23 AM, Brian Paul bri...@vmware.com wrote: On 08/15/2012 02:31 PM, Anuj Phogat wrote: On Tue, May 1, 2012 at 2:07 PM, Brian Paul bri...@vmware.com mailto:bri...@vmware.com wrote: When glTexImage or glCopyTexImage is called with internalFormat being a generic compressed format (like GL_COMPRESSED_RGB) we need to do the same error checks as for specific compressed formats. In particular, check if the texture target is compatible with the format. None of the texture compression formats we support so far work with GL_TEXTURE_1D, for example. See also https://bugs.freedesktop.org/show_bug.cgi?id=49124 Brian, generic texture compression formats with GL_TEXTURE_1D seem to work fine on i965 drivers. Does that wind up using one of the DXT formats? It uses RGTC for GL_COMPRESSED_RED GL_COMPRESSED_RG FXT for GL_COMPRESSED_RGB GL_COMPRESSED_RGBA I wonder if that produces correct results. There are lots of limitations with those formats... I verified this by allowing generic texture compression formats for GL_TEXTURE_1D in piglit copyteximage test case and reverting the changes due to this patch on mesa. Is this an issue only on swrast? That's what the bug reported, don't recall testing other drivers. Returning GL_INVALID_ENUM error for generic texture compression formats in glTexImage1D() and glCopyTexImage1D() doesn't seem to follow the OpenGL specification. Spec does allow GL_INVALID_ENUM error for a similar scenario in case of glCompressedTexImage1D(). Please correct me if I'm missing something. I guess I'd like to check what either NVIDIA or AMD do in some of these cases. AFAIK, the various DXT, LATC, etc compressed formats are only spec'd to work with 2D textures, not 1D. Since 1D textures are generally pretty small to start with, there's not a lot of value in compressed 1D textures. Plus, if a compressed 1D texture uses 4 or 8 bytes to store a 4x1 block of texels, there's only 50% or 0% memory savings with compression. Most of the specific formats are specified to only work with 2D textures. From EXT_texture_compression_s3tc (note that 1D variants of TexImage, CopyTexImage, etc are missing): Accepted by the internalformat parameter of TexImage2D, CopyTexImage2D, and CompressedTexImage2DARB and the format parameter of CompressedTexSubImage2DARB: COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 Same for 3DFX_texture_compression_FXT1: Accepted by the internalformat parameter of TexImage2D, CopyTexImage2D, TexImage3D, CopyTexImage3D, and by the internalformat and format parameters of CompressedTexImage2D_ARB, CompressedTexSubImage2D_ARB, CompressedTexImage3D_ARB, CompressedTexSubImage3D_ARB: COMPRESSED_RGB_FXT1_3DFX 0x86B0 COMPRESSED_RGBA_FXT1_3DFX 0x86B1 However, the generic formats should be accepted. From ARB_texture_compression: Accepted by the internalformat parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D, and CopyTexImage2D: COMPRESSED_ALPHA_ARB0x84E9 COMPRESSED_LUMINANCE_ARB0x84EA COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB COMPRESSED_INTENSITY_ARB0x84EC COMPRESSED_RGB_ARB 0x84ED COMPRESSED_RGBA_ARB 0x84EE When the application specifies a generic format, the driver is always free to pick an uncompressed format. Many Mesa drivers (primarily the ones we removed a couple years ago) have done that for ages. :) If you can post your patch for the piglit test I can run it with the NVIDIA driver and see what it does. I'll send out a follow up patch for piglit test case which you can use for testing. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] glsl: Fix array overflow.
On 08/14/2012 06:40 PM, Stéphane Marchesin wrote: Otherwise we run past the end of the array and crash. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Stéphane Marchesin marc...@chromium.org That's funny. I completely missed this patch on the list, but ended up writing the same thing. The problem is that the linker does things in a slightly wonkey order: 1. Count the used samplers. 2. Allocate some uniform resources to the samplers. 3. Fail the link if too many samplers were used. If way too many are used, step #2 will stomp on the stack (from this loop) and crash. My commit message looked like: linker: Avoid buffer over-run in parcel_out_uniform_storage::visit_field When too may uniforms are used, the error will be caught in check_resources (src/glsl/linker.cpp). Could you capture at least the last bit in the commit message? Otherwise, it has my Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/link_uniforms.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 25dc1d7..eef9025 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -313,7 +313,7 @@ private: const gl_texture_index target = base_type-sampler_index(); const unsigned shadow = base_type-sampler_shadow; for (unsigned i = this-uniforms[id].sampler -; i this-next_sampler +; i MIN2(this-next_sampler, MAX_SAMPLERS) ; i++) { this-targets[i] = target; this-shader_samplers_used |= 1U i; ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53664] es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration]
https://bugs.freedesktop.org/show_bug.cgi?id=53664 --- Comment #4 from Darxus dar...@chaosreigns.com 2012-08-18 04:11:27 UTC --- Created attachment 65721 -- https://bugs.freedesktop.org/attachment.cgi?id=65721 make log I'm also getting this. Using: ./autogen.sh --prefix=$installdir --enable-gles2 --disable-gallium-egl --with-egl-platforms=wayland,x11,drm --enable-gbm --enable-shared-glapi --with-gallium-drivers=r300,r600,swrast,nouveau,svga Attaching configure and make logs. Let me know if I can get you anything else. I'll work on bisecting. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53664] es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration]
https://bugs.freedesktop.org/show_bug.cgi?id=53664 --- Comment #5 from Darxus dar...@chaosreigns.com 2012-08-18 04:12:08 UTC --- Created attachment 65722 -- https://bugs.freedesktop.org/attachment.cgi?id=65722 configure log -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [Bug 53664] es1_conversion.c:130:5: error: implicit declaration of function '_mesa_DrawTexf' [-Werror=implicit-function-declaration]
https://bugs.freedesktop.org/show_bug.cgi?id=53664 Darxus dar...@chaosreigns.com changed: What|Removed |Added CC||dar...@chaosreigns.com --- Comment #6 from Darxus dar...@chaosreigns.com 2012-08-18 04:14:15 UTC --- First known bad commit: 34472a0d8713c4eb300c9d1de0844c8b78bcf1ab Last known good commit: d707e337f5f9a7b6ed465ade1b0b7c06606dde22 And they're sequential... no bisecting for me. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 1/2] mesa: querying GL_TEXTURE_COMPRESSED_IMAGE_SIZE for a buffer obj is illegal
On 08/17/2012 09:58 AM, Brian Paul wrote: GL_INVALID_OPERATION is to be raised when querying a non-compressed image/buffer. Since a buffer object can't have a compressed format this query always generates an error. --- src/mesa/main/texparam.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 8a5abe5..5a5547d 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1136,13 +1136,9 @@ get_tex_level_parameter_buffer(struct gl_context *ctx, /* GL_ARB_texture_compression */ case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - if (_mesa_is_format_compressed(texFormat) - !_mesa_is_proxy_texture(target)) { -*params = _mesa_format_image_size(texFormat, bo-Size, 0, 0); - } else { -_mesa_error(ctx, GL_INVALID_OPERATION, -glGetTexLevelParameter[if]v(pname)); - } + /* Always illegal for GL_TEXTURE_BUFFER */ + _mesa_error(ctx, GL_INVALID_OPERATION, + glGetTexLevelParameter[if]v(pname)); break; /* GL_ARB_texture_float */ Oops. Yeah, that does make sense. Good call. For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org Thanks as always, Brian! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev