Commit e12c3966 authored by Jordi Mallach's avatar Jordi Mallach 🐗

New upstream version 0.196+dfsg.1

parent e8a2552c

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -57,7 +57,12 @@
# include "asio/detail/old_win_sdk_compat.hpp"
#else
# include <sys/ioctl.h>
# if !defined(__SYMBIAN32__)
# if (defined(__MACH__) && defined(__APPLE__)) \
|| defined(__FreeBSD__) || defined(__NetBSD__) \
|| defined(__OpenBSD__) || defined(__linux__) \
|| defined(__EMSCRIPTEN__)
# include <poll.h>
# elif !defined(__SYMBIAN32__)
# include <sys/poll.h>
# endif
# include <sys/types.h>
......
shallow_clone: true
os:
- Visual Studio 2015
- Visual Studio 2017
environment:
matrix:
- TOOLSET: vs2013
- TOOLSET: vs2015
- TOOLSET: vs2017
configuration:
- Debug
- Release
install:
- git clone https://github.com/bkaradzic/bx ..\bx
- ..\bx\tools\bin\windows\genie --with-tools %TOOLSET%
- git clone --depth 1 https://github.com/bkaradzic/bx ..\bx
- git clone --depth 1 https://github.com/bkaradzic/bimg ..\bimg
- ..\bx\tools\bin\windows\genie --with-tools --with-examples %TOOLSET%
build:
project: .build/projects/$(TOOLSET)/bgfx.sln
......@@ -16,7 +16,8 @@ addons:
- clang
before_script:
git clone https://github.com/bkaradzic/bx ../bx
- git clone --depth 1 https://github.com/bkaradzic/bx ../bx
- git clone --depth 1 https://github.com/bkaradzic/bimg ../bimg
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then make build CXX="g++-4.8" CC="gcc-4.8"; fi
......
......@@ -1345,6 +1345,17 @@ inline void MemcpySubresource(
}
}
namespace MinGW_Workaround
{
inline D3D12_RESOURCE_DESC ID3D12ResourceGetDesc(ID3D12Resource* _resource)
{
typedef void (STDMETHODCALLTYPE ID3D12Resource::*PFN_GET_GET_DESC)(D3D12_RESOURCE_DESC*);
D3D12_RESOURCE_DESC desc;
(_resource->*(PFN_GET_GET_DESC)(&ID3D12Resource::GetDesc))(&desc);
return desc;
}
}
//------------------------------------------------------------------------------------------------
// Returns required size of a buffer to be used for data upload
inline UINT64 GetRequiredIntermediateSize(
......@@ -1352,7 +1363,7 @@ inline UINT64 GetRequiredIntermediateSize(
_In_range_(0,D3D12_REQ_SUBRESOURCES) UINT FirstSubresource,
_In_range_(0,D3D12_REQ_SUBRESOURCES-FirstSubresource) UINT NumSubresources)
{
D3D12_RESOURCE_DESC Desc = pDestinationResource->GetDesc();
D3D12_RESOURCE_DESC Desc = MinGW_Workaround::ID3D12ResourceGetDesc(pDestinationResource);
UINT64 RequiredSize = 0;
ID3D12Device* pDevice;
......@@ -1378,8 +1389,8 @@ inline UINT64 UpdateSubresources(
_In_reads_(NumSubresources) const D3D12_SUBRESOURCE_DATA* pSrcData)
{
// Minor validation
D3D12_RESOURCE_DESC IntermediateDesc = pIntermediate->GetDesc();
D3D12_RESOURCE_DESC DestinationDesc = pDestinationResource->GetDesc();
D3D12_RESOURCE_DESC IntermediateDesc = MinGW_Workaround::ID3D12ResourceGetDesc(pIntermediate);
D3D12_RESOURCE_DESC DestinationDesc = MinGW_Workaround::ID3D12ResourceGetDesc(pDestinationResource);
if (IntermediateDesc.Dimension != D3D12_RESOURCE_DIMENSION_BUFFER ||
IntermediateDesc.Width < RequiredSize + pLayouts[0].Offset ||
RequiredSize > (SIZE_T)-1 ||
......@@ -1448,7 +1459,7 @@ inline UINT64 UpdateSubresources(
UINT64* pRowSizesInBytes = reinterpret_cast<UINT64*>(pLayouts + NumSubresources);
UINT* pNumRows = reinterpret_cast<UINT*>(pRowSizesInBytes + NumSubresources);
D3D12_RESOURCE_DESC Desc = pDestinationResource->GetDesc();
D3D12_RESOURCE_DESC Desc = MinGW_Workaround::ID3D12ResourceGetDesc(pDestinationResource);
ID3D12Device* pDevice;
pDestinationResource->GetDevice(__uuidof(ID3D12Device), reinterpret_cast<void**>(&pDevice));
pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, pLayouts, pNumRows, pRowSizesInBytes, &RequiredSize);
......@@ -1476,7 +1487,7 @@ inline UINT64 UpdateSubresources(
UINT NumRows[MaxSubresources];
UINT64 RowSizesInBytes[MaxSubresources];
D3D12_RESOURCE_DESC Desc = pDestinationResource->GetDesc();
D3D12_RESOURCE_DESC Desc = MinGW_Workaround::ID3D12ResourceGetDesc(pDestinationResource);
ID3D12Device* pDevice;
pDestinationResource->GetDevice(__uuidof(*pDevice), reinterpret_cast<void**>(&pDevice));
pDevice->GetCopyableFootprints(&Desc, FirstSubresource, NumSubresources, IntermediateOffset, Layouts, NumRows, RowSizesInBytes, &RequiredSize);
......
......@@ -73,10 +73,8 @@
// BK - STFU!
# pragma GCC diagnostic ignored "-Wunknown-pragmas" // for clang to disable GCC pragmas
# pragma GCC diagnostic ignored "-Wpragmas" // for GCC to disable clang pragmas
# pragma GCC diagnostic ignored "-Wformat="
# pragma GCC diagnostic ignored "-Wformat-extra-args"
# pragma GCC diagnostic ignored "-Wignored-qualifiers"
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
# pragma GCC diagnostic ignored "-Wreorder"
# pragma GCC diagnostic ignored "-Woverloaded-virtual"
......@@ -85,6 +83,13 @@
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Wunused-private-field"
# pragma GCC diagnostic ignored "-Wunused-variable"
# pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
# if !defined(__clang__)
# pragma GCC diagnostic ignored "-Wformat="
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
# endif
#endif
......
......@@ -161,6 +161,9 @@ lod_exists_in_stage(const _mesa_glsl_parse_state *state)
*/
return state->stage == MESA_SHADER_VERTEX ||
state->is_version(130, 300) ||
state->EXT_texture_array_enable || /* BK - don't complain about texture array in fragment shaders. */
state->OES_texture_3D_enable || /* BK - shut up */
state->EXT_shader_texture_lod_enable || /* BK - pretend it's ok too */
state->ARB_shader_texture_lod_enable;
}
......
......@@ -568,9 +568,9 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(EXT_separate_shader_objects, false, true, dummy_true),
EXT(EXT_shader_framebuffer_fetch, false, true, EXT_shader_framebuffer_fetch),
EXT(EXT_shader_integer_mix, true, true, EXT_shader_integer_mix),
EXT(EXT_shader_texture_lod, false, true, ARB_shader_texture_lod),
EXT(EXT_shader_texture_lod, true, true, ARB_shader_texture_lod), // BK - made it available in GLSL
EXT(EXT_shadow_samplers, false, true, EXT_shadow_samplers),
EXT(EXT_texture_array, true, false, EXT_texture_array),
EXT(EXT_texture_array, true, true, EXT_texture_array), // BK - made it available in ESSL
};
#undef EXT
......
......@@ -7,7 +7,7 @@ version: "{build}"
os: Visual Studio 2013
platform:
- Any CPU
- x64
configuration:
- Debug
......@@ -17,6 +17,13 @@ branches:
only:
- master
# Travis advances the master-tot tag to current top of the tree after
# each push into the master branch, because it relies on that tag to
# upload build artifacts to the master-tot release. This will cause
# double testing for each push on Appveyor: one for the push, one for
# the tag advance. Disable testing tags.
skip_tags: true
clone_depth: 5
matrix:
......@@ -25,6 +32,7 @@ matrix:
# scripts that run after cloning repository
install:
- git clone https://github.com/google/googletest.git External/googletest
- C:/Python27/python.exe update_glslang_sources.py
build:
parallel: true # enable MSBuild parallel builds
......@@ -38,3 +46,45 @@ build_script:
test_script:
- ctest -C %CONFIGURATION% --output-on-failure
- cd ../Test && bash runtests
- cd ../build
after_test:
# For debug build, the generated dll has a postfix "d" in its name.
- ps: >-
If ($env:configuration -Match "Debug") {
$env:SUFFIX="d"
} Else {
$env:SUFFIX=""
}
- cd install
# Zip all glslang artifacts for uploading and deploying
- 7z a glslang-master-windows-"%PLATFORM%"-"%CONFIGURATION%".zip
bin\glslangValidator.exe
include\glslang\*
include\SPIRV\*
lib\glslang%SUFFIX%.lib
lib\HLSL%SUFFIX%.lib
lib\OGLCompiler%SUFFIX%.lib
lib\OSDependent%SUFFIX%.lib
lib\SPIRV%SUFFIX%.lib
lib\SPVRemapper%SUFFIX%.lib
lib\SPIRV-Tools%SUFFIX%.lib
lib\SPIRV-Tools-opt%SUFFIX%.lib
artifacts:
- path: build\install\*.zip
name: artifacts-zip
deploy: