diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-02-26 12:20:31 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-02-26 12:20:31 +0000 |
commit | 9b2e362559110085d2ff9b90fea11fa81e704a78 (patch) | |
tree | b114259e6fecf369e1e7b90f3bb8116fa08b1cf1 /lib/mesa/src | |
parent | b5fce4e6eb297a6f7fabd0d6c6b4ffdfefa6ad8b (diff) |
Import Mesa 13.0.5
Diffstat (limited to 'lib/mesa/src')
50 files changed, 887 insertions, 505 deletions
diff --git a/lib/mesa/src/amd/common/ac_nir_to_llvm.c b/lib/mesa/src/amd/common/ac_nir_to_llvm.c index ccf10ac11..4f816a412 100644 --- a/lib/mesa/src/amd/common/ac_nir_to_llvm.c +++ b/lib/mesa/src/amd/common/ac_nir_to_llvm.c @@ -3946,7 +3946,7 @@ static void handle_shader_output_decl(struct nir_to_llvm_context *ctx, struct nir_variable *variable) { - int idx = variable->data.location; + int idx = variable->data.location + variable->data.index; unsigned attrib_count = glsl_count_attribute_slots(variable->type, false); variable->data.driver_location = idx * 4; @@ -3976,7 +3976,7 @@ handle_shader_output_decl(struct nir_to_llvm_context *ctx, si_build_alloca_undef(ctx, ctx->f32, ""); } } - ctx->output_mask |= ((1ull << attrib_count) - 1) << variable->data.location; + ctx->output_mask |= ((1ull << attrib_count) - 1) << idx; } static void diff --git a/lib/mesa/src/amd/vulkan/Makefile.am b/lib/mesa/src/amd/vulkan/Makefile.am index c559a9503..47cbc4a6e 100644 --- a/lib/mesa/src/amd/vulkan/Makefile.am +++ b/lib/mesa/src/amd/vulkan/Makefile.am @@ -32,9 +32,6 @@ lib_LTLIBRARIES = libvulkan_radeon.la # The gallium includes are for the util/u_math.h include from main/macros.h AM_CPPFLAGS = \ - $(AMDGPU_CFLAGS) \ - $(VALGRIND_CFLAGS) \ - $(DEFINES) \ -I$(top_srcdir)/include \ -I$(top_builddir)/src \ -I$(top_srcdir)/src \ @@ -48,7 +45,10 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/mesa \ -I$(top_srcdir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/gallium/auxiliary \ - -I$(top_srcdir)/src/gallium/include + -I$(top_srcdir)/src/gallium/include \ + $(AMDGPU_CFLAGS) \ + $(VALGRIND_CFLAGS) \ + $(DEFINES) AM_CFLAGS = \ $(VISIBILITY_CFLAGS) \ diff --git a/lib/mesa/src/amd/vulkan/radv_cmd_buffer.c b/lib/mesa/src/amd/vulkan/radv_cmd_buffer.c index 9517e7a13..837cf585d 100644 --- a/lib/mesa/src/amd/vulkan/radv_cmd_buffer.c +++ b/lib/mesa/src/amd/vulkan/radv_cmd_buffer.c @@ -2283,9 +2283,11 @@ void radv_CmdPipelineBarrier( case VK_ACCESS_INDIRECT_COMMAND_READ_BIT: case VK_ACCESS_INDEX_READ_BIT: case VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT: - case VK_ACCESS_UNIFORM_READ_BIT: flush_bits |= RADV_CMD_FLAG_INV_VMEM_L1; break; + case VK_ACCESS_UNIFORM_READ_BIT: + flush_bits |= RADV_CMD_FLAG_INV_VMEM_L1 | RADV_CMD_FLAG_INV_SMEM_L1; + break; case VK_ACCESS_SHADER_READ_BIT: flush_bits |= RADV_CMD_FLAG_INV_GLOBAL_L2; break; diff --git a/lib/mesa/src/amd/vulkan/radv_device.c b/lib/mesa/src/amd/vulkan/radv_device.c index 86d577782..c0940c169 100644 --- a/lib/mesa/src/amd/vulkan/radv_device.c +++ b/lib/mesa/src/amd/vulkan/radv_device.c @@ -866,7 +866,7 @@ VkResult radv_AllocateMemory( flags |= RADEON_FLAG_NO_CPU_ACCESS; else flags |= RADEON_FLAG_CPU_ACCESS; - mem->bo = device->ws->buffer_create(device->ws, alloc_size, 32768, + mem->bo = device->ws->buffer_create(device->ws, alloc_size, 65536, domain, flags); if (!mem->bo) { @@ -1823,3 +1823,48 @@ void radv_DestroySampler( return; vk_free2(&device->alloc, pAllocator, sampler); } + + +/* vk_icd.h does not declare this function, so we declare it here to + * suppress Wmissing-prototypes. + */ +PUBLIC VKAPI_ATTR VkResult VKAPI_CALL +vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t *pSupportedVersion); + +PUBLIC VKAPI_ATTR VkResult VKAPI_CALL +vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t *pSupportedVersion) +{ + /* For the full details on loader interface versioning, see + * <https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/loader/LoaderAndLayerInterface.md>. + * What follows is a condensed summary, to help you navigate the large and + * confusing official doc. + * + * - Loader interface v0 is incompatible with later versions. We don't + * support it. + * + * - In loader interface v1: + * - The first ICD entrypoint called by the loader is + * vk_icdGetInstanceProcAddr(). The ICD must statically expose this + * entrypoint. + * - The ICD must statically expose no other Vulkan symbol unless it is + * linked with -Bsymbolic. + * - Each dispatchable Vulkan handle created by the ICD must be + * a pointer to a struct whose first member is VK_LOADER_DATA. The + * ICD must initialize VK_LOADER_DATA.loadMagic to ICD_LOADER_MAGIC. + * - The loader implements vkCreate{PLATFORM}SurfaceKHR() and + * vkDestroySurfaceKHR(). The ICD must be capable of working with + * such loader-managed surfaces. + * + * - Loader interface v2 differs from v1 in: + * - The first ICD entrypoint called by the loader is + * vk_icdNegotiateLoaderICDInterfaceVersion(). The ICD must + * statically expose this entrypoint. + * + * - Loader interface v3 differs from v2 in: + * - The ICD must implement vkCreate{PLATFORM}SurfaceKHR(), + * vkDestroySurfaceKHR(), and other API which uses VKSurfaceKHR, + * because the loader no longer does so. + */ + *pSupportedVersion = MIN2(*pSupportedVersion, 3u); + return VK_SUCCESS; +} diff --git a/lib/mesa/src/amd/vulkan/radv_timestamp.h b/lib/mesa/src/amd/vulkan/radv_timestamp.h index f59f3b834..ac6414efb 100644 --- a/lib/mesa/src/amd/vulkan/radv_timestamp.h +++ b/lib/mesa/src/amd/vulkan/radv_timestamp.h @@ -1 +1 @@ -#define RADV_TIMESTAMP "1483631585" +#define RADV_TIMESTAMP "1487591265" diff --git a/lib/mesa/src/amd/vulkan/radv_wsi.c b/lib/mesa/src/amd/vulkan/radv_wsi.c index 1f1ab1c80..af9c4d505 100644 --- a/lib/mesa/src/amd/vulkan/radv_wsi.c +++ b/lib/mesa/src/amd/vulkan/radv_wsi.c @@ -75,7 +75,7 @@ void radv_DestroySurfaceKHR( const VkAllocationCallbacks* pAllocator) { RADV_FROM_HANDLE(radv_instance, instance, _instance); - RADV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); vk_free2(&instance->alloc, pAllocator, surface); } @@ -87,7 +87,7 @@ VkResult radv_GetPhysicalDeviceSurfaceSupportKHR( VkBool32* pSupported) { RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice); - RADV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_support(surface, &device->wsi_device, @@ -101,7 +101,7 @@ VkResult radv_GetPhysicalDeviceSurfaceCapabilitiesKHR( VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice); - RADV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_capabilities(surface, pSurfaceCapabilities); @@ -114,7 +114,7 @@ VkResult radv_GetPhysicalDeviceSurfaceFormatsKHR( VkSurfaceFormatKHR* pSurfaceFormats) { RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice); - RADV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_formats(surface, &device->wsi_device, pSurfaceFormatCount, @@ -128,7 +128,7 @@ VkResult radv_GetPhysicalDeviceSurfacePresentModesKHR( VkPresentModeKHR* pPresentModes) { RADV_FROM_HANDLE(radv_physical_device, device, physicalDevice); - RADV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_present_modes(surface, pPresentModeCount, @@ -249,7 +249,7 @@ VkResult radv_CreateSwapchainKHR( VkSwapchainKHR* pSwapchain) { RADV_FROM_HANDLE(radv_device, device, _device); - RADV_FROM_HANDLE(_VkIcdSurfaceBase, surface, pCreateInfo->surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, pCreateInfo->surface); struct wsi_interface *iface = device->instance->physicalDevice.wsi_device.wsi[surface->platform]; struct wsi_swapchain *swapchain; diff --git a/lib/mesa/src/amd/vulkan/si_cmd_buffer.c b/lib/mesa/src/amd/vulkan/si_cmd_buffer.c index a61a950de..0a78e0472 100644 --- a/lib/mesa/src/amd/vulkan/si_cmd_buffer.c +++ b/lib/mesa/src/amd/vulkan/si_cmd_buffer.c @@ -371,6 +371,15 @@ void si_init_config(struct radv_physical_device *physical_device, radeon_set_context_reg(cs, R_028408_VGT_INDX_OFFSET, 0); if (physical_device->rad_info.chip_class >= CIK) { + /* If this is 0, Bonaire can hang even if GS isn't being used. + * Other chips are unaffected. These are suboptimal values, + * but we don't use on-chip GS. + */ + radeon_set_context_reg(cs, R_028A44_VGT_GS_ONCHIP_CNTL, + S_028A44_ES_VERTS_PER_SUBGRP(64) | + S_028A44_GS_PRIMS_PER_SUBGRP(4)); + + radeon_set_sh_reg(cs, R_00B51C_SPI_SHADER_PGM_RSRC3_LS, S_00B51C_CU_EN(0xffff)); radeon_set_sh_reg(cs, R_00B41C_SPI_SHADER_PGM_RSRC3_HS, 0); radeon_set_sh_reg(cs, R_00B31C_SPI_SHADER_PGM_RSRC3_ES, S_00B31C_CU_EN(0xffff)); radeon_set_sh_reg(cs, R_00B21C_SPI_SHADER_PGM_RSRC3_GS, S_00B21C_CU_EN(0xffff)); @@ -383,7 +392,6 @@ void si_init_config(struct radv_physical_device *physical_device, * * LATE_ALLOC_VS = 2 is the highest safe number. */ - radeon_set_sh_reg(cs, R_00B51C_SPI_SHADER_PGM_RSRC3_LS, S_00B51C_CU_EN(0xffff)); radeon_set_sh_reg(cs, R_00B118_SPI_SHADER_PGM_RSRC3_VS, S_00B118_CU_EN(0xffff)); radeon_set_sh_reg(cs, R_00B11C_SPI_SHADER_LATE_ALLOC_VS, S_00B11C_LIMIT(2)); } else { @@ -392,7 +400,6 @@ void si_init_config(struct radv_physical_device *physical_device, * - VS can't execute on CU0. * - If HS writes outputs to LDS, LS can't execute on CU0. */ - radeon_set_sh_reg(cs, R_00B51C_SPI_SHADER_PGM_RSRC3_LS, S_00B51C_CU_EN(0xfffe)); radeon_set_sh_reg(cs, R_00B118_SPI_SHADER_PGM_RSRC3_VS, S_00B118_CU_EN(0xfffe)); radeon_set_sh_reg(cs, R_00B11C_SPI_SHADER_LATE_ALLOC_VS, S_00B11C_LIMIT(31)); } diff --git a/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c b/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c index 02aad3c81..dc596ff05 100644 --- a/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c +++ b/lib/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c @@ -274,6 +274,19 @@ static void radv_set_micro_tile_mode(struct radeon_surf *surf, surf->micro_tile_mode = G_009910_MICRO_TILE_MODE(tile_mode); } +static unsigned cik_get_macro_tile_index(struct radeon_surf *surf) +{ + unsigned index, tileb; + + tileb = 8 * 8 * surf->bpe; + tileb = MIN2(surf->tile_split, tileb); + + for (index = 0; tileb > 64; index++) + tileb >>= 1; + + assert(index < 16); + return index; +} static int radv_amdgpu_winsys_surface_init(struct radeon_winsys *_ws, struct radeon_surf *surf) @@ -435,6 +448,7 @@ static int radv_amdgpu_winsys_surface_init(struct radeon_winsys *_ws, AddrSurfInfoIn.tileIndex = 10; /* 2D displayable */ else AddrSurfInfoIn.tileIndex = 14; /* 2D non-displayable */ + AddrSurfInfoOut.macroModeIndex = cik_get_macro_tile_index(surf); } } diff --git a/lib/mesa/src/intel/blorp/blorp_clear.c b/lib/mesa/src/intel/blorp/blorp_clear.c index 7e5015a20..f53d46116 100644 --- a/lib/mesa/src/intel/blorp/blorp_clear.c +++ b/lib/mesa/src/intel/blorp/blorp_clear.c @@ -260,6 +260,29 @@ blorp_clear(struct blorp_batch *batch, if (format == ISL_FORMAT_R9G9B9E5_SHAREDEXP) { clear_color.u32[0] = float3_to_rgb9e5(clear_color.f32); format = ISL_FORMAT_R32_UINT; + } else if (format == ISL_FORMAT_A4B4G4R4_UNORM) { + /* Broadwell and earlier cannot render to this format so we need to work + * around it by swapping the colors around and using B4G4R4A4 instead. + */ + + /* First, we apply the swizzle. */ + union isl_color_value old; + assert((unsigned)(swizzle.r - ISL_CHANNEL_SELECT_RED) < 4); + assert((unsigned)(swizzle.g - ISL_CHANNEL_SELECT_RED) < 4); + assert((unsigned)(swizzle.b - ISL_CHANNEL_SELECT_RED) < 4); + assert((unsigned)(swizzle.a - ISL_CHANNEL_SELECT_RED) < 4); + old.u32[swizzle.r - ISL_CHANNEL_SELECT_RED] = clear_color.u32[0]; + old.u32[swizzle.g - ISL_CHANNEL_SELECT_RED] = clear_color.u32[1]; + old.u32[swizzle.b - ISL_CHANNEL_SELECT_RED] = clear_color.u32[2]; + old.u32[swizzle.a - ISL_CHANNEL_SELECT_RED] = clear_color.u32[3]; + swizzle = ISL_SWIZZLE_IDENTITY; + + /* Now we re-order for the new format */ + clear_color.u32[0] = old.u32[1]; + clear_color.u32[1] = old.u32[2]; + clear_color.u32[2] = old.u32[3]; + clear_color.u32[3] = old.u32[0]; + format = ISL_FORMAT_B4G4R4A4_UNORM; } memcpy(¶ms.wm_inputs, clear_color.f32, sizeof(float) * 4); diff --git a/lib/mesa/src/intel/isl/isl_format.c b/lib/mesa/src/intel/isl/isl_format.c index daf2d8134..1a6727b50 100644 --- a/lib/mesa/src/intel/isl/isl_format.c +++ b/lib/mesa/src/intel/isl/isl_format.c @@ -217,7 +217,11 @@ static const struct surface_format_info format_info[] = { SF(50, 50, x, x, x, x, x, x, x, x, P8A8_UNORM_PALETTE0) SF(50, 50, x, x, x, x, x, x, x, x, P8A8_UNORM_PALETTE1) SF( x, x, x, x, x, x, x, x, x, x, A1B5G5R5_UNORM) - SF(90, 90, x, x, 90, x, x, x, x, x, A4B4G4R4_UNORM) + /* According to the PRM, A4B4G4R4_UNORM isn't supported until Sky Lake + * but empirical testing indicates that at least sampling works just fine + * on Broadwell. + */ + SF(80, 80, x, x, 90, x, x, x, x, x, A4B4G4R4_UNORM) SF(90, x, x, x, x, x, x, x, x, x, L8A8_UINT) SF(90, x, x, x, x, x, x, x, x, x, L8A8_SINT) SF( Y, Y, x, 45, Y, Y, Y, x, x, x, R8_UNORM) diff --git a/lib/mesa/src/intel/vulkan/anv_cmd_buffer.c b/lib/mesa/src/intel/vulkan/anv_cmd_buffer.c index 44ae67d01..994aec996 100644 --- a/lib/mesa/src/intel/vulkan/anv_cmd_buffer.c +++ b/lib/mesa/src/intel/vulkan/anv_cmd_buffer.c @@ -288,9 +288,12 @@ VkResult anv_AllocateCommandBuffers( break; } - if (result != VK_SUCCESS) + if (result != VK_SUCCESS) { anv_FreeCommandBuffers(_device, pAllocateInfo->commandPool, i, pCommandBuffers); + for (i = 0; i < pAllocateInfo->commandBufferCount; i++) + pCommandBuffers[i] = VK_NULL_HANDLE; + } return result; } diff --git a/lib/mesa/src/intel/vulkan/anv_descriptor_set.c b/lib/mesa/src/intel/vulkan/anv_descriptor_set.c index 94c3f03a6..10e573de0 100644 --- a/lib/mesa/src/intel/vulkan/anv_descriptor_set.c +++ b/lib/mesa/src/intel/vulkan/anv_descriptor_set.c @@ -329,18 +329,18 @@ VkResult anv_CreateDescriptorPool( } } - const size_t size = - sizeof(*pool) + + const size_t pool_size = pCreateInfo->maxSets * sizeof(struct anv_descriptor_set) + descriptor_count * sizeof(struct anv_descriptor) + buffer_count * sizeof(struct anv_buffer_view); + const size_t total_size = sizeof(*pool) + pool_size; - pool = vk_alloc2(&device->alloc, pAllocator, size, 8, + pool = vk_alloc2(&device->alloc, pAllocator, total_size, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (!pool) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); - pool->size = size; + pool->size = pool_size; pool->next = 0; pool->free_list = EMPTY; diff --git a/lib/mesa/src/intel/vulkan/anv_device.c b/lib/mesa/src/intel/vulkan/anv_device.c index 53338564c..fd55c0469 100644 --- a/lib/mesa/src/intel/vulkan/anv_device.c +++ b/lib/mesa/src/intel/vulkan/anv_device.c @@ -552,8 +552,8 @@ void anv_GetPhysicalDeviceProperties( .viewportSubPixelBits = 13, /* We take a float? */ .minMemoryMapAlignment = 4096, /* A page */ .minTexelBufferOffsetAlignment = 1, - .minUniformBufferOffsetAlignment = 1, - .minStorageBufferOffsetAlignment = 1, + .minUniformBufferOffsetAlignment = 16, + .minStorageBufferOffsetAlignment = 4, .minTexelOffset = -8, .maxTexelOffset = 7, .minTexelGatherOffset = -8, @@ -616,7 +616,14 @@ void anv_GetPhysicalDeviceQueueFamilyProperties( return; } - assert(*pCount >= 1); + /* The spec implicitly allows the incoming count to be 0. From the Vulkan + * 1.0.38 spec, Section 4.1 Physical Devices: + * + * If the value referenced by pQueueFamilyPropertyCount is not 0 [then + * do stuff]. + */ + if (*pCount == 0) + return; *pQueueFamilyProperties = (VkQueueFamilyProperties) { .queueFlags = VK_QUEUE_GRAPHICS_BIT | @@ -626,6 +633,8 @@ void anv_GetPhysicalDeviceQueueFamilyProperties( .timestampValidBits = 36, /* XXX: Real value here */ .minImageTransferGranularity = (VkExtent3D) { 1, 1, 1 }, }; + + *pCount = 1; } void anv_GetPhysicalDeviceMemoryProperties( @@ -1989,3 +1998,47 @@ void anv_DestroyFramebuffer( vk_free2(&device->alloc, pAllocator, fb); } + +/* vk_icd.h does not declare this function, so we declare it here to + * suppress Wmissing-prototypes. + */ +PUBLIC VKAPI_ATTR VkResult VKAPI_CALL +vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion); + +PUBLIC VKAPI_ATTR VkResult VKAPI_CALL +vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pSupportedVersion) +{ + /* For the full details on loader interface versioning, see + * <https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/loader/LoaderAndLayerInterface.md>. + * What follows is a condensed summary, to help you navigate the large and + * confusing official doc. + * + * - Loader interface v0 is incompatible with later versions. We don't + * support it. + * + * - In loader interface v1: + * - The first ICD entrypoint called by the loader is + * vk_icdGetInstanceProcAddr(). The ICD must statically expose this + * entrypoint. + * - The ICD must statically expose no other Vulkan symbol unless it is + * linked with -Bsymbolic. + * - Each dispatchable Vulkan handle created by the ICD must be + * a pointer to a struct whose first member is VK_LOADER_DATA. The + * ICD must initialize VK_LOADER_DATA.loadMagic to ICD_LOADER_MAGIC. + * - The loader implements vkCreate{PLATFORM}SurfaceKHR() and + * vkDestroySurfaceKHR(). The ICD must be capable of working with + * such loader-managed surfaces. + * + * - Loader interface v2 differs from v1 in: + * - The first ICD entrypoint called by the loader is + * vk_icdNegotiateLoaderICDInterfaceVersion(). The ICD must + * statically expose this entrypoint. + * + * - Loader interface v3 differs from v2 in: + * - The ICD must implement vkCreate{PLATFORM}SurfaceKHR(), + * vkDestroySurfaceKHR(), and other API which uses VKSurfaceKHR, + * because the loader no longer does so. + */ + *pSupportedVersion = MIN2(*pSupportedVersion, 3u); + return VK_SUCCESS; +} diff --git a/lib/mesa/src/intel/vulkan/anv_formats.c b/lib/mesa/src/intel/vulkan/anv_formats.c index 875a7d33a..f432243b1 100644 --- a/lib/mesa/src/intel/vulkan/anv_formats.c +++ b/lib/mesa/src/intel/vulkan/anv_formats.c @@ -295,10 +295,10 @@ anv_get_format(const struct gen_device_info *devinfo, VkFormat vk_format, } } - /* The B4G4R4A4 format isn't available prior to Sky Lake so we have to fall + /* The B4G4R4A4 format isn't available prior to Broadwell so we have to fall * back to a format with a more complex swizzle. */ - if (vk_format == VK_FORMAT_B4G4R4A4_UNORM_PACK16 && devinfo->gen < 9) { + if (vk_format == VK_FORMAT_B4G4R4A4_UNORM_PACK16 && devinfo->gen < 8) { return (struct anv_format) { .isl_format = ISL_FORMAT_B4G4R4A4_UNORM, .swizzle = ISL_SWIZZLE(GREEN, RED, ALPHA, BLUE), diff --git a/lib/mesa/src/intel/vulkan/anv_image.c b/lib/mesa/src/intel/vulkan/anv_image.c index 10491f443..41574b301 100644 --- a/lib/mesa/src/intel/vulkan/anv_image.c +++ b/lib/mesa/src/intel/vulkan/anv_image.c @@ -79,8 +79,11 @@ choose_isl_surf_usage(VkImageUsageFlags vk_usage, isl_usage |= ISL_SURF_USAGE_TEXTURE_BIT; } - if (vk_usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT) { - /* blorp implements transfers by rendering into the destination image. */ + if (vk_usage & VK_IMAGE_USAGE_TRANSFER_DST_BIT && + aspect == VK_IMAGE_ASPECT_COLOR_BIT) { + /* blorp implements transfers by rendering into the destination image. + * Only request this with color images, as we deal with depth/stencil + * formats differently. */ isl_usage |= ISL_SURF_USAGE_RENDER_TARGET_BIT; } @@ -190,6 +193,8 @@ make_surface(const struct anv_device *dev, anv_finishme("Implement gen7 HiZ"); } else if (vk_info->mipLevels > 1) { anv_finishme("Test multi-LOD HiZ"); + } else if (vk_info->arrayLayers > 1) { + anv_finishme("Implement multi-arrayLayer HiZ clears and resolves"); } else if (dev->info.gen == 8 && vk_info->samples > 1) { anv_finishme("Test gen8 multisampled HiZ"); } else { diff --git a/lib/mesa/src/intel/vulkan/anv_timestamp.h b/lib/mesa/src/intel/vulkan/anv_timestamp.h index be205c7ee..6f0f9c1ba 100644 --- a/lib/mesa/src/intel/vulkan/anv_timestamp.h +++ b/lib/mesa/src/intel/vulkan/anv_timestamp.h @@ -1 +1 @@ -#define ANV_TIMESTAMP "1483631584" +#define ANV_TIMESTAMP "1487591265" diff --git a/lib/mesa/src/intel/vulkan/anv_wsi.c b/lib/mesa/src/intel/vulkan/anv_wsi.c index c504658c5..c2510f37f 100644 --- a/lib/mesa/src/intel/vulkan/anv_wsi.c +++ b/lib/mesa/src/intel/vulkan/anv_wsi.c @@ -74,7 +74,7 @@ void anv_DestroySurfaceKHR( const VkAllocationCallbacks* pAllocator) { ANV_FROM_HANDLE(anv_instance, instance, _instance); - ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); if (!surface) return; @@ -89,7 +89,7 @@ VkResult anv_GetPhysicalDeviceSurfaceSupportKHR( VkBool32* pSupported) { ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice); - ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_support(surface, &device->wsi_device, @@ -103,7 +103,7 @@ VkResult anv_GetPhysicalDeviceSurfaceCapabilitiesKHR( VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice); - ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_capabilities(surface, pSurfaceCapabilities); @@ -116,7 +116,7 @@ VkResult anv_GetPhysicalDeviceSurfaceFormatsKHR( VkSurfaceFormatKHR* pSurfaceFormats) { ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice); - ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_formats(surface, &device->wsi_device, pSurfaceFormatCount, @@ -130,7 +130,7 @@ VkResult anv_GetPhysicalDeviceSurfacePresentModesKHR( VkPresentModeKHR* pPresentModes) { ANV_FROM_HANDLE(anv_physical_device, device, physicalDevice); - ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, _surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface); struct wsi_interface *iface = device->wsi_device.wsi[surface->platform]; return iface->get_present_modes(surface, pPresentModeCount, @@ -260,7 +260,7 @@ VkResult anv_CreateSwapchainKHR( VkSwapchainKHR* pSwapchain) { ANV_FROM_HANDLE(anv_device, device, _device); - ANV_FROM_HANDLE(_VkIcdSurfaceBase, surface, pCreateInfo->surface); + ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, pCreateInfo->surface); struct wsi_interface *iface = device->instance->physicalDevice.wsi_device.wsi[surface->platform]; struct wsi_swapchain *swapchain; diff --git a/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c b/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c index 4e92ccac2..3aead8663 100644 --- a/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c +++ b/lib/mesa/src/intel/vulkan/genX_cmd_buffer.c @@ -54,8 +54,6 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) { struct anv_device *device = cmd_buffer->device; -/* XXX: Do we need this on more than just BDW? */ -#if (GEN_GEN >= 8) /* Emit a render target cache flush. * * This isn't documented anywhere in the PRM. However, it seems to be @@ -64,9 +62,10 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) * clear depth, reset state base address, and then go render stuff. */ anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) { + pc.DCFlushEnable = true; pc.RenderTargetCacheFlushEnable = true; + pc.CommandStreamerStallEnable = true; } -#endif anv_batch_emit(&cmd_buffer->batch, GENX(STATE_BASE_ADDRESS), sba) { sba.GeneralStateBaseAddress = (struct anv_address) { NULL, 0 }; @@ -147,6 +146,8 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) */ anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) { pc.TextureCacheInvalidationEnable = true; + pc.ConstantCacheInvalidationEnable = true; + pc.StateCacheInvalidationEnable = true; } } @@ -1759,14 +1760,17 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer) db.Height = image->extent.height - 1; db.Width = image->extent.width - 1; db.LOD = iview->isl.base_level; - db.Depth = image->array_size - 1; /* FIXME: 3-D */ db.MinimumArrayElement = iview->isl.base_array_layer; + assert(image->depth_surface.isl.dim != ISL_SURF_DIM_3D); + db.Depth = + db.RenderTargetViewExtent = + iview->isl.array_len - iview->isl.base_array_layer - 1; + #if GEN_GEN >= 8 db.SurfaceQPitch = isl_surf_get_array_pitch_el_rows(&image->depth_surface.isl) >> 2; #endif - db.RenderTargetViewExtent = 1 - 1; } } else { /* Even when no depth buffer is present, the hardware requires that @@ -1819,7 +1823,7 @@ cmd_buffer_emit_depth_stencil(struct anv_cmd_buffer *cmd_buffer) * 2-D images. Prior to Sky Lake, this field is always in rows. */ hdb.SurfaceQPitch = - isl_surf_get_array_pitch_el_rows(&image->aux_surface.isl) >> 2; + isl_surf_get_array_pitch_sa_rows(&image->aux_surface.isl) >> 2; #endif } } else { diff --git a/lib/mesa/src/mesa/drivers/common/meta_generate_mipmap.c b/lib/mesa/src/mesa/drivers/common/meta_generate_mipmap.c index bbe9d6d88..55093e955 100644 --- a/lib/mesa/src/mesa/drivers/common/meta_generate_mipmap.c +++ b/lib/mesa/src/mesa/drivers/common/meta_generate_mipmap.c @@ -182,6 +182,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, _mesa_meta_begin(ctx, MESA_META_ALL & ~MESA_META_DRAW_BUFFERS); _mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + _mesa_Disable(GL_DITHER); /* Choose between glsl version and fixed function version of * GenerateMipmap function. diff --git a/lib/mesa/src/mesa/drivers/dri/common/dri_util.c b/lib/mesa/src/mesa/drivers/dri/common/dri_util.c index 79cb0506d..fca071c51 100644 --- a/lib/mesa/src/mesa/drivers/dri/common/dri_util.c +++ b/lib/mesa/src/mesa/drivers/dri/common/dri_util.c @@ -830,6 +830,8 @@ driGLFormatToImageFormat(mesa_format format) switch (format) { case MESA_FORMAT_B5G6R5_UNORM: return __DRI_IMAGE_FORMAT_RGB565; + case MESA_FORMAT_B5G5R5A1_UNORM: + return __DRI_IMAGE_FORMAT_ARGB1555; case MESA_FORMAT_B8G8R8X8_UNORM: return __DRI_IMAGE_FORMAT_XRGB8888; case MESA_FORMAT_B10G10R10A2_UNORM: @@ -861,6 +863,8 @@ driImageFormatToGLFormat(uint32_t image_format) switch (image_format) { case __DRI_IMAGE_FORMAT_RGB565: return MESA_FORMAT_B5G6R5_UNORM; + case __DRI_IMAGE_FORMAT_ARGB1555: + return MESA_FORMAT_B5G5R5A1_UNORM; case __DRI_IMAGE_FORMAT_XRGB8888: return MESA_FORMAT_B8G8R8X8_UNORM; case __DRI_IMAGE_FORMAT_ARGB2101010: diff --git a/lib/mesa/src/mesa/drivers/dri/i915/Makefile.am b/lib/mesa/src/mesa/drivers/dri/i915/Makefile.am index 822f74c23..11b7341c7 100644 --- a/lib/mesa/src/mesa/drivers/dri/i915/Makefile.am +++ b/lib/mesa/src/mesa/drivers/dri/i915/Makefile.am @@ -30,9 +30,9 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/mesa/ \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/auxiliary \ + -I$(top_builddir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/mesa/drivers/dri/intel/server \ - -I$(top_builddir)/src/mesa/drivers/dri/common \ $(DEFINES) \ $(VISIBILITY_CFLAGS) \ $(INTEL_CFLAGS) diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_blorp.c b/lib/mesa/src/mesa/drivers/dri/i965/brw_blorp.c index cd2cc7674..a30346f64 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_blorp.c @@ -239,8 +239,10 @@ brw_blorp_to_isl_format(struct brw_context *brw, mesa_format format, case MESA_FORMAT_S_UINT8: return ISL_FORMAT_R8_UINT; case MESA_FORMAT_Z24_UNORM_X8_UINT: + case MESA_FORMAT_Z24_UNORM_S8_UINT: return ISL_FORMAT_R24_UNORM_X8_TYPELESS; case MESA_FORMAT_Z_FLOAT32: + case MESA_FORMAT_Z32_FLOAT_S8X24_UINT: return ISL_FORMAT_R32_FLOAT; case MESA_FORMAT_Z_UNORM16: return ISL_FORMAT_R16_UNORM; diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_clear.c b/lib/mesa/src/mesa/drivers/dri/i965/brw_clear.c index 488732cb4..ba9aa4b65 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_clear.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_clear.c @@ -36,6 +36,7 @@ #include "brw_context.h" #include "brw_blorp.h" +#include "brw_defines.h" #define FILE_DEBUG_FLAG DEBUG_BLIT @@ -174,14 +175,46 @@ brw_fast_clear_depth(struct gl_context *ctx) mt->depth_clear_value = depth_clear_value; } - /* From the Sandy Bridge PRM, volume 2 part 1, page 313: - * - * "If other rendering operations have preceded this clear, a - * PIPE_CONTROL with write cache flush enabled and Z-inhibit disabled - * must be issued before the rectangle primitive used for the depth - * buffer clear operation. - */ - brw_emit_mi_flush(brw); + if (brw->gen == 6) { + /* From the Sandy Bridge PRM, volume 2 part 1, page 313: + * + * "If other rendering operations have preceded this clear, a + * PIPE_CONTROL with write cache flush enabled and Z-inhibit disabled + * must be issued before the rectangle primitive used for the depth + * buffer clear operation. + */ + brw_emit_pipe_control_flush(brw, + PIPE_CONTROL_RENDER_TARGET_FLUSH | + PIPE_CONTROL_DEPTH_CACHE_FLUSH | + PIPE_CONTROL_CS_STALL); + } else if (brw->gen >= 7) { + /* + * From the Ivybridge PRM, volume 2, "Depth Buffer Clear": + * + * If other rendering operations have preceded this clear, a + * PIPE_CONTROL with depth cache flush enabled, Depth Stall bit + * enabled must be issued before the rectangle primitive used for the + * depth buffer clear operation. + * + * Same applies for Gen8 and Gen9. + * + * In addition, from the Ivybridge PRM, volume 2, 1.10.4.1 PIPE_CONTROL, + * Depth Cache Flush Enable: + * + * This bit must not be set when Depth Stall Enable bit is set in + * this packet. + * + * This is confirmed to hold for real, HSW gets immediate gpu hangs. + * + * Therefore issue two pipe control flushes, one for cache flush and + * another for depth stall. + */ + brw_emit_pipe_control_flush(brw, + PIPE_CONTROL_DEPTH_CACHE_FLUSH | + PIPE_CONTROL_CS_STALL); + + brw_emit_pipe_control_flush(brw, PIPE_CONTROL_DEPTH_STALL); + } if (fb->MaxNumLayers > 0) { for (unsigned layer = 0; layer < depth_irb->layer_count; layer++) { @@ -201,7 +234,12 @@ brw_fast_clear_depth(struct gl_context *ctx) * by a PIPE_CONTROL command with DEPTH_STALL bit set and Then * followed by Depth FLUSH' */ - brw_emit_mi_flush(brw); + brw_emit_pipe_control_flush(brw, + PIPE_CONTROL_DEPTH_STALL); + + brw_emit_pipe_control_flush(brw, + PIPE_CONTROL_DEPTH_CACHE_FLUSH | + PIPE_CONTROL_CS_STALL); } /* Now, the HiZ buffer contains data that needs to be resolved to the depth diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index c5b50e1f7..f0edab0c4 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -916,8 +916,12 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src if (brw_regs_equal(&surface_reg, &sampler_reg)) { brw_MUL(p, addr, sampler_reg, brw_imm_uw(0x101)); } else { - brw_SHL(p, addr, sampler_reg, brw_imm_ud(8)); - brw_OR(p, addr, addr, surface_reg); + if (sampler_reg.file == BRW_IMMEDIATE_VALUE) { + brw_OR(p, addr, surface_reg, brw_imm_ud(sampler_reg.ud << 8)); + } else { + brw_SHL(p, addr, sampler_reg, brw_imm_ud(8)); + brw_OR(p, addr, addr, surface_reg); + } } if (base_binding_table_index) brw_ADD(p, addr, addr, brw_imm_ud(base_binding_table_index)); diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 0efd68f20..3fca4603a 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -672,6 +672,17 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count) length = 0; urb_offset = starting_urb_offset; flush = false; + + /* SSO shaders can have VUE slots allocated which are never actually + * written to, so ignore them when looking for the last (written) slot. + */ + int last_slot = vue_map->num_slots - 1; + while (last_slot > 0 && + (vue_map->slot_to_varying[last_slot] == BRW_VARYING_SLOT_PAD || + outputs[vue_map->slot_to_varying[last_slot]].file == BAD_FILE)) { + last_slot--; + } + for (slot = 0; slot < vue_map->num_slots; slot++) { int varying = vue_map->slot_to_varying[slot]; switch (varying) { @@ -757,8 +768,7 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count) * the last slot or if we need to flush (see BAD_FILE varying case * above), emit a URB write send now to flush out the data. */ - int last = slot == vue_map->num_slots - 1; - if (length == 8 || last) + if (length == 8 || slot == last_slot) flush = true; if (flush) { fs_reg *payload_sources = @@ -777,7 +787,7 @@ fs_visitor::emit_urb_writes(const fs_reg &gs_vertex_count) header_size); fs_inst *inst = abld.emit(opcode, reg_undef, payload); - inst->eot = last && stage != MESA_SHADER_GEOMETRY; + inst->eot = slot == last_slot && stage != MESA_SHADER_GEOMETRY; inst->mlen = length + header_size; inst->offset = urb_offset; urb_offset = starting_urb_offset + slot + 1; diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_program.c b/lib/mesa/src/mesa/drivers/dri/i965/brw_program.c index a41f36e76..a2e6cebc8 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_program.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_program.c @@ -204,6 +204,49 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx, static void brwDeleteProgram( struct gl_context *ctx, struct gl_program *prog ) { + struct brw_context *brw = brw_context(ctx); + + /* Beware! prog's refcount has reached zero, and it's about to be freed. + * + * In brw_upload_pipeline_state(), we compare brw->foo_program to + * ctx->FooProgram._Current, and flag BRW_NEW_FOO_PROGRAM if the + * pointer has changed. + * + * We cannot leave brw->foo_program as a dangling pointer to the dead + * program. malloc() may allocate the same memory for a new gl_program, + * causing us to see matching pointers...but totally different programs. + * + * We cannot set brw->foo_program to NULL, either. If we've deleted the + * active program, Mesa may set ctx->FooProgram._Current to NULL. That + * would cause us to see matching pointers (NULL == NULL), and fail to + * detect that a program has changed since our last draw. + * + * So, set it to a bogus gl_program pointer that will never match, + * causing us to properly reevaluate the state on our next draw. + * + * Getting this wrong causes heisenbugs which are very hard to catch, + * as you need a very specific allocation pattern to hit the problem. + */ + static const struct gl_program deleted_program; + + if (brw->vertex_program == prog) + brw->vertex_program = &deleted_program; + + if (brw->tess_ctrl_program == prog) + brw->tess_ctrl_program = &deleted_program; + + if (brw->tess_eval_program == prog) + brw->tess_eval_program = &deleted_program; + + if (brw->geometry_program == prog) + brw->geometry_program = &deleted_program; + + if (brw->fragment_program == prog) + brw->fragment_program = &deleted_program; + + if (brw->compute_program == prog) + brw->compute_program = &deleted_program; + _mesa_delete_program( ctx, prog ); } diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_sampler_state.c b/lib/mesa/src/mesa/drivers/dri/i965/brw_sampler_state.c index b649072a6..1637e1fd7 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_sampler_state.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_sampler_state.c @@ -88,6 +88,7 @@ brw_emit_sampler_state(struct brw_context *brw, unsigned wrap_s, unsigned wrap_t, unsigned wrap_r, + unsigned base_level, unsigned min_lod, unsigned max_lod, int lod_bias, @@ -132,6 +133,21 @@ brw_emit_sampler_state(struct brw_context *brw, ss[0] |= SET_FIELD(lod_bias & 0x7ff, GEN4_SAMPLER_LOD_BIAS) | SET_FIELD(shadow_function, GEN4_SAMPLER_SHADOW_FUNCTION); + /* This field has existed since the original i965, but is declared MBZ + * until Sandy Bridge. According to the PRM: + * + * "This was added to match OpenGL semantics" + * + * In particular, OpenGL allowed you to offset by 0.5 in certain cases + * to get slightly better filtering. On Ivy Bridge and above, it + * appears that this is added to RENDER_SURFACE_STATE::SurfaceMinLOD so + * the right value is 0.0 or 0.5 (if you want the wacky behavior). On + * Sandy Bridge, however, this sum does not seem to occur and you have + * to set it to the actual base level of the texture. + */ + if (brw->gen == 6) + ss[0] |= SET_FIELD(base_level, BRW_SAMPLER_BASE_MIPLEVEL); + if (brw->gen == 6 && min_filter != mag_filter) ss[0] |= GEN6_SAMPLER_MIN_MAG_NOT_EQUAL; @@ -393,8 +409,7 @@ brw_update_sampler_state(struct brw_context *brw, GLenum target, bool tex_cube_map_seamless, GLfloat tex_unit_lod_bias, mesa_format format, GLenum base_format, - bool is_integer_format, - bool is_stencil_sampling, + const struct gl_texture_object *texObj, const struct gl_sampler_object *sampler, uint32_t *sampler_state, uint32_t batch_offset_for_sampler_state) @@ -477,7 +492,7 @@ brw_update_sampler_state(struct brw_context *brw, * integer formats. Fall back to CLAMP for now. */ if ((tex_cube_map_seamless || sampler->CubeMapSeamless) && - !(brw->gen == 7 && !brw->is_haswell && is_integer_format)) { + !(brw->gen == 7 && !brw->is_haswell && texObj->_IsIntegerFormat)) { wrap_s = BRW_TEXCOORDMODE_CUBE; wrap_t = BRW_TEXCOORDMODE_CUBE; wrap_r = BRW_TEXCOORDMODE_CUBE; @@ -505,6 +520,8 @@ brw_update_sampler_state(struct brw_context *brw, const int lod_bits = brw->gen >= 7 ? 8 : 6; const unsigned min_lod = U_FIXED(CLAMP(sampler->MinLod, 0, 13), lod_bits); const unsigned max_lod = U_FIXED(CLAMP(sampler->MaxLod, 0, 13), lod_bits); + const unsigned base_level = + U_FIXED(CLAMP(texObj->MinLevel + texObj->BaseLevel, 0, max_lod), 1); const int lod_bias = S_FIXED(CLAMP(tex_unit_lod_bias + sampler->LodBias, -16, 15), lod_bits); @@ -517,7 +534,7 @@ brw_update_sampler_state(struct brw_context *brw, wrap_mode_needs_border_color(wrap_t) || wrap_mode_needs_border_color(wrap_r)) { upload_default_color(brw, sampler, format, base_format, - is_integer_format, is_stencil_sampling, + texObj->_IsIntegerFormat, texObj->StencilSampling, &border_color_offset); } @@ -530,7 +547,7 @@ brw_update_sampler_state(struct brw_context *brw, max_anisotropy, address_rounding, wrap_s, wrap_t, wrap_r, - min_lod, max_lod, lod_bias, + base_level, min_lod, max_lod, lod_bias, shadow_function, non_normalized_coords, border_color_offset); @@ -555,8 +572,7 @@ update_sampler_state(struct brw_context *brw, brw_update_sampler_state(brw, texObj->Target, ctx->Texture.CubeMapSeamless, texUnit->LodBias, firstImage->TexFormat, firstImage->_BaseFormat, - texObj->_IsIntegerFormat, texObj->StencilSampling, - sampler, + texObj, sampler, sampler_state, batch_offset_for_sampler_state); } diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_state.h b/lib/mesa/src/mesa/drivers/dri/i965/brw_state.h index b8aa97b03..e409668ae 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_state.h +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_state.h @@ -330,6 +330,7 @@ void brw_emit_sampler_state(struct brw_context *brw, unsigned wrap_s, unsigned wrap_t, unsigned wrap_r, + unsigned base_level, unsigned min_lod, unsigned max_lod, int lod_bias, diff --git a/lib/mesa/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/lib/mesa/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index 163cf9dcd..3206c52ac 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp +++ b/lib/mesa/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp @@ -106,6 +106,7 @@ generate_math2_gen4(struct brw_codegen *p, static void generate_tex(struct brw_codegen *p, struct brw_vue_prog_data *prog_data, + gl_shader_stage stage, vec4_instruction *inst, struct brw_reg dst, struct brw_reg src, @@ -238,8 +239,16 @@ generate_tex(struct brw_codegen *p, */ dw2 |= GEN9_SAMPLER_SIMD_MODE_EXTENSION_SIMD4X2; - if (dw2) + /* The VS, DS, and FS stages have the g0.2 payload delivered as 0, + * so header0.2 is 0 when g0 is copied. The HS and GS stages do + * not, so we must set to to 0 to avoid setting undesirable bits + * in the message header. + */ + if (dw2 || + stage == MESA_SHADER_TESS_CTRL || + stage == MESA_SHADER_GEOMETRY) { brw_MOV(p, get_element_ud(header, 2), brw_imm_ud(dw2)); + } brw_adjust_sampler_state_pointer(p, header, sampler_index); brw_pop_insn_state(p); @@ -298,8 +307,12 @@ generate_tex(struct brw_codegen *p, if (brw_regs_equal(&surface_reg, &sampler_reg)) { brw_MUL(p, addr, sampler_reg, brw_imm_uw(0x101)); } else { - brw_SHL(p, addr, sampler_reg, brw_imm_ud(8)); - brw_OR(p, addr, addr, surface_reg); + if (sampler_reg.file == BRW_IMMEDIATE_VALUE) { + brw_OR(p, addr, surface_reg, brw_imm_ud(sampler_reg.ud << 8)); + } else { + brw_SHL(p, addr, sampler_reg, brw_imm_ud(8)); + brw_OR(p, addr, addr, surface_reg); + } } if (base_binding_table_index) brw_ADD(p, addr, addr, brw_imm_ud(base_binding_table_index)); @@ -1725,7 +1738,8 @@ generate_code(struct brw_codegen *p, case SHADER_OPCODE_TG4: case SHADER_OPCODE_TG4_OFFSET: case SHADER_OPCODE_SAMPLEINFO: - generate_tex(p, prog_data, inst, dst, src[0], src[1], src[2]); + generate_tex(p, prog_data, nir->stage, + inst, dst, src[0], src[1], src[2]); break; case VS_OPCODE_URB_WRITE: diff --git a/lib/mesa/src/mesa/drivers/dri/i965/gen8_depth_state.c b/lib/mesa/src/mesa/drivers/dri/i965/gen8_depth_state.c index 73b218679..496a4192c 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/gen8_depth_state.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/gen8_depth_state.c @@ -509,6 +509,22 @@ gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt, OUT_BATCH(0); ADVANCE_BATCH(); + /* + * From the Broadwell PRM, volume 7, "Depth Buffer Clear": + * + * Depth buffer clear pass using any of the methods (WM_STATE, 3DSTATE_WM + * or 3DSTATE_WM_HZ_OP) must be followed by a PIPE_CONTROL command with + * DEPTH_STALL bit and Depth FLUSH bits "set" before starting to render. + * DepthStall and DepthFlush are not needed between consecutive depth + * clear passes nor is it required if th e depth clear pass was done with + * "full_surf_clear" bit set in the 3DSTATE_WM_HZ_OP. + * + * TODO: Such as the spec says, this could be conditional. + */ + brw_emit_pipe_control_flush(brw, + PIPE_CONTROL_DEPTH_CACHE_FLUSH | + PIPE_CONTROL_DEPTH_STALL); + /* Mark this buffer as needing a TC flush, as we've rendered to it. */ brw_render_cache_set_add_bo(brw, mt->bo); diff --git a/lib/mesa/src/mesa/drivers/dri/i965/gen8_draw_upload.c b/lib/mesa/src/mesa/drivers/dri/i965/gen8_draw_upload.c index 23c758794..8d80d8e4d 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/gen8_draw_upload.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/gen8_draw_upload.c @@ -110,6 +110,22 @@ gen8_emit_vertices(struct brw_context *brw) ADVANCE_BATCH(); } + /* Normally we don't need an element for the SGVS attribute because the + * 3DSTATE_VF_SGVS instruction lets you store the generated attribute in an + * element that is past the list in 3DSTATE_VERTEX_ELEMENTS. However if + * we're using draw parameters then we need an element for the those + * values. Additionally if there is an edge flag element then the SGVS + * can't be inserted past that so we need a dummy element to ensure that + * the edge flag is the last one. + */ + const bool needs_sgvs_element = (vs_prog_data->uses_basevertex || + vs_prog_data->uses_baseinstance || + ((vs_prog_data->uses_instanceid || + vs_prog_data->uses_vertexid) && + uses_edge_flag)); + const unsigned nr_elements = + brw->vb.nr_enabled + needs_sgvs_element + vs_prog_data->uses_drawid; + /* If the VS doesn't read any inputs (calculating vertex position from * a state variable for some reason, for example), emit a single pad * VERTEX_ELEMENT struct and bail. @@ -117,7 +133,7 @@ gen8_emit_vertices(struct brw_context *brw) * The stale VB state stays in place, but they don't do anything unless * a VE loads from them. */ - if (brw->vb.nr_enabled == 0) { + if (nr_elements == 0) { BEGIN_BATCH(3); OUT_BATCH((_3DSTATE_VERTEX_ELEMENTS << 16) | (3 - 2)); OUT_BATCH((0 << GEN6_VE0_INDEX_SHIFT) | @@ -172,22 +188,6 @@ gen8_emit_vertices(struct brw_context *brw) ADVANCE_BATCH(); } - /* Normally we don't need an element for the SGVS attribute because the - * 3DSTATE_VF_SGVS instruction lets you store the generated attribute in an - * element that is past the list in 3DSTATE_VERTEX_ELEMENTS. However if - * we're using draw parameters then we need an element for the those - * values. Additionally if there is an edge flag element then the SGVS - * can't be inserted past that so we need a dummy element to ensure that - * the edge flag is the last one. - */ - const bool needs_sgvs_element = (vs_prog_data->uses_basevertex || - vs_prog_data->uses_baseinstance || - ((vs_prog_data->uses_instanceid || - vs_prog_data->uses_vertexid) && - uses_edge_flag)); - const unsigned nr_elements = - brw->vb.nr_enabled + needs_sgvs_element + vs_prog_data->uses_drawid; - /* The hardware allows one more VERTEX_ELEMENTS than VERTEX_BUFFERS, * presumably for VertexID/InstanceID. */ diff --git a/lib/mesa/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/lib/mesa/src/mesa/drivers/dri/i965/genX_blorp_exec.c index edcd89640..faa01aa63 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/genX_blorp_exec.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/genX_blorp_exec.c @@ -206,6 +206,10 @@ retry: brw_emit_depth_stall_flushes(brw); +#if GEN_GEN == 8 + gen8_write_pma_stall_bits(brw, 0); +#endif + blorp_emit(batch, GENX(3DSTATE_DRAWING_RECTANGLE), rect) { rect.ClippedDrawingRectangleXMax = MAX2(params->x1, params->x0) - 1; rect.ClippedDrawingRectangleYMax = MAX2(params->y1, params->y0) - 1; diff --git a/lib/mesa/src/mesa/drivers/dri/i965/hsw_sol.c b/lib/mesa/src/mesa/drivers/dri/i965/hsw_sol.c index e299b0227..b0dd150b7 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/hsw_sol.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/hsw_sol.c @@ -201,6 +201,9 @@ hsw_pause_transform_feedback(struct gl_context *ctx, (struct brw_transform_feedback_object *) obj; if (brw->is_haswell) { + /* Flush any drawing so that the counters have the right values. */ + brw_emit_mi_flush(brw); + /* Save the SOL buffer offset register values. */ for (int i = 0; i < BRW_MAX_XFB_STREAMS; i++) { BEGIN_BATCH(3); diff --git a/lib/mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/lib/mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 78c7a11d8..210d28980 100644 --- a/lib/mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/lib/mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -996,6 +996,19 @@ intel_miptree_reference(struct intel_mipmap_tree **dst, *dst = src; } +static void +intel_miptree_hiz_buffer_free(struct intel_miptree_aux_buffer *hiz_buf) +{ + if (hiz_buf == NULL) + return; + + if (hiz_buf->mt) + intel_miptree_release(&hiz_buf->mt); + else + drm_intel_bo_unreference(hiz_buf->bo); + + free(hiz_buf); +} void intel_miptree_release(struct intel_mipmap_tree **mt) @@ -1012,13 +1025,7 @@ intel_miptree_release(struct intel_mipmap_tree **mt) drm_intel_bo_unreference((*mt)->bo); intel_miptree_release(&(*mt)->stencil_mt); intel_miptree_release(&(*mt)->r8stencil_mt); - if ((*mt)->hiz_buf) { - if ((*mt)->hiz_buf->mt) - intel_miptree_release(&(*mt)->hiz_buf->mt); - else - drm_intel_bo_unreference((*mt)->hiz_buf->bo); - free((*mt)->hiz_buf); - } + intel_miptree_hiz_buffer_free((*mt)->hiz_buf); intel_miptree_release(&(*mt)->mcs_mt); intel_resolve_map_clear(&(*mt)->hiz_map); @@ -2142,6 +2149,8 @@ intel_miptree_resolve_color(struct brw_context *brw, * then discard the MCS buffer, if present. We also set the fast_clear_state * to INTEL_FAST_CLEAR_STATE_NO_MCS to ensure that no MCS buffer gets * allocated in the future. + * + * HiZ is similarly unsafe with shared buffers. */ void intel_miptree_make_shareable(struct brw_context *brw, @@ -2160,6 +2169,12 @@ intel_miptree_make_shareable(struct brw_context *brw, mt->fast_clear_state = INTEL_FAST_CLEAR_STATE_NO_MCS; } + if (mt->hiz_buf) { + intel_miptree_all_slices_resolve_depth(brw, mt); + intel_miptree_hiz_buffer_free(mt->hiz_buf); + mt->hiz_buf = NULL; + } + mt->disable_aux_buffers = true; } diff --git a/lib/mesa/src/mesa/drivers/dri/r200/Makefile.am b/lib/mesa/src/mesa/drivers/dri/r200/Makefile.am index 137d3c85a..1094343d6 100644 --- a/lib/mesa/src/mesa/drivers/dri/r200/Makefile.am +++ b/lib/mesa/src/mesa/drivers/dri/r200/Makefile.am @@ -34,9 +34,9 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/mesa/ \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/auxiliary \ + -I$(top_builddir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/mesa/drivers/dri/r200/server \ - -I$(top_builddir)/src/mesa/drivers/dri/common \ $(DEFINES) \ $(VISIBILITY_CFLAGS) \ $(RADEON_CFLAGS) diff --git a/lib/mesa/src/mesa/drivers/dri/radeon/Makefile.am b/lib/mesa/src/mesa/drivers/dri/radeon/Makefile.am index b236aa6b5..176ec797e 100644 --- a/lib/mesa/src/mesa/drivers/dri/radeon/Makefile.am +++ b/lib/mesa/src/mesa/drivers/dri/radeon/Makefile.am @@ -35,9 +35,9 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/mesa/ \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/auxiliary \ + -I$(top_builddir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/mesa/drivers/dri/common \ -I$(top_srcdir)/src/mesa/drivers/dri/radeon/server \ - -I$(top_builddir)/src/mesa/drivers/dri/common \ $(DEFINES) \ $(VISIBILITY_CFLAGS) \ $(RADEON_CFLAGS) diff --git a/lib/mesa/src/mesa/drivers/dri/swrast/Makefile.am b/lib/mesa/src/mesa/drivers/dri/swrast/Makefile.am index 9d21d9ea4..a82e580f1 100644 --- a/lib/mesa/src/mesa/drivers/dri/swrast/Makefile.am +++ b/lib/mesa/src/mesa/drivers/dri/swrast/Makefile.am @@ -30,8 +30,8 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/mesa/ \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/auxiliary \ - -I$(top_srcdir)/src/mesa/drivers/dri/common \ -I$(top_builddir)/src/mesa/drivers/dri/common \ + -I$(top_srcdir)/src/mesa/drivers/dri/common \ $(LIBDRM_CFLAGS) \ $(DEFINES) \ $(VISIBILITY_CFLAGS) diff --git a/lib/mesa/src/mesa/drivers/osmesa/Makefile.am b/lib/mesa/src/mesa/drivers/osmesa/Makefile.am index 5525687c5..2c8d4668b 100644 --- a/lib/mesa/src/mesa/drivers/osmesa/Makefile.am +++ b/lib/mesa/src/mesa/drivers/osmesa/Makefile.am @@ -28,8 +28,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/gallium/include \ -I$(top_srcdir)/src/gallium/auxiliary \ - -I$(top_srcdir)/src/mapi \ -I$(top_builddir)/src/mapi \ + -I$(top_srcdir)/src/mapi \ -I$(top_srcdir)/src/mesa/ \ $(DEFINES) AM_CFLAGS = $(PTHREAD_CFLAGS) \ diff --git a/lib/mesa/src/mesa/main/mtypes.h b/lib/mesa/src/mesa/main/mtypes.h index 23a864bf3..7a55ffac3 100644 --- a/lib/mesa/src/mesa/main/mtypes.h +++ b/lib/mesa/src/mesa/main/mtypes.h @@ -2576,6 +2576,21 @@ struct gl_uniform_block uint8_t stageref; /** + * Linearized array index for uniform block instance arrays + * + * Given a uniform block instance array declared with size + * blk[s_0][s_1]..[s_m], the block referenced by blk[i_0][i_1]..[i_m] will + * have the linearized array index + * + * m-1 m + * i_m + ∑ i_j * ∏ s_k + * j=0 k=j+1 + * + * For a uniform block instance that is not an array, this is always 0. + */ + uint8_t linearized_array_index; + + /** * Layout specified in the shader * * This isn't accessible through the API, but it is used while diff --git a/lib/mesa/src/mesa/main/shaderobj.c b/lib/mesa/src/mesa/main/shaderobj.c index 8fd574e51..37a79533c 100644 --- a/lib/mesa/src/mesa/main/shaderobj.c +++ b/lib/mesa/src/mesa/main/shaderobj.c @@ -39,6 +39,7 @@ #include "main/uniforms.h" #include "program/program.h" #include "program/prog_parameter.h" +#include "util/u_atomic.h" #include "util/ralloc.h" #include "util/string_to_uint_map.h" @@ -64,14 +65,11 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, } if (*ptr) { /* Unreference the old shader */ - GLboolean deleteFlag = GL_FALSE; struct gl_shader *old = *ptr; assert(old->RefCount > 0); - old->RefCount--; - deleteFlag = (old->RefCount == 0); - if (deleteFlag) { + if (p_atomic_dec_zero(&old->RefCount)) { if (old->Name != 0) _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name); _mesa_delete_shader(ctx, old); @@ -83,7 +81,7 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, if (sh) { /* reference new */ - sh->RefCount++; + p_atomic_inc(&sh->RefCount); *ptr = sh; } } @@ -226,14 +224,11 @@ _mesa_reference_shader_program_(struct gl_context *ctx, } if (*ptr) { /* Unreference the old shader program */ - GLboolean deleteFlag = GL_FALSE; struct gl_shader_program *old = *ptr; assert(old->RefCount > 0); - old->RefCount--; - deleteFlag = (old->RefCount == 0); - if (deleteFlag) { + if (p_atomic_dec_zero(&old->RefCount)) { if (old->Name != 0) _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name); _mesa_delete_shader_program(ctx, old); @@ -244,7 +239,7 @@ _mesa_reference_shader_program_(struct gl_context *ctx, assert(!*ptr); if (shProg) { - shProg->RefCount++; + p_atomic_inc(&shProg->RefCount); *ptr = shProg; } } diff --git a/lib/mesa/src/mesa/main/tests/Makefile.am b/lib/mesa/src/mesa/main/tests/Makefile.am index d6977e20e..18f750e4d 100644 --- a/lib/mesa/src/mesa/main/tests/Makefile.am +++ b/lib/mesa/src/mesa/main/tests/Makefile.am @@ -4,8 +4,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/gtest/include \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/mapi \ - -I$(top_srcdir)/src/mesa \ -I$(top_builddir)/src/mesa \ + -I$(top_srcdir)/src/mesa \ -I$(top_srcdir)/include \ $(DEFINES) $(INCLUDE_DIRS) diff --git a/lib/mesa/src/mesa/main/texformat.c b/lib/mesa/src/mesa/main/texformat.c index be2581b00..baa3988f0 100644 --- a/lib/mesa/src/mesa/main/texformat.c +++ b/lib/mesa/src/mesa/main/texformat.c @@ -74,6 +74,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, RETURN_IF_SUPPORTED(MESA_FORMAT_B4G4R4A4_UNORM); } else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) { RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM); + } else if (type == GL_UNSIGNED_SHORT_5_5_5_1) { + RETURN_IF_SUPPORTED(MESA_FORMAT_B5G5R5A1_UNORM); } else if (type == GL_UNSIGNED_INT_2_10_10_10_REV) { RETURN_IF_SUPPORTED(MESA_FORMAT_B10G10R10A2_UNORM); } diff --git a/lib/mesa/src/mesa/program/lex.yy.c b/lib/mesa/src/mesa/program/lex.yy.c index 1d1ea9633..6b41babea 100644 --- a/lib/mesa/src/mesa/program/lex.yy.c +++ b/lib/mesa/src/mesa/program/lex.yy.c @@ -874,8 +874,8 @@ static yyconst flex_int16_t yy_chk[1023] = #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -#line 1 "../../../src/mesa/program/program_lexer.l" -#line 2 "../../../src/mesa/program/program_lexer.l" +#line 1 "./program/program_lexer.l" +#line 2 "./program/program_lexer.l" /* * Copyright © 2009 Intel Corporation * @@ -1315,7 +1315,7 @@ YY_DECL } { -#line 167 "../../../src/mesa/program/program_lexer.l" +#line 167 "./program/program_lexer.l" #line 1322 "program/lex.yy.c" @@ -1377,17 +1377,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 169 "../../../src/mesa/program/program_lexer.l" +#line 169 "./program/program_lexer.l" { return ARBvp_10; } YY_BREAK case 2: YY_RULE_SETUP -#line 170 "../../../src/mesa/program/program_lexer.l" +#line 170 "./program/program_lexer.l" { return ARBfp_10; } YY_BREAK case 3: YY_RULE_SETUP -#line 171 "../../../src/mesa/program/program_lexer.l" +#line 171 "./program/program_lexer.l" { yylval->integer = at_address; return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS); @@ -1395,597 +1395,597 @@ YY_RULE_SETUP YY_BREAK case 4: YY_RULE_SETUP -#line 175 "../../../src/mesa/program/program_lexer.l" +#line 175 "./program/program_lexer.l" { return ALIAS; } YY_BREAK case 5: YY_RULE_SETUP -#line 176 "../../../src/mesa/program/program_lexer.l" +#line 176 "./program/program_lexer.l" { return ATTRIB; } YY_BREAK case 6: YY_RULE_SETUP -#line 177 "../../../src/mesa/program/program_lexer.l" +#line 177 "./program/program_lexer.l" { return END; } YY_BREAK case 7: YY_RULE_SETUP -#line 178 "../../../src/mesa/program/program_lexer.l" +#line 178 "./program/program_lexer.l" { return OPTION; } YY_BREAK case 8: YY_RULE_SETUP -#line 179 "../../../src/mesa/program/program_lexer.l" +#line 179 "./program/program_lexer.l" { return OUTPUT; } YY_BREAK case 9: YY_RULE_SETUP -#line 180 "../../../src/mesa/program/program_lexer.l" +#line 180 "./program/program_lexer.l" { return PARAM; } YY_BREAK case 10: YY_RULE_SETUP -#line 181 "../../../src/mesa/program/program_lexer.l" +#line 181 "./program/program_lexer.l" { yylval->integer = at_temp; return TEMP; } YY_BREAK case 11: YY_RULE_SETUP -#line 183 "../../../src/mesa/program/program_lexer.l" +#line 183 "./program/program_lexer.l" { return_opcode( 1, VECTOR_OP, ABS, 3); } YY_BREAK case 12: YY_RULE_SETUP -#line 184 "../../../src/mesa/program/program_lexer.l" +#line 184 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, ADD, 3); } YY_BREAK case 13: YY_RULE_SETUP -#line 185 "../../../src/mesa/program/program_lexer.l" +#line 185 "./program/program_lexer.l" { return_opcode(require_ARB_vp, ARL, ARL, 3); } YY_BREAK case 14: YY_RULE_SETUP -#line 187 "../../../src/mesa/program/program_lexer.l" +#line 187 "./program/program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, CMP, 3); } YY_BREAK case 15: YY_RULE_SETUP -#line 188 "../../../src/mesa/program/program_lexer.l" +#line 188 "./program/program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); } YY_BREAK case 16: YY_RULE_SETUP -#line 190 "../../../src/mesa/program/program_lexer.l" +#line 190 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, DP3, 3); } YY_BREAK case 17: YY_RULE_SETUP -#line 191 "../../../src/mesa/program/program_lexer.l" +#line 191 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, DP4, 3); } YY_BREAK case 18: YY_RULE_SETUP -#line 192 "../../../src/mesa/program/program_lexer.l" +#line 192 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, DPH, 3); } YY_BREAK case 19: YY_RULE_SETUP -#line 193 "../../../src/mesa/program/program_lexer.l" +#line 193 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, DST, 3); } YY_BREAK case 20: YY_RULE_SETUP -#line 195 "../../../src/mesa/program/program_lexer.l" +#line 195 "./program/program_lexer.l" { return_opcode( 1, SCALAR_OP, EX2, 3); } YY_BREAK case 21: YY_RULE_SETUP -#line 196 "../../../src/mesa/program/program_lexer.l" +#line 196 "./program/program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); } YY_BREAK case 22: YY_RULE_SETUP -#line 198 "../../../src/mesa/program/program_lexer.l" +#line 198 "./program/program_lexer.l" { return_opcode( 1, VECTOR_OP, FLR, 3); } YY_BREAK case 23: YY_RULE_SETUP -#line 199 "../../../src/mesa/program/program_lexer.l" +#line 199 "./program/program_lexer.l" { return_opcode( 1, VECTOR_OP, FRC, 3); } YY_BREAK case 24: YY_RULE_SETUP -#line 201 "../../../src/mesa/program/program_lexer.l" +#line 201 "./program/program_lexer.l" { return_opcode(require_ARB_fp, KIL, KIL, 3); } YY_BREAK case 25: YY_RULE_SETUP -#line 203 "../../../src/mesa/program/program_lexer.l" +#line 203 "./program/program_lexer.l" { return_opcode( 1, VECTOR_OP, LIT, 3); } YY_BREAK case 26: YY_RULE_SETUP -#line 204 "../../../src/mesa/program/program_lexer.l" +#line 204 "./program/program_lexer.l" { return_opcode( 1, SCALAR_OP, LG2, 3); } YY_BREAK case 27: YY_RULE_SETUP -#line 205 "../../../src/mesa/program/program_lexer.l" +#line 205 "./program/program_lexer.l" { return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); } YY_BREAK case 28: YY_RULE_SETUP -#line 206 "../../../src/mesa/program/program_lexer.l" +#line 206 "./program/program_lexer.l" { return_opcode(require_ARB_fp, TRI_OP, LRP, 3); } YY_BREAK case 29: YY_RULE_SETUP -#line 208 "../../../src/mesa/program/program_lexer.l" +#line 208 "./program/program_lexer.l" { return_opcode( 1, TRI_OP, MAD, 3); } YY_BREAK case 30: YY_RULE_SETUP -#line 209 "../../../src/mesa/program/program_lexer.l" +#line 209 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, MAX, 3); } YY_BREAK case 31: YY_RULE_SETUP -#line 210 "../../../src/mesa/program/program_lexer.l" +#line 210 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, MIN, 3); } YY_BREAK case 32: YY_RULE_SETUP -#line 211 "../../../src/mesa/program/program_lexer.l" +#line 211 "./program/program_lexer.l" { return_opcode( 1, VECTOR_OP, MOV, 3); } YY_BREAK case 33: YY_RULE_SETUP -#line 212 "../../../src/mesa/program/program_lexer.l" +#line 212 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, MUL, 3); } YY_BREAK case 34: YY_RULE_SETUP -#line 214 "../../../src/mesa/program/program_lexer.l" +#line 214 "./program/program_lexer.l" { return_opcode( 1, BINSC_OP, POW, 3); } YY_BREAK case 35: YY_RULE_SETUP -#line 216 "../../../src/mesa/program/program_lexer.l" +#line 216 "./program/program_lexer.l" { return_opcode( 1, SCALAR_OP, RCP, 3); } YY_BREAK case 36: YY_RULE_SETUP -#line 217 "../../../src/mesa/program/program_lexer.l" +#line 217 "./program/program_lexer.l" { return_opcode( 1, SCALAR_OP, RSQ, 3); } YY_BREAK case 37: YY_RULE_SETUP -#line 219 "../../../src/mesa/program/program_lexer.l" +#line 219 "./program/program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); } YY_BREAK case 38: YY_RULE_SETUP -#line 220 "../../../src/mesa/program/program_lexer.l" +#line 220 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, SGE, 3); } YY_BREAK case 39: YY_RULE_SETUP -#line 221 "../../../src/mesa/program/program_lexer.l" +#line 221 "./program/program_lexer.l" { return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); } YY_BREAK case 40: YY_RULE_SETUP -#line 222 "../../../src/mesa/program/program_lexer.l" +#line 222 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, SLT, 3); } YY_BREAK case 41: YY_RULE_SETUP -#line 223 "../../../src/mesa/program/program_lexer.l" +#line 223 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, SUB, 3); } YY_BREAK case 42: YY_RULE_SETUP -#line 224 "../../../src/mesa/program/program_lexer.l" +#line 224 "./program/program_lexer.l" { return_opcode( 1, SWZ, SWZ, 3); } YY_BREAK case 43: YY_RULE_SETUP -#line 226 "../../../src/mesa/program/program_lexer.l" +#line 226 "./program/program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); } YY_BREAK case 44: YY_RULE_SETUP -#line 227 "../../../src/mesa/program/program_lexer.l" +#line 227 "./program/program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); } YY_BREAK case 45: YY_RULE_SETUP -#line 228 "../../../src/mesa/program/program_lexer.l" +#line 228 "./program/program_lexer.l" { return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); } YY_BREAK case 46: YY_RULE_SETUP -#line 230 "../../../src/mesa/program/program_lexer.l" +#line 230 "./program/program_lexer.l" { return_opcode( 1, BIN_OP, XPD, 3); } YY_BREAK case 47: YY_RULE_SETUP -#line 232 "../../../src/mesa/program/program_lexer.l" +#line 232 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } YY_BREAK case 48: YY_RULE_SETUP -#line 233 "../../../src/mesa/program/program_lexer.l" +#line 233 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } YY_BREAK case 49: YY_RULE_SETUP -#line 234 "../../../src/mesa/program/program_lexer.l" +#line 234 "./program/program_lexer.l" { return PROGRAM; } YY_BREAK case 50: YY_RULE_SETUP -#line 235 "../../../src/mesa/program/program_lexer.l" +#line 235 "./program/program_lexer.l" { return STATE; } YY_BREAK case 51: YY_RULE_SETUP -#line 236 "../../../src/mesa/program/program_lexer.l" +#line 236 "./program/program_lexer.l" { return RESULT; } YY_BREAK case 52: YY_RULE_SETUP -#line 238 "../../../src/mesa/program/program_lexer.l" +#line 238 "./program/program_lexer.l" { return AMBIENT; } YY_BREAK case 53: YY_RULE_SETUP -#line 239 "../../../src/mesa/program/program_lexer.l" +#line 239 "./program/program_lexer.l" { return ATTENUATION; } YY_BREAK case 54: YY_RULE_SETUP -#line 240 "../../../src/mesa/program/program_lexer.l" +#line 240 "./program/program_lexer.l" { return BACK; } YY_BREAK case 55: YY_RULE_SETUP -#line 241 "../../../src/mesa/program/program_lexer.l" +#line 241 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, CLIP); } YY_BREAK case 56: YY_RULE_SETUP -#line 242 "../../../src/mesa/program/program_lexer.l" +#line 242 "./program/program_lexer.l" { return COLOR; } YY_BREAK case 57: YY_RULE_SETUP -#line 243 "../../../src/mesa/program/program_lexer.l" +#line 243 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_fp, DEPTH); } YY_BREAK case 58: YY_RULE_SETUP -#line 244 "../../../src/mesa/program/program_lexer.l" +#line 244 "./program/program_lexer.l" { return DIFFUSE; } YY_BREAK case 59: YY_RULE_SETUP -#line 245 "../../../src/mesa/program/program_lexer.l" +#line 245 "./program/program_lexer.l" { return DIRECTION; } YY_BREAK case 60: YY_RULE_SETUP -#line 246 "../../../src/mesa/program/program_lexer.l" +#line 246 "./program/program_lexer.l" { return EMISSION; } YY_BREAK case 61: YY_RULE_SETUP -#line 247 "../../../src/mesa/program/program_lexer.l" +#line 247 "./program/program_lexer.l" { return ENV; } YY_BREAK case 62: YY_RULE_SETUP -#line 248 "../../../src/mesa/program/program_lexer.l" +#line 248 "./program/program_lexer.l" { return EYE; } YY_BREAK case 63: YY_RULE_SETUP -#line 249 "../../../src/mesa/program/program_lexer.l" +#line 249 "./program/program_lexer.l" { return FOGCOORD; } YY_BREAK case 64: YY_RULE_SETUP -#line 250 "../../../src/mesa/program/program_lexer.l" +#line 250 "./program/program_lexer.l" { return FOG; } YY_BREAK case 65: YY_RULE_SETUP -#line 251 "../../../src/mesa/program/program_lexer.l" +#line 251 "./program/program_lexer.l" { return FRONT; } YY_BREAK case 66: YY_RULE_SETUP -#line 252 "../../../src/mesa/program/program_lexer.l" +#line 252 "./program/program_lexer.l" { return HALF; } YY_BREAK case 67: YY_RULE_SETUP -#line 253 "../../../src/mesa/program/program_lexer.l" +#line 253 "./program/program_lexer.l" { return INVERSE; } YY_BREAK case 68: YY_RULE_SETUP -#line 254 "../../../src/mesa/program/program_lexer.l" +#line 254 "./program/program_lexer.l" { return INVTRANS; } YY_BREAK case 69: YY_RULE_SETUP -#line 255 "../../../src/mesa/program/program_lexer.l" +#line 255 "./program/program_lexer.l" { return LIGHT; } YY_BREAK case 70: YY_RULE_SETUP -#line 256 "../../../src/mesa/program/program_lexer.l" +#line 256 "./program/program_lexer.l" { return LIGHTMODEL; } YY_BREAK case 71: YY_RULE_SETUP -#line 257 "../../../src/mesa/program/program_lexer.l" +#line 257 "./program/program_lexer.l" { return LIGHTPROD; } YY_BREAK case 72: YY_RULE_SETUP -#line 258 "../../../src/mesa/program/program_lexer.l" +#line 258 "./program/program_lexer.l" { return LOCAL; } YY_BREAK case 73: YY_RULE_SETUP -#line 259 "../../../src/mesa/program/program_lexer.l" +#line 259 "./program/program_lexer.l" { return MATERIAL; } YY_BREAK case 74: YY_RULE_SETUP -#line 260 "../../../src/mesa/program/program_lexer.l" +#line 260 "./program/program_lexer.l" { return MAT_PROGRAM; } YY_BREAK case 75: YY_RULE_SETUP -#line 261 "../../../src/mesa/program/program_lexer.l" +#line 261 "./program/program_lexer.l" { return MATRIX; } YY_BREAK case 76: YY_RULE_SETUP -#line 262 "../../../src/mesa/program/program_lexer.l" +#line 262 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } YY_BREAK case 77: YY_RULE_SETUP -#line 263 "../../../src/mesa/program/program_lexer.l" +#line 263 "./program/program_lexer.l" { return MODELVIEW; } YY_BREAK case 78: YY_RULE_SETUP -#line 264 "../../../src/mesa/program/program_lexer.l" +#line 264 "./program/program_lexer.l" { return MVP; } YY_BREAK case 79: YY_RULE_SETUP -#line 265 "../../../src/mesa/program/program_lexer.l" +#line 265 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, NORMAL); } YY_BREAK case 80: YY_RULE_SETUP -#line 266 "../../../src/mesa/program/program_lexer.l" +#line 266 "./program/program_lexer.l" { return OBJECT; } YY_BREAK case 81: YY_RULE_SETUP -#line 267 "../../../src/mesa/program/program_lexer.l" +#line 267 "./program/program_lexer.l" { return PALETTE; } YY_BREAK case 82: YY_RULE_SETUP -#line 268 "../../../src/mesa/program/program_lexer.l" +#line 268 "./program/program_lexer.l" { return PARAMS; } YY_BREAK case 83: YY_RULE_SETUP -#line 269 "../../../src/mesa/program/program_lexer.l" +#line 269 "./program/program_lexer.l" { return PLANE; } YY_BREAK case 84: YY_RULE_SETUP -#line 270 "../../../src/mesa/program/program_lexer.l" +#line 270 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, POINT_TOK); } YY_BREAK case 85: YY_RULE_SETUP -#line 271 "../../../src/mesa/program/program_lexer.l" +#line 271 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, POINTSIZE); } YY_BREAK case 86: YY_RULE_SETUP -#line 272 "../../../src/mesa/program/program_lexer.l" +#line 272 "./program/program_lexer.l" { return POSITION; } YY_BREAK case 87: YY_RULE_SETUP -#line 273 "../../../src/mesa/program/program_lexer.l" +#line 273 "./program/program_lexer.l" { return PRIMARY; } YY_BREAK case 88: YY_RULE_SETUP -#line 274 "../../../src/mesa/program/program_lexer.l" +#line 274 "./program/program_lexer.l" { return PROJECTION; } YY_BREAK case 89: YY_RULE_SETUP -#line 275 "../../../src/mesa/program/program_lexer.l" +#line 275 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_fp, RANGE); } YY_BREAK case 90: YY_RULE_SETUP -#line 276 "../../../src/mesa/program/program_lexer.l" +#line 276 "./program/program_lexer.l" { return ROW; } YY_BREAK case 91: YY_RULE_SETUP -#line 277 "../../../src/mesa/program/program_lexer.l" +#line 277 "./program/program_lexer.l" { return SCENECOLOR; } YY_BREAK case 92: YY_RULE_SETUP -#line 278 "../../../src/mesa/program/program_lexer.l" +#line 278 "./program/program_lexer.l" { return SECONDARY; } YY_BREAK case 93: YY_RULE_SETUP -#line 279 "../../../src/mesa/program/program_lexer.l" +#line 279 "./program/program_lexer.l" { return SHININESS; } YY_BREAK case 94: YY_RULE_SETUP -#line 280 "../../../src/mesa/program/program_lexer.l" +#line 280 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, SIZE_TOK); } YY_BREAK case 95: YY_RULE_SETUP -#line 281 "../../../src/mesa/program/program_lexer.l" +#line 281 "./program/program_lexer.l" { return SPECULAR; } YY_BREAK case 96: YY_RULE_SETUP -#line 282 "../../../src/mesa/program/program_lexer.l" +#line 282 "./program/program_lexer.l" { return SPOT; } YY_BREAK case 97: YY_RULE_SETUP -#line 283 "../../../src/mesa/program/program_lexer.l" +#line 283 "./program/program_lexer.l" { return TEXCOORD; } YY_BREAK case 98: YY_RULE_SETUP -#line 284 "../../../src/mesa/program/program_lexer.l" +#line 284 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_fp, TEXENV); } YY_BREAK case 99: YY_RULE_SETUP -#line 285 "../../../src/mesa/program/program_lexer.l" +#line 285 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN); } YY_BREAK case 100: YY_RULE_SETUP -#line 286 "../../../src/mesa/program/program_lexer.l" +#line 286 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } YY_BREAK case 101: YY_RULE_SETUP -#line 287 "../../../src/mesa/program/program_lexer.l" +#line 287 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_S); } YY_BREAK case 102: YY_RULE_SETUP -#line 288 "../../../src/mesa/program/program_lexer.l" +#line 288 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, TEXGEN_T); } YY_BREAK case 103: YY_RULE_SETUP -#line 289 "../../../src/mesa/program/program_lexer.l" +#line 289 "./program/program_lexer.l" { return TEXTURE; } YY_BREAK case 104: YY_RULE_SETUP -#line 290 "../../../src/mesa/program/program_lexer.l" +#line 290 "./program/program_lexer.l" { return TRANSPOSE; } YY_BREAK case 105: YY_RULE_SETUP -#line 291 "../../../src/mesa/program/program_lexer.l" +#line 291 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, VTXATTRIB); } YY_BREAK case 106: YY_RULE_SETUP -#line 292 "../../../src/mesa/program/program_lexer.l" +#line 292 "./program/program_lexer.l" { return_token_or_DOT(require_ARB_vp, WEIGHT); } YY_BREAK case 107: YY_RULE_SETUP -#line 294 "../../../src/mesa/program/program_lexer.l" +#line 294 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } YY_BREAK case 108: YY_RULE_SETUP -#line 295 "../../../src/mesa/program/program_lexer.l" +#line 295 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } YY_BREAK case 109: YY_RULE_SETUP -#line 296 "../../../src/mesa/program/program_lexer.l" +#line 296 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } YY_BREAK case 110: YY_RULE_SETUP -#line 297 "../../../src/mesa/program/program_lexer.l" +#line 297 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } YY_BREAK case 111: YY_RULE_SETUP -#line 298 "../../../src/mesa/program/program_lexer.l" +#line 298 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } YY_BREAK case 112: YY_RULE_SETUP -#line 299 "../../../src/mesa/program/program_lexer.l" +#line 299 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } YY_BREAK case 113: YY_RULE_SETUP -#line 300 "../../../src/mesa/program/program_lexer.l" +#line 300 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } YY_BREAK case 114: YY_RULE_SETUP -#line 301 "../../../src/mesa/program/program_lexer.l" +#line 301 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } YY_BREAK case 115: YY_RULE_SETUP -#line 302 "../../../src/mesa/program/program_lexer.l" +#line 302 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } YY_BREAK case 116: YY_RULE_SETUP -#line 303 "../../../src/mesa/program/program_lexer.l" +#line 303 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } YY_BREAK case 117: YY_RULE_SETUP -#line 304 "../../../src/mesa/program/program_lexer.l" +#line 304 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } YY_BREAK case 118: YY_RULE_SETUP -#line 305 "../../../src/mesa/program/program_lexer.l" +#line 305 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } YY_BREAK case 119: YY_RULE_SETUP -#line 306 "../../../src/mesa/program/program_lexer.l" +#line 306 "./program/program_lexer.l" { return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } YY_BREAK case 120: YY_RULE_SETUP -#line 308 "../../../src/mesa/program/program_lexer.l" +#line 308 "./program/program_lexer.l" { return handle_ident(yyextra, yytext, yylval); } YY_BREAK case 121: YY_RULE_SETUP -#line 310 "../../../src/mesa/program/program_lexer.l" +#line 310 "./program/program_lexer.l" { return DOT_DOT; } YY_BREAK case 122: YY_RULE_SETUP -#line 312 "../../../src/mesa/program/program_lexer.l" +#line 312 "./program/program_lexer.l" { yylval->integer = strtol(yytext, NULL, 10); return INTEGER; @@ -1993,7 +1993,7 @@ YY_RULE_SETUP YY_BREAK case 123: YY_RULE_SETUP -#line 316 "../../../src/mesa/program/program_lexer.l" +#line 316 "./program/program_lexer.l" { yylval->real = _mesa_strtof(yytext, NULL); return REAL; @@ -2006,7 +2006,7 @@ YY_LINENO_REWIND_TO(yy_cp - 1); yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 320 "../../../src/mesa/program/program_lexer.l" +#line 320 "./program/program_lexer.l" { yylval->real = _mesa_strtof(yytext, NULL); return REAL; @@ -2014,7 +2014,7 @@ YY_RULE_SETUP YY_BREAK case 125: YY_RULE_SETUP -#line 324 "../../../src/mesa/program/program_lexer.l" +#line 324 "./program/program_lexer.l" { yylval->real = _mesa_strtof(yytext, NULL); return REAL; @@ -2022,7 +2022,7 @@ YY_RULE_SETUP YY_BREAK case 126: YY_RULE_SETUP -#line 328 "../../../src/mesa/program/program_lexer.l" +#line 328 "./program/program_lexer.l" { yylval->real = _mesa_strtof(yytext, NULL); return REAL; @@ -2030,7 +2030,7 @@ YY_RULE_SETUP YY_BREAK case 127: YY_RULE_SETUP -#line 333 "../../../src/mesa/program/program_lexer.l" +#line 333 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2039,7 +2039,7 @@ YY_RULE_SETUP YY_BREAK case 128: YY_RULE_SETUP -#line 339 "../../../src/mesa/program/program_lexer.l" +#line 339 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2049,7 +2049,7 @@ YY_RULE_SETUP YY_BREAK case 129: YY_RULE_SETUP -#line 345 "../../../src/mesa/program/program_lexer.l" +#line 345 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2058,7 +2058,7 @@ YY_RULE_SETUP YY_BREAK case 130: YY_RULE_SETUP -#line 350 "../../../src/mesa/program/program_lexer.l" +#line 350 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2067,7 +2067,7 @@ YY_RULE_SETUP YY_BREAK case 131: YY_RULE_SETUP -#line 356 "../../../src/mesa/program/program_lexer.l" +#line 356 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2077,7 +2077,7 @@ YY_RULE_SETUP YY_BREAK case 132: YY_RULE_SETUP -#line 362 "../../../src/mesa/program/program_lexer.l" +#line 362 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2087,7 +2087,7 @@ YY_RULE_SETUP YY_BREAK case 133: YY_RULE_SETUP -#line 368 "../../../src/mesa/program/program_lexer.l" +#line 368 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2096,7 +2096,7 @@ YY_RULE_SETUP YY_BREAK case 134: YY_RULE_SETUP -#line 374 "../../../src/mesa/program/program_lexer.l" +#line 374 "./program/program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2106,7 +2106,7 @@ YY_RULE_SETUP YY_BREAK case 135: YY_RULE_SETUP -#line 381 "../../../src/mesa/program/program_lexer.l" +#line 381 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2118,7 +2118,7 @@ YY_RULE_SETUP YY_BREAK case 136: YY_RULE_SETUP -#line 390 "../../../src/mesa/program/program_lexer.l" +#line 390 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_NOOP; yylval->swiz_mask.mask = WRITEMASK_XYZW; @@ -2127,7 +2127,7 @@ YY_RULE_SETUP YY_BREAK case 137: YY_RULE_SETUP -#line 396 "../../../src/mesa/program/program_lexer.l" +#line 396 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XY @@ -2137,7 +2137,7 @@ YY_RULE_SETUP YY_BREAK case 138: YY_RULE_SETUP -#line 402 "../../../src/mesa/program/program_lexer.l" +#line 402 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_XZW; @@ -2146,7 +2146,7 @@ YY_RULE_SETUP YY_BREAK case 139: YY_RULE_SETUP -#line 407 "../../../src/mesa/program/program_lexer.l" +#line 407 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_YZW; @@ -2155,7 +2155,7 @@ YY_RULE_SETUP YY_BREAK case 140: YY_RULE_SETUP -#line 413 "../../../src/mesa/program/program_lexer.l" +#line 413 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_X @@ -2165,7 +2165,7 @@ YY_RULE_SETUP YY_BREAK case 141: YY_RULE_SETUP -#line 419 "../../../src/mesa/program/program_lexer.l" +#line 419 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_Y @@ -2175,7 +2175,7 @@ YY_RULE_SETUP YY_BREAK case 142: YY_RULE_SETUP -#line 425 "../../../src/mesa/program/program_lexer.l" +#line 425 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = SWIZZLE_INVAL; yylval->swiz_mask.mask = WRITEMASK_ZW; @@ -2184,7 +2184,7 @@ YY_RULE_SETUP YY_BREAK case 143: YY_RULE_SETUP -#line 431 "../../../src/mesa/program/program_lexer.l" +#line 431 "./program/program_lexer.l" { const unsigned s = swiz_from_char(yytext[1]); yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); @@ -2194,7 +2194,7 @@ YY_RULE_SETUP YY_BREAK case 144: YY_RULE_SETUP -#line 439 "../../../src/mesa/program/program_lexer.l" +#line 439 "./program/program_lexer.l" { if (require_ARB_vp) { return TEXGEN_R; @@ -2208,7 +2208,7 @@ YY_RULE_SETUP YY_BREAK case 145: YY_RULE_SETUP -#line 450 "../../../src/mesa/program/program_lexer.l" +#line 450 "./program/program_lexer.l" { yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), swiz_from_char(yytext[2]), @@ -2220,13 +2220,13 @@ YY_RULE_SETUP YY_BREAK case 146: YY_RULE_SETUP -#line 459 "../../../src/mesa/program/program_lexer.l" +#line 459 "./program/program_lexer.l" { return DOT; } YY_BREAK case 147: /* rule 147 can match eol */ YY_RULE_SETUP -#line 461 "../../../src/mesa/program/program_lexer.l" +#line 461 "./program/program_lexer.l" { yylloc->first_line++; yylloc->first_column = 1; @@ -2237,7 +2237,7 @@ YY_RULE_SETUP YY_BREAK case 148: YY_RULE_SETUP -#line 468 "../../../src/mesa/program/program_lexer.l" +#line 468 "./program/program_lexer.l" /* eat whitespace */ ; YY_BREAK case 149: @@ -2245,17 +2245,17 @@ case 149: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 469 "../../../src/mesa/program/program_lexer.l" +#line 469 "./program/program_lexer.l" /* eat comments */ ; YY_BREAK case 150: YY_RULE_SETUP -#line 470 "../../../src/mesa/program/program_lexer.l" +#line 470 "./program/program_lexer.l" { return yytext[0]; } YY_BREAK case 151: YY_RULE_SETUP -#line 471 "../../../src/mesa/program/program_lexer.l" +#line 471 "./program/program_lexer.l" ECHO; YY_BREAK #line 2262 "program/lex.yy.c" @@ -3451,7 +3451,7 @@ void _mesa_program_lexer_free (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 471 "../../../src/mesa/program/program_lexer.l" +#line 471 "./program/program_lexer.l" diff --git a/lib/mesa/src/mesa/program/program_parse.tab.c b/lib/mesa/src/mesa/program/program_parse.tab.c index 85f4cad5e..a18d5ae78 100644 --- a/lib/mesa/src/mesa/program/program_parse.tab.c +++ b/lib/mesa/src/mesa/program/program_parse.tab.c @@ -68,7 +68,7 @@ /* Copy the first part of user declarations. */ -#line 1 "../../../src/mesa/program/program_parse.y" /* yacc.c:339 */ +#line 1 "./program/program_parse.y" /* yacc.c:339 */ /* * Copyright © 2009 Intel Corporation @@ -335,7 +335,7 @@ extern int _mesa_program_debug; union YYSTYPE { -#line 126 "../../../src/mesa/program/program_parse.y" /* yacc.c:355 */ +#line 126 "./program/program_parse.y" /* yacc.c:355 */ struct asm_instruction *inst; struct asm_symbol *sym; @@ -390,7 +390,7 @@ int _mesa_program_parse (struct asm_parser_state *state); #endif /* !YY__MESA_PROGRAM_PROGRAM_PROGRAM_PARSE_TAB_H_INCLUDED */ /* Copy the second part of user declarations. */ -#line 269 "../../../src/mesa/program/program_parse.y" /* yacc.c:358 */ +#line 269 "./program/program_parse.y" /* yacc.c:358 */ extern int _mesa_program_lexer_lex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, @@ -1960,7 +1960,7 @@ yyreduce: switch (yyn) { case 3: -#line 288 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 288 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) { yyerror(& (yylsp[0]), state, "invalid fragment program header"); @@ -1972,7 +1972,7 @@ yyreduce: break; case 4: -#line 296 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 296 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) { yyerror(& (yylsp[0]), state, "invalid vertex program header"); @@ -1986,7 +1986,7 @@ yyreduce: break; case 7: -#line 312 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 312 "./program/program_parse.y" /* yacc.c:1646 */ { int valid = 0; @@ -2012,7 +2012,7 @@ yyreduce: break; case 10: -#line 340 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 340 "./program/program_parse.y" /* yacc.c:1646 */ { if ((yyvsp[-1].inst) != NULL) { if (state->inst_tail == NULL) { @@ -2031,7 +2031,7 @@ yyreduce: break; case 12: -#line 358 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 358 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst); state->prog->NumAluInstructions++; @@ -2040,7 +2040,7 @@ yyreduce: break; case 13: -#line 363 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 363 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = (yyvsp[0].inst); state->prog->NumTexInstructions++; @@ -2049,7 +2049,7 @@ yyreduce: break; case 24: -#line 384 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 384 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[-2].dst_reg), & (yyvsp[0].src_reg), NULL, NULL); } @@ -2057,7 +2057,7 @@ yyreduce: break; case 25: -#line 390 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 390 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[-3].temp_inst), & (yyvsp[-2].dst_reg), & (yyvsp[0].src_reg), NULL, NULL); } @@ -2065,7 +2065,7 @@ yyreduce: break; case 26: -#line 396 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 396 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[-3].temp_inst), & (yyvsp[-2].dst_reg), & (yyvsp[0].src_reg), NULL, NULL); } @@ -2073,7 +2073,7 @@ yyreduce: break; case 27: -#line 402 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 402 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[-5].temp_inst), & (yyvsp[-4].dst_reg), & (yyvsp[-2].src_reg), & (yyvsp[0].src_reg), NULL); } @@ -2081,7 +2081,7 @@ yyreduce: break; case 28: -#line 409 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 409 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[-5].temp_inst), & (yyvsp[-4].dst_reg), & (yyvsp[-2].src_reg), & (yyvsp[0].src_reg), NULL); } @@ -2089,7 +2089,7 @@ yyreduce: break; case 29: -#line 416 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 416 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[-7].temp_inst), & (yyvsp[-6].dst_reg), & (yyvsp[-4].src_reg), & (yyvsp[-2].src_reg), & (yyvsp[0].src_reg)); } @@ -2097,7 +2097,7 @@ yyreduce: break; case 30: -#line 422 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 422 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[-7].temp_inst), & (yyvsp[-6].dst_reg), & (yyvsp[-4].src_reg), NULL, NULL); if ((yyval.inst) != NULL) { @@ -2143,7 +2143,7 @@ yyreduce: break; case 31: -#line 466 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 466 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[0].src_reg), NULL, NULL); state->fragment.UsesKill = 1; @@ -2152,7 +2152,7 @@ yyreduce: break; case 32: -#line 473 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 473 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[-11].temp_inst), & (yyvsp[-10].dst_reg), & (yyvsp[-8].src_reg), & (yyvsp[-6].src_reg), & (yyvsp[-4].src_reg)); if ((yyval.inst) != NULL) { @@ -2198,7 +2198,7 @@ yyreduce: break; case 33: -#line 517 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 517 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } @@ -2206,79 +2206,79 @@ yyreduce: break; case 34: -#line 522 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 522 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = TEXTURE_1D_INDEX; } #line 2212 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 35: -#line 523 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 523 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = TEXTURE_2D_INDEX; } #line 2218 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 36: -#line 524 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 524 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = TEXTURE_3D_INDEX; } #line 2224 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 37: -#line 525 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 525 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = TEXTURE_CUBE_INDEX; } #line 2230 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 38: -#line 526 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 526 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = TEXTURE_RECT_INDEX; } #line 2236 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 39: -#line 527 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 527 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = -TEXTURE_1D_INDEX; } #line 2242 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 40: -#line 528 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 528 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = -TEXTURE_2D_INDEX; } #line 2248 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 41: -#line 529 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 529 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = -TEXTURE_RECT_INDEX; } #line 2254 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 42: -#line 530 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 530 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; } #line 2260 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 43: -#line 531 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 531 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; } #line 2266 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 44: -#line 532 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 532 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; } #line 2272 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 45: -#line 533 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 533 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; } #line 2278 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 46: -#line 537 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 537 "./program/program_parse.y" /* yacc.c:1646 */ { /* FIXME: Is this correct? Should the extenedSwizzle be applied * FIXME: to the existing swizzle? @@ -2292,7 +2292,7 @@ yyreduce: break; case 47: -#line 549 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 549 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.src_reg) = (yyvsp[0].src_reg); @@ -2304,7 +2304,7 @@ yyreduce: break; case 48: -#line 559 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 559 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.src_reg) = (yyvsp[-1].src_reg); @@ -2315,7 +2315,7 @@ yyreduce: break; case 49: -#line 568 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 568 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.src_reg) = (yyvsp[-1].src_reg); @@ -2330,7 +2330,7 @@ yyreduce: break; case 50: -#line 581 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 581 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.dst_reg) = (yyvsp[-1].dst_reg); (yyval.dst_reg).WriteMask = (yyvsp[0].swiz_mask).mask; @@ -2354,7 +2354,7 @@ yyreduce: break; case 51: -#line 603 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 603 "./program/program_parse.y" /* yacc.c:1646 */ { set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0); (yyval.dst_reg).WriteMask = (yyvsp[0].swiz_mask).mask; @@ -2363,7 +2363,7 @@ yyreduce: break; case 52: -#line 610 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 610 "./program/program_parse.y" /* yacc.c:1646 */ { const unsigned xyzw_valid = ((yyvsp[-6].ext_swizzle).xyzw_valid << 0) @@ -2398,7 +2398,7 @@ yyreduce: break; case 53: -#line 643 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 643 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.ext_swizzle) = (yyvsp[0].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[-1].negate)) ? 1 : 0; @@ -2407,7 +2407,7 @@ yyreduce: break; case 54: -#line 650 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 650 "./program/program_parse.y" /* yacc.c:1646 */ { if (((yyvsp[0].integer) != 0) && ((yyvsp[0].integer) != 1)) { yyerror(& (yylsp[0]), state, "invalid extended swizzle selector"); @@ -2427,7 +2427,7 @@ yyreduce: break; case 55: -#line 666 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 666 "./program/program_parse.y" /* yacc.c:1646 */ { char s; @@ -2488,7 +2488,7 @@ yyreduce: break; case 56: -#line 725 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 725 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, (yyvsp[0].string)); @@ -2535,7 +2535,7 @@ yyreduce: break; case 57: -#line 768 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 768 "./program/program_parse.y" /* yacc.c:1646 */ { set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[0].attrib)); state->prog->InputsRead |= BITFIELD64_BIT((yyval.src_reg).Base.Index); @@ -2548,7 +2548,7 @@ yyreduce: break; case 58: -#line 777 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 777 "./program/program_parse.y" /* yacc.c:1646 */ { if (! (yyvsp[-1].src_reg).Base.RelAddr && ((unsigned) (yyvsp[-1].src_reg).Base.Index >= (yyvsp[-3].sym)->param_binding_length)) { @@ -2574,7 +2574,7 @@ yyreduce: break; case 59: -#line 799 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 799 "./program/program_parse.y" /* yacc.c:1646 */ { gl_register_file file = ((yyvsp[0].temp_sym).name != NULL) ? (yyvsp[0].temp_sym).param_binding_type @@ -2586,7 +2586,7 @@ yyreduce: break; case 60: -#line 809 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 809 "./program/program_parse.y" /* yacc.c:1646 */ { set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[0].result)); } @@ -2594,7 +2594,7 @@ yyreduce: break; case 61: -#line 813 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 813 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, (yyvsp[0].string)); @@ -2625,7 +2625,7 @@ yyreduce: break; case 62: -#line 842 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 842 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, (yyvsp[0].string)); @@ -2646,7 +2646,7 @@ yyreduce: break; case 65: -#line 863 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 863 "./program/program_parse.y" /* yacc.c:1646 */ { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[0].integer); @@ -2655,7 +2655,7 @@ yyreduce: break; case 66: -#line 870 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 870 "./program/program_parse.y" /* yacc.c:1646 */ { /* FINISHME: Add support for multiple address registers. */ @@ -2669,25 +2669,25 @@ yyreduce: break; case 67: -#line 881 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 881 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 2675 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 68: -#line 882 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 882 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } #line 2681 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 69: -#line 883 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 883 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = -(yyvsp[0].integer); } #line 2687 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 70: -#line 887 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 887 "./program/program_parse.y" /* yacc.c:1646 */ { if (((yyvsp[0].integer) < 0) || ((yyvsp[0].integer) > (state->limits->MaxAddressOffset - 1))) { char s[100]; @@ -2703,7 +2703,7 @@ yyreduce: break; case 71: -#line 901 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 901 "./program/program_parse.y" /* yacc.c:1646 */ { if (((yyvsp[0].integer) < 0) || ((yyvsp[0].integer) > state->limits->MaxAddressOffset)) { char s[100]; @@ -2719,7 +2719,7 @@ yyreduce: break; case 72: -#line 915 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 915 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, (yyvsp[0].string)); @@ -2741,7 +2741,7 @@ yyreduce: break; case 73: -#line 935 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 935 "./program/program_parse.y" /* yacc.c:1646 */ { if ((yyvsp[0].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[0]), state, "invalid address component selector"); @@ -2754,7 +2754,7 @@ yyreduce: break; case 74: -#line 946 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 946 "./program/program_parse.y" /* yacc.c:1646 */ { if ((yyvsp[0].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[0]), state, @@ -2768,19 +2768,19 @@ yyreduce: break; case 79: -#line 962 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 962 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; } #line 2774 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 84: -#line 966 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 966 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; } #line 2780 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 91: -#line 978 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 978 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *const s = declare_variable(state, (yyvsp[-2].string), at_attrib, & (yylsp[-2])); @@ -2801,7 +2801,7 @@ yyreduce: break; case 92: -#line 997 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 997 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = (yyvsp[0].attrib); } @@ -2809,7 +2809,7 @@ yyreduce: break; case 93: -#line 1001 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1001 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = (yyvsp[0].attrib); } @@ -2817,7 +2817,7 @@ yyreduce: break; case 94: -#line 1007 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1007 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VERT_ATTRIB_POS; } @@ -2825,7 +2825,7 @@ yyreduce: break; case 95: -#line 1011 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1011 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VERT_ATTRIB_WEIGHT; } @@ -2833,7 +2833,7 @@ yyreduce: break; case 96: -#line 1015 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1015 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VERT_ATTRIB_NORMAL; } @@ -2841,7 +2841,7 @@ yyreduce: break; case 97: -#line 1019 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1019 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VERT_ATTRIB_COLOR0 + (yyvsp[0].integer); } @@ -2849,7 +2849,7 @@ yyreduce: break; case 98: -#line 1023 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1023 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VERT_ATTRIB_FOG; } @@ -2857,7 +2857,7 @@ yyreduce: break; case 99: -#line 1027 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1027 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[0].integer); } @@ -2865,7 +2865,7 @@ yyreduce: break; case 100: -#line 1031 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1031 "./program/program_parse.y" /* yacc.c:1646 */ { yyerror(& (yylsp[-3]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -2874,7 +2874,7 @@ yyreduce: break; case 101: -#line 1036 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1036 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[-1].integer); } @@ -2882,7 +2882,7 @@ yyreduce: break; case 102: -#line 1042 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1042 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[0]), state, "invalid vertex attribute reference"); @@ -2895,7 +2895,7 @@ yyreduce: break; case 106: -#line 1056 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1056 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VARYING_SLOT_POS; } @@ -2903,7 +2903,7 @@ yyreduce: break; case 107: -#line 1060 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1060 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VARYING_SLOT_COL0 + (yyvsp[0].integer); } @@ -2911,7 +2911,7 @@ yyreduce: break; case 108: -#line 1064 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1064 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VARYING_SLOT_FOGC; } @@ -2919,7 +2919,7 @@ yyreduce: break; case 109: -#line 1068 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1068 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.attrib) = VARYING_SLOT_TEX0 + (yyvsp[0].integer); } @@ -2927,7 +2927,7 @@ yyreduce: break; case 112: -#line 1076 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1076 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *const s = declare_variable(state, (yyvsp[-1].string), at_param, & (yylsp[-1])); @@ -2947,7 +2947,7 @@ yyreduce: break; case 113: -#line 1094 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1094 "./program/program_parse.y" /* yacc.c:1646 */ { if (((yyvsp[-2].integer) != 0) && ((unsigned) (yyvsp[-2].integer) != (yyvsp[0].temp_sym).param_binding_length)) { free((yyvsp[-4].string)); @@ -2974,7 +2974,7 @@ yyreduce: break; case 114: -#line 1119 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1119 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } @@ -2982,7 +2982,7 @@ yyreduce: break; case 115: -#line 1123 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1123 "./program/program_parse.y" /* yacc.c:1646 */ { if (((yyvsp[0].integer) < 1) || ((unsigned) (yyvsp[0].integer) > state->limits->MaxParameters)) { char msg[100]; @@ -2999,7 +2999,7 @@ yyreduce: break; case 116: -#line 1138 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1138 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.temp_sym) = (yyvsp[0].temp_sym); } @@ -3007,7 +3007,7 @@ yyreduce: break; case 117: -#line 1144 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1144 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.temp_sym) = (yyvsp[-1].temp_sym); } @@ -3015,7 +3015,7 @@ yyreduce: break; case 119: -#line 1151 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1151 "./program/program_parse.y" /* yacc.c:1646 */ { (yyvsp[-2].temp_sym).param_binding_length += (yyvsp[0].temp_sym).param_binding_length; (yyval.temp_sym) = (yyvsp[-2].temp_sym); @@ -3024,7 +3024,7 @@ yyreduce: break; case 120: -#line 1158 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1158 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3034,7 +3034,7 @@ yyreduce: break; case 121: -#line 1164 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1164 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3044,7 +3044,7 @@ yyreduce: break; case 122: -#line 1170 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1170 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3054,7 +3054,7 @@ yyreduce: break; case 123: -#line 1178 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1178 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3064,7 +3064,7 @@ yyreduce: break; case 124: -#line 1184 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1184 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3074,7 +3074,7 @@ yyreduce: break; case 125: -#line 1190 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1190 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3084,7 +3084,7 @@ yyreduce: break; case 126: -#line 1198 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1198 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3094,7 +3094,7 @@ yyreduce: break; case 127: -#line 1204 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1204 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3104,7 +3104,7 @@ yyreduce: break; case 128: -#line 1210 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1210 "./program/program_parse.y" /* yacc.c:1646 */ { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3114,85 +3114,85 @@ yyreduce: break; case 129: -#line 1217 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1217 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3120 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 130: -#line 1218 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1218 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3126 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 131: -#line 1221 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1221 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3132 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 132: -#line 1222 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1222 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3138 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 133: -#line 1223 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1223 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3144 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 134: -#line 1224 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1224 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3150 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 135: -#line 1225 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1225 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3156 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 136: -#line 1226 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1226 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3162 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 137: -#line 1227 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1227 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3168 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 138: -#line 1228 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1228 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3174 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 139: -#line 1229 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1229 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3180 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 140: -#line 1230 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1230 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3186 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 141: -#line 1231 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1231 "./program/program_parse.y" /* yacc.c:1646 */ { memcpy((yyval.state), (yyvsp[0].state), sizeof((yyval.state))); } #line 3192 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 142: -#line 1235 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1235 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3203,7 +3203,7 @@ yyreduce: break; case 143: -#line 1244 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1244 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } @@ -3211,7 +3211,7 @@ yyreduce: break; case 144: -#line 1248 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1248 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_EMISSION; } @@ -3219,7 +3219,7 @@ yyreduce: break; case 145: -#line 1252 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1252 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_SHININESS; } @@ -3227,7 +3227,7 @@ yyreduce: break; case 146: -#line 1258 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1258 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3238,7 +3238,7 @@ yyreduce: break; case 147: -#line 1267 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1267 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } @@ -3246,7 +3246,7 @@ yyreduce: break; case 148: -#line 1271 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1271 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_POSITION; } @@ -3254,7 +3254,7 @@ yyreduce: break; case 149: -#line 1275 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1275 "./program/program_parse.y" /* yacc.c:1646 */ { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[0]), state, "GL_ARB_point_parameters not supported"); @@ -3267,7 +3267,7 @@ yyreduce: break; case 150: -#line 1284 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1284 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } @@ -3275,7 +3275,7 @@ yyreduce: break; case 151: -#line 1288 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1288 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_HALF_VECTOR; } @@ -3283,7 +3283,7 @@ yyreduce: break; case 152: -#line 1294 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1294 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_SPOT_DIRECTION; } @@ -3291,7 +3291,7 @@ yyreduce: break; case 153: -#line 1300 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1300 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[0].state)[0]; (yyval.state)[1] = (yyvsp[0].state)[1]; @@ -3300,7 +3300,7 @@ yyreduce: break; case 154: -#line 1307 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1307 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; @@ -3309,7 +3309,7 @@ yyreduce: break; case 155: -#line 1312 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1312 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3319,7 +3319,7 @@ yyreduce: break; case 156: -#line 1320 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1320 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3331,7 +3331,7 @@ yyreduce: break; case 158: -#line 1332 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1332 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[0].integer); @@ -3341,7 +3341,7 @@ yyreduce: break; case 159: -#line 1340 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1340 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_TEXENV_COLOR; } @@ -3349,7 +3349,7 @@ yyreduce: break; case 160: -#line 1346 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1346 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_AMBIENT; } @@ -3357,7 +3357,7 @@ yyreduce: break; case 161: -#line 1350 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1350 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_DIFFUSE; } @@ -3365,7 +3365,7 @@ yyreduce: break; case 162: -#line 1354 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1354 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_SPECULAR; } @@ -3373,7 +3373,7 @@ yyreduce: break; case 163: -#line 1360 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1360 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->MaxLights) { yyerror(& (yylsp[0]), state, "invalid light selector"); @@ -3386,7 +3386,7 @@ yyreduce: break; case 164: -#line 1371 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1371 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3397,7 +3397,7 @@ yyreduce: break; case 165: -#line 1380 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1380 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_TEXGEN_EYE_S; } @@ -3405,7 +3405,7 @@ yyreduce: break; case 166: -#line 1384 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1384 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_TEXGEN_OBJECT_S; } @@ -3413,7 +3413,7 @@ yyreduce: break; case 167: -#line 1389 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1389 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; } @@ -3421,7 +3421,7 @@ yyreduce: break; case 168: -#line 1393 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1393 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; } @@ -3429,7 +3429,7 @@ yyreduce: break; case 169: -#line 1397 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1397 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; } @@ -3437,7 +3437,7 @@ yyreduce: break; case 170: -#line 1401 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1401 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; } @@ -3445,7 +3445,7 @@ yyreduce: break; case 171: -#line 1407 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1407 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[0].integer); @@ -3454,7 +3454,7 @@ yyreduce: break; case 172: -#line 1414 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1414 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_FOG_COLOR; } @@ -3462,7 +3462,7 @@ yyreduce: break; case 173: -#line 1418 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1418 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_FOG_PARAMS; } @@ -3470,7 +3470,7 @@ yyreduce: break; case 174: -#line 1424 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1424 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3480,7 +3480,7 @@ yyreduce: break; case 175: -#line 1432 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1432 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[0]), state, "invalid clip plane selector"); @@ -3493,7 +3493,7 @@ yyreduce: break; case 176: -#line 1443 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1443 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[0].integer); @@ -3502,7 +3502,7 @@ yyreduce: break; case 177: -#line 1450 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1450 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_POINT_SIZE; } @@ -3510,7 +3510,7 @@ yyreduce: break; case 178: -#line 1454 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1454 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_POINT_ATTENUATION; } @@ -3518,7 +3518,7 @@ yyreduce: break; case 179: -#line 1460 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1460 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[-4].state)[0]; (yyval.state)[1] = (yyvsp[-4].state)[1]; @@ -3530,7 +3530,7 @@ yyreduce: break; case 180: -#line 1470 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1470 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[-1].state)[0]; (yyval.state)[1] = (yyvsp[-1].state)[1]; @@ -3542,7 +3542,7 @@ yyreduce: break; case 181: -#line 1480 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1480 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[2] = 0; (yyval.state)[3] = 3; @@ -3551,7 +3551,7 @@ yyreduce: break; case 182: -#line 1485 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1485 "./program/program_parse.y" /* yacc.c:1646 */ { /* It seems logical that the matrix row range specifier would have * to specify a range or more than one row (i.e., $5 > $3). @@ -3571,7 +3571,7 @@ yyreduce: break; case 183: -#line 1503 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1503 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[-1].state)[0]; (yyval.state)[1] = (yyvsp[-1].state)[1]; @@ -3581,7 +3581,7 @@ yyreduce: break; case 184: -#line 1511 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1511 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } @@ -3589,7 +3589,7 @@ yyreduce: break; case 185: -#line 1515 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1515 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } @@ -3597,7 +3597,7 @@ yyreduce: break; case 186: -#line 1521 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1521 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_MATRIX_INVERSE; } @@ -3605,7 +3605,7 @@ yyreduce: break; case 187: -#line 1525 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1525 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_MATRIX_TRANSPOSE; } @@ -3613,7 +3613,7 @@ yyreduce: break; case 188: -#line 1529 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1529 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = STATE_MATRIX_INVTRANS; } @@ -3621,7 +3621,7 @@ yyreduce: break; case 189: -#line 1535 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1535 "./program/program_parse.y" /* yacc.c:1646 */ { if ((yyvsp[0].integer) > 3) { yyerror(& (yylsp[0]), state, "invalid matrix row reference"); @@ -3634,7 +3634,7 @@ yyreduce: break; case 190: -#line 1546 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1546 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[0].integer); @@ -3643,7 +3643,7 @@ yyreduce: break; case 191: -#line 1551 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1551 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; @@ -3652,7 +3652,7 @@ yyreduce: break; case 192: -#line 1556 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1556 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; @@ -3661,7 +3661,7 @@ yyreduce: break; case 193: -#line 1561 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1561 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[0].integer); @@ -3670,7 +3670,7 @@ yyreduce: break; case 194: -#line 1566 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1566 "./program/program_parse.y" /* yacc.c:1646 */ { yyerror(& (yylsp[-3]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -3679,7 +3679,7 @@ yyreduce: break; case 195: -#line 1571 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1571 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[-1].integer); @@ -3688,7 +3688,7 @@ yyreduce: break; case 196: -#line 1578 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1578 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } @@ -3696,7 +3696,7 @@ yyreduce: break; case 197: -#line 1582 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1582 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-1].integer); } @@ -3704,7 +3704,7 @@ yyreduce: break; case 198: -#line 1587 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1587 "./program/program_parse.y" /* yacc.c:1646 */ { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -3720,7 +3720,7 @@ yyreduce: break; case 199: -#line 1600 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1600 "./program/program_parse.y" /* yacc.c:1646 */ { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -3731,7 +3731,7 @@ yyreduce: break; case 200: -#line 1608 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1608 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[0]), state, "invalid program matrix selector"); @@ -3744,7 +3744,7 @@ yyreduce: break; case 201: -#line 1619 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1619 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; @@ -3753,7 +3753,7 @@ yyreduce: break; case 206: -#line 1631 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1631 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -3765,7 +3765,7 @@ yyreduce: break; case 207: -#line 1641 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1641 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[0].integer); (yyval.state)[1] = (yyvsp[0].integer); @@ -3774,7 +3774,7 @@ yyreduce: break; case 208: -#line 1646 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1646 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[-2].integer); (yyval.state)[1] = (yyvsp[0].integer); @@ -3783,7 +3783,7 @@ yyreduce: break; case 209: -#line 1653 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1653 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -3795,7 +3795,7 @@ yyreduce: break; case 210: -#line 1663 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1663 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -3807,7 +3807,7 @@ yyreduce: break; case 211: -#line 1672 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1672 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[0].integer); (yyval.state)[1] = (yyvsp[0].integer); @@ -3816,7 +3816,7 @@ yyreduce: break; case 212: -#line 1677 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1677 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.state)[0] = (yyvsp[-2].integer); (yyval.state)[1] = (yyvsp[0].integer); @@ -3825,7 +3825,7 @@ yyreduce: break; case 213: -#line 1684 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1684 "./program/program_parse.y" /* yacc.c:1646 */ { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -3837,7 +3837,7 @@ yyreduce: break; case 214: -#line 1694 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1694 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[0]), state, "invalid environment parameter reference"); @@ -3849,7 +3849,7 @@ yyreduce: break; case 215: -#line 1704 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1704 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[0]), state, "invalid local parameter reference"); @@ -3861,7 +3861,7 @@ yyreduce: break; case 220: -#line 1719 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1719 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.vector).count = 4; (yyval.vector).data[0].f = (yyvsp[0].real); @@ -3873,7 +3873,7 @@ yyreduce: break; case 221: -#line 1729 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1729 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.vector).count = 1; (yyval.vector).data[0].f = (yyvsp[0].real); @@ -3885,7 +3885,7 @@ yyreduce: break; case 222: -#line 1737 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1737 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.vector).count = 1; (yyval.vector).data[0].f = (float) (yyvsp[0].integer); @@ -3897,7 +3897,7 @@ yyreduce: break; case 223: -#line 1747 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1747 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.vector).count = 4; (yyval.vector).data[0].f = (yyvsp[-1].real); @@ -3909,7 +3909,7 @@ yyreduce: break; case 224: -#line 1755 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1755 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.vector).count = 4; (yyval.vector).data[0].f = (yyvsp[-3].real); @@ -3921,7 +3921,7 @@ yyreduce: break; case 225: -#line 1764 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1764 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.vector).count = 4; (yyval.vector).data[0].f = (yyvsp[-5].real); @@ -3933,7 +3933,7 @@ yyreduce: break; case 226: -#line 1773 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1773 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.vector).count = 4; (yyval.vector).data[0].f = (yyvsp[-7].real); @@ -3945,7 +3945,7 @@ yyreduce: break; case 227: -#line 1783 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1783 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.real) = ((yyvsp[-1].negate)) ? -(yyvsp[0].real) : (yyvsp[0].real); } @@ -3953,7 +3953,7 @@ yyreduce: break; case 228: -#line 1787 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1787 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.real) = (float)(((yyvsp[-1].negate)) ? -(yyvsp[0].integer) : (yyvsp[0].integer)); } @@ -3961,37 +3961,37 @@ yyreduce: break; case 229: -#line 1792 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1792 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.negate) = FALSE; } #line 3967 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 230: -#line 1793 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1793 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.negate) = TRUE; } #line 3973 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 231: -#line 1794 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1794 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.negate) = FALSE; } #line 3979 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 232: -#line 1797 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1797 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } #line 3985 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 234: -#line 1800 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1800 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[0].integer); } #line 3991 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 236: -#line 1804 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1804 "./program/program_parse.y" /* yacc.c:1646 */ { if (!declare_variable(state, (yyvsp[0].string), (yyvsp[-3].integer), & (yylsp[0]))) { free((yyvsp[0].string)); @@ -4002,7 +4002,7 @@ yyreduce: break; case 237: -#line 1811 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1811 "./program/program_parse.y" /* yacc.c:1646 */ { if (!declare_variable(state, (yyvsp[0].string), (yyvsp[-1].integer), & (yylsp[0]))) { free((yyvsp[0].string)); @@ -4013,7 +4013,7 @@ yyreduce: break; case 238: -#line 1820 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1820 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *const s = declare_variable(state, (yyvsp[-2].string), at_output, & (yylsp[-2])); @@ -4029,7 +4029,7 @@ yyreduce: break; case 239: -#line 1834 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1834 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.result) = VARYING_SLOT_POS; @@ -4042,7 +4042,7 @@ yyreduce: break; case 240: -#line 1843 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1843 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.result) = VARYING_SLOT_FOGC; @@ -4055,7 +4055,7 @@ yyreduce: break; case 241: -#line 1852 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1852 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.result) = (yyvsp[0].result); } @@ -4063,7 +4063,7 @@ yyreduce: break; case 242: -#line 1856 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1856 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.result) = VARYING_SLOT_PSIZ; @@ -4076,7 +4076,7 @@ yyreduce: break; case 243: -#line 1865 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1865 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.result) = VARYING_SLOT_TEX0 + (yyvsp[0].integer); @@ -4089,7 +4089,7 @@ yyreduce: break; case 244: -#line 1874 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1874 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4102,7 +4102,7 @@ yyreduce: break; case 245: -#line 1885 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1885 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.result) = (yyvsp[-1].integer) + (yyvsp[0].integer); } @@ -4110,7 +4110,7 @@ yyreduce: break; case 246: -#line 1891 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1891 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.integer) = VARYING_SLOT_COL0; @@ -4125,7 +4125,7 @@ yyreduce: break; case 247: -#line 1902 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1902 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { yyerror(& (yylsp[-2]), state, "invalid program result name"); @@ -4157,7 +4157,7 @@ yyreduce: break; case 248: -#line 1930 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1930 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.integer) = VARYING_SLOT_COL0; @@ -4170,7 +4170,7 @@ yyreduce: break; case 249: -#line 1939 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1939 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.integer) = VARYING_SLOT_BFC0; @@ -4183,7 +4183,7 @@ yyreduce: break; case 250: -#line 1950 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1950 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } @@ -4191,7 +4191,7 @@ yyreduce: break; case 251: -#line 1954 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1954 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4204,7 +4204,7 @@ yyreduce: break; case 252: -#line 1963 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1963 "./program/program_parse.y" /* yacc.c:1646 */ { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4217,79 +4217,79 @@ yyreduce: break; case 253: -#line 1973 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1973 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 4223 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 254: -#line 1974 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1974 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 4229 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 255: -#line 1975 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1975 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } #line 4235 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 256: -#line 1978 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1978 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 4241 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 257: -#line 1979 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1979 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 4247 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 258: -#line 1980 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1980 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } #line 4253 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 259: -#line 1983 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1983 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 4259 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 260: -#line 1984 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1984 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-1].integer); } #line 4265 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 261: -#line 1987 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1987 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 4271 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 262: -#line 1988 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1988 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-1].integer); } #line 4277 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 263: -#line 1991 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1991 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = 0; } #line 4283 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 264: -#line 1992 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1992 "./program/program_parse.y" /* yacc.c:1646 */ { (yyval.integer) = (yyvsp[-1].integer); } #line 4289 "program/program_parse.tab.c" /* yacc.c:1646 */ break; case 265: -#line 1996 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 1996 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[0]), state, "invalid texture coordinate unit selector"); @@ -4302,7 +4302,7 @@ yyreduce: break; case 266: -#line 2007 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 2007 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[0]), state, "invalid texture image unit selector"); @@ -4315,7 +4315,7 @@ yyreduce: break; case 267: -#line 2018 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 2018 "./program/program_parse.y" /* yacc.c:1646 */ { if ((unsigned) (yyvsp[0].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[0]), state, "invalid texture unit selector"); @@ -4328,7 +4328,7 @@ yyreduce: break; case 268: -#line 2029 "../../../src/mesa/program/program_parse.y" /* yacc.c:1646 */ +#line 2029 "./program/program_parse.y" /* yacc.c:1646 */ { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, (yyvsp[-2].string)); @@ -4591,7 +4591,7 @@ yyreturn: #endif return yyresult; } -#line 2058 "../../../src/mesa/program/program_parse.y" /* yacc.c:1906 */ +#line 2058 "./program/program_parse.y" /* yacc.c:1906 */ void diff --git a/lib/mesa/src/mesa/program/program_parse.tab.h b/lib/mesa/src/mesa/program/program_parse.tab.h index ca649d8ec..bcc4b9e2f 100644 --- a/lib/mesa/src/mesa/program/program_parse.tab.h +++ b/lib/mesa/src/mesa/program/program_parse.tab.h @@ -158,7 +158,7 @@ extern int _mesa_program_debug; union YYSTYPE { -#line 126 "../../../src/mesa/program/program_parse.y" /* yacc.c:1909 */ +#line 126 "./program/program_parse.y" /* yacc.c:1909 */ struct asm_instruction *inst; struct asm_symbol *sym; diff --git a/lib/mesa/src/mesa/state_tracker/st_extensions.c b/lib/mesa/src/mesa/state_tracker/st_extensions.c index 12582c505..4c015a013 100644 --- a/lib/mesa/src/mesa/state_tracker/st_extensions.c +++ b/lib/mesa/src/mesa/state_tracker/st_extensions.c @@ -349,7 +349,7 @@ void st_init_limits(struct pipe_screen *screen, c->MaxGeometryTotalOutputComponents = screen->get_param(screen, PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS); c->MaxTessPatchComponents = - MAX2(screen->get_param(screen, PIPE_CAP_MAX_SHADER_PATCH_VARYINGS), + MIN2(screen->get_param(screen, PIPE_CAP_MAX_SHADER_PATCH_VARYINGS), MAX_VARYING) * 4; c->MinProgramTexelOffset = diff --git a/lib/mesa/src/mesa/vbo/vbo_save_api.c b/lib/mesa/src/mesa/vbo/vbo_save_api.c index f648ccc47..f8dab0cda 100644 --- a/lib/mesa/src/mesa/vbo/vbo_save_api.c +++ b/lib/mesa/src/mesa/vbo/vbo_save_api.c @@ -78,6 +78,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/api_arrayelt.h" #include "main/vtxfmt.h" #include "main/dispatch.h" +#include "main/state.h" #include "util/bitscan.h" #include "vbo_context.h" @@ -1159,6 +1160,9 @@ _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count) if (save->out_of_memory) return; + /* Make sure to process any VBO binding changes */ + _mesa_update_state(ctx); + _ae_map_vbos(ctx); vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_WEAK @@ -1202,6 +1206,9 @@ _save_OBE_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, if (save->out_of_memory) return; + /* Make sure to process any VBO binding changes */ + _mesa_update_state(ctx); + _ae_map_vbos(ctx); if (_mesa_is_bufferobj(indexbuf)) diff --git a/lib/mesa/src/vulkan/wsi/wsi_common.h b/lib/mesa/src/vulkan/wsi/wsi_common.h index a1f5a4018..394b8fa19 100644 --- a/lib/mesa/src/vulkan/wsi/wsi_common.h +++ b/lib/mesa/src/vulkan/wsi/wsi_common.h @@ -116,9 +116,27 @@ struct wsi_callbacks { return (__VkType)(uintptr_t) _obj; \ } -WSI_DEFINE_NONDISP_HANDLE_CASTS(_VkIcdSurfaceBase, VkSurfaceKHR) WSI_DEFINE_NONDISP_HANDLE_CASTS(wsi_swapchain, VkSwapchainKHR) +#define ICD_DEFINE_NONDISP_HANDLE_CASTS(__VkIcdType, __VkType) \ + \ + static inline __VkIcdType * \ + __VkIcdType ## _from_handle(__VkType _handle) \ + { \ + return (__VkIcdType *)(uintptr_t) _handle; \ + } \ + \ + static inline __VkType \ + __VkIcdType ## _to_handle(__VkIcdType *_obj) \ + { \ + return (__VkType)(uintptr_t) _obj; \ + } + +#define ICD_FROM_HANDLE(__VkIcdType, __name, __handle) \ + __VkIcdType *__name = __VkIcdType ## _from_handle(__handle) + +ICD_DEFINE_NONDISP_HANDLE_CASTS(VkIcdSurfaceBase, VkSurfaceKHR) + VkResult wsi_x11_init_wsi(struct wsi_device *wsi_device, const VkAllocationCallbacks *alloc); void wsi_x11_finish_wsi(struct wsi_device *wsi_device, diff --git a/lib/mesa/src/vulkan/wsi/wsi_common_wayland.c b/lib/mesa/src/vulkan/wsi/wsi_common_wayland.c index f6c218bde..d5ba15bfc 100644 --- a/lib/mesa/src/vulkan/wsi/wsi_common_wayland.c +++ b/lib/mesa/src/vulkan/wsi/wsi_common_wayland.c @@ -379,7 +379,8 @@ wsi_wl_surface_get_capabilities(VkIcdSurfaceBase *surface, caps->currentExtent = (VkExtent2D) { -1, -1 }; caps->minImageExtent = (VkExtent2D) { 1, 1 }; - caps->maxImageExtent = (VkExtent2D) { INT16_MAX, INT16_MAX }; + /* This is the maximum supported size on Intel */ + caps->maxImageExtent = (VkExtent2D) { 1 << 14, 1 << 14 }; caps->supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; caps->currentTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; caps->maxImageArrayLayers = 1; @@ -409,25 +410,27 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface, if (!display) return VK_ERROR_OUT_OF_HOST_MEMORY; - uint32_t count = u_vector_length(&display->formats); - if (pSurfaceFormats == NULL) { - *pSurfaceFormatCount = count; + *pSurfaceFormatCount = u_vector_length(&display->formats); return VK_SUCCESS; } - assert(*pSurfaceFormatCount >= count); - *pSurfaceFormatCount = count; - + uint32_t count = 0; VkFormat *f; u_vector_foreach(f, &display->formats) { - *(pSurfaceFormats++) = (VkSurfaceFormatKHR) { + if (count == *pSurfaceFormatCount) + return VK_INCOMPLETE; + + pSurfaceFormats[count++] = (VkSurfaceFormatKHR) { .format = *f, /* TODO: We should get this from the compositor somehow */ .colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR, }; } + assert(*pSurfaceFormatCount <= count); + *pSurfaceFormatCount = count; + return VK_SUCCESS; } @@ -441,11 +444,13 @@ wsi_wl_surface_get_present_modes(VkIcdSurfaceBase *surface, return VK_SUCCESS; } - assert(*pPresentModeCount >= ARRAY_SIZE(present_modes)); + *pPresentModeCount = MIN2(*pPresentModeCount, ARRAY_SIZE(present_modes)); typed_memcpy(pPresentModes, present_modes, *pPresentModeCount); - *pPresentModeCount = ARRAY_SIZE(present_modes); - return VK_SUCCESS; + if (*pPresentModeCount < ARRAY_SIZE(present_modes)) + return VK_INCOMPLETE; + else + return VK_SUCCESS; } VkResult wsi_create_wl_surface(const VkAllocationCallbacks *pAllocator, @@ -463,7 +468,7 @@ VkResult wsi_create_wl_surface(const VkAllocationCallbacks *pAllocator, surface->display = pCreateInfo->display; surface->surface = pCreateInfo->surface; - *pSurface = _VkIcdSurfaceBase_to_handle(&surface->base); + *pSurface = VkIcdSurfaceBase_to_handle(&surface->base); return VK_SUCCESS; } diff --git a/lib/mesa/src/vulkan/wsi/wsi_common_x11.c b/lib/mesa/src/vulkan/wsi/wsi_common_x11.c index 8e0043fdc..ae5ffed2d 100644 --- a/lib/mesa/src/vulkan/wsi/wsi_common_x11.c +++ b/lib/mesa/src/vulkan/wsi/wsi_common_x11.c @@ -261,8 +261,12 @@ VkBool32 wsi_get_physical_device_xcb_presentation_support( struct wsi_x11_connection *wsi_conn = wsi_x11_get_connection(wsi_device, alloc, connection); + if (!wsi_conn) + return false; + if (!wsi_conn->has_dri3) { - fprintf(stderr, "vulkan: No DRI3 support\n"); + fprintf(stderr, "vulkan: No DRI3 support detected - required for presentation\n"); + fprintf(stderr, "Note: Buggy applications may crash, if they do please report to vendor\n"); return false; } @@ -310,7 +314,8 @@ x11_surface_get_support(VkIcdSurfaceBase *icd_surface, return VK_ERROR_OUT_OF_HOST_MEMORY; if (!wsi_conn->has_dri3) { - fprintf(stderr, "vulkan: No DRI3 support\n"); + fprintf(stderr, "vulkan: No DRI3 support detected - required for presentation\n"); + fprintf(stderr, "Note: Buggy applications may crash, if they do please report to vendor\n"); *pSupported = false; return VK_SUCCESS; } @@ -349,6 +354,9 @@ x11_surface_get_capabilities(VkIcdSurfaceBase *icd_surface, xcb_visualtype_t *visual = get_visualtype_for_window(conn, window, &visual_depth); + if (!visual) + return VK_ERROR_SURFACE_LOST_KHR; + geom = xcb_get_geometry_reply(conn, geom_cookie, &err); if (geom) { VkExtent2D extent = { geom->width, geom->height }; @@ -362,7 +370,8 @@ x11_surface_get_capabilities(VkIcdSurfaceBase *icd_surface, */ caps->currentExtent = (VkExtent2D) { -1, -1 }; caps->minImageExtent = (VkExtent2D) { 1, 1 }; - caps->maxImageExtent = (VkExtent2D) { INT16_MAX, INT16_MAX }; + /* This is the maximum supported size on Intel */ + caps->maxImageExtent = (VkExtent2D) { 1 << 14, 1 << 14 }; } free(err); free(geom); @@ -447,7 +456,7 @@ VkResult wsi_create_xcb_surface(const VkAllocationCallbacks *pAllocator, surface->connection = pCreateInfo->connection; surface->window = pCreateInfo->window; - *pSurface = _VkIcdSurfaceBase_to_handle(&surface->base); + *pSurface = VkIcdSurfaceBase_to_handle(&surface->base); return VK_SUCCESS; } @@ -466,7 +475,7 @@ VkResult wsi_create_xlib_surface(const VkAllocationCallbacks *pAllocator, surface->dpy = pCreateInfo->dpy; surface->window = pCreateInfo->window; - *pSurface = _VkIcdSurfaceBase_to_handle(&surface->base); + *pSurface = VkIcdSurfaceBase_to_handle(&surface->base); return VK_SUCCESS; } |