On 31/05/16 13:22, Emil Velikov wrote:
> On 31 May 2016 at 12:15, Alejandro Piñeiro <[email protected]> wrote:
>> Probably you are already aware, but just in case. Since this patch got
>> committed (master commit 220d8c) mesa builds fail when using some build
>> options:
>>
> "some build options" is the key here. What are they ?

I use jhbuild to build mesa, on my .jhbuildrc I have the following:

os.environ['CFLAGS'] = '-Wall -g3 -O0 -ggdb3'
os.environ['CXXFLAGS'] = '-Wall -g3 -O0 -ggdb3'

autogenargs='--disable-static'
module_autogenargs['mesa'] = '--disable-static --enable-debug
--with-dri-drivers=i965 --with-gallium-drivers=swrast
--with-vulkan-drivers=intel'

FWIW, I also tried to tweak a little those options, without too much
success.

Just in case it is useful, I have attached my config.log.

>> <skip>
>>
>> anv_formats.c:427:6: error: no previous prototype for
>> ‘anv_GetPhysicalDeviceFormatProperties’ [-Werror=missing-prototypes]
>>  void anv_GetPhysicalDeviceFormatProperties(
>>       ^
>> anv_formats.c:440:10: error: no previous prototype for
>> ‘anv_GetPhysicalDeviceImageFormatProperties’ [-Werror=missing-prototypes]
>>  VkResult anv_GetPhysicalDeviceImageFormatProperties(
>>           ^
>> anv_formats.c:590:6: error: no previous prototype for
>> ‘anv_GetPhysicalDeviceSparseImageFormatProperties’
>> [-Werror=missing-prototypes]
>>  void anv_GetPhysicalDeviceSparseImageFormatProperties(
>>       ^
>> cc1: some warnings being treated as errors
>> Makefile:1305: recipe for target 'anv_formats.lo' failed
>> make[4]: *** [anv_formats.lo] Error 1
>> anv_image.c:255:1: error: no previous prototype for ‘anv_CreateImage’
>> [-Werror=missing-prototypes]
>>  anv_CreateImage(VkDevice device,
>>
> Looking at these ... I'm not sure how the commit can cause such an
> issue. Have you tried cleaning your srcdir (via git clean -fxd) and
> your builddir ?

Yes, I tried git clean -fdx. Same error.

> If that does not help can you attach your generated anv_entrypoints.[ch]

Yes, just done.

Thanks in advance

/*
 * Copyright © 2015 Intel Corporation
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

/* DO NOT EDIT! This is a generated file. */

#include "anv_private.h"

struct anv_entrypoint {
   uint32_t name;
   uint32_t hash;
};

/* We use a big string constant to avoid lots of reloctions from the entry
 * point table to lots of little strings. The entries in the entry point table
 * store the index into this big string.
 */

static const char strings[] =
   ;

/* Weak aliases for all potential validate functions. These will resolve to
 * NULL if they're not defined, which lets the resolve_entrypoint() function
 * either pick a validate wrapper if available or just plug in the actual
 * entry point.
 */


static const struct anv_entrypoint entrypoints[] = {
};


const struct anv_dispatch_table anv_layer = {
};


const struct anv_dispatch_table validate_layer = {
};


const struct anv_dispatch_table gen7_layer = {
};


const struct anv_dispatch_table gen75_layer = {
};


const struct anv_dispatch_table gen8_layer = {
};


const struct anv_dispatch_table gen9_layer = {
};


#ifdef DEBUG
static bool enable_validate = true;
#else
static bool enable_validate = false;
#endif

/* We can't use symbols that need resolving (like, oh, getenv) in the resolve
 * function. This means that we have to determine whether or not to use the
 * validation layer sometime before that. The constructor function attribute asks
 * the dynamic linker to invoke determine_validate() at dlopen() time which
 * works.
 */
static void __attribute__ ((constructor))
determine_validate(void)
{
   const char *s = getenv("ANV_VALIDATE");

   if (s)
      enable_validate = atoi(s);
}

static const struct brw_device_info *dispatch_devinfo;

void
anv_set_dispatch_devinfo(const struct brw_device_info *devinfo)
{
   dispatch_devinfo = devinfo;
}

void * __attribute__ ((noinline))
anv_resolve_entrypoint(uint32_t index)
{
   if (enable_validate && validate_layer.entrypoints[index])
      return validate_layer.entrypoints[index];

   if (dispatch_devinfo == NULL) {
      return anv_layer.entrypoints[index];
   }

   switch (dispatch_devinfo->gen) {
   case 9:
      if (gen9_layer.entrypoints[index])
         return gen9_layer.entrypoints[index];
      /* fall through */
   case 8:
      if (gen8_layer.entrypoints[index])
         return gen8_layer.entrypoints[index];
      /* fall through */
   case 7:
      if (dispatch_devinfo->is_haswell && gen75_layer.entrypoints[index])
         return gen75_layer.entrypoints[index];

      if (gen7_layer.entrypoints[index])
         return gen7_layer.entrypoints[index];
      /* fall through */
   case 0:
      return anv_layer.entrypoints[index];
   default:
      unreachable("unsupported gen\n");
   }
}

/* Hash table stats:
 * size 256 entries
 * collisions  entries
 *      0         0
 *      1         0
 *      2         0
 *      3         0
 *      4         0
 *      5         0
 *      6         0
 *      7         0
 *      8         0
 *      9+        0
 */

#define none 0xffff

static const uint16_t map[] = {
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
      none,   none,   none,   none,   none,   none,   none,   none,
};

void *
anv_lookup_entrypoint(const char *name)
{
   static const uint32_t prime_factor = 5024183;
   static const uint32_t prime_step = 19;
   const struct anv_entrypoint *e;
   uint32_t hash, h, i;
   const char *p;

   hash = 0;
   for (p = name; *p; p++)
      hash = hash * prime_factor + *p;

   h = hash;
   do {
      i = map[h & 255];
      if (i == none)
         return NULL;
      e = &entrypoints[i];
      h += prime_step;
   } while (e->hash != hash);

   if (strcmp(name, strings + e->name) != 0)
      return NULL;

   return anv_resolve_entrypoint(i);
}

/* This file generated from vk_gen.py, don't edit directly. */

struct anv_dispatch_table {
   union {
      void *entrypoints[0];
      struct {
      };

   };

};

void anv_set_dispatch_devinfo(const struct brw_device_info *info);

Attachment: config.log.xz
Description: application/xz

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to