This commit is contained in:
Chuck Walbourn 2024-01-16 15:16:06 -08:00 коммит произвёл GitHub
Родитель 36d76d01c5
Коммит 3bd4d3601e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 111 добавлений и 5 удалений

Просмотреть файл

@ -22,9 +22,9 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/CMake")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
if(DEFINED VCPKG_TARGET_ARCHITECTURE)
set(DIRECTX_ARCH ${VCPKG_TARGET_ARCHITECTURE})
@ -36,6 +36,14 @@ elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$")
set(DIRECTX_ARCH arm)
elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$")
set(DIRECTX_ARCH arm64)
elseif(CMAKE_VS_PLATFORM_NAME_DEFAULT MATCHES "^[Ww][Ii][Nn]32$")
set(DIRECTX_ARCH x86)
elseif(CMAKE_VS_PLATFORM_NAME_DEFAULT MATCHES "^[Xx]64$")
set(DIRECTX_ARCH x64)
elseif(CMAKE_VS_PLATFORM_NAME_DEFAULT MATCHES "^[Aa][Rr][Mm]$")
set(DIRECTX_ARCH arm)
elseif(CMAKE_VS_PLATFORM_NAME_DEFAULT MATCHES "^[Aa][Rr][Mm]64$")
set(DIRECTX_ARCH arm64)
endif()
include(GNUInstallDirs)

Просмотреть файл

@ -1310,7 +1310,7 @@ HRESULT CEffect::BindToDevice(ID3D11Device *pDevice, LPCSTR srcName)
{
if( m_pVariables[i].pType->IsClassInstance() )
{
for (uint32_t j = 0; j < std::max<size_t>(m_pVariables[i].pType->Elements,1); ++j)
for (size_t j = 0; j < std::max<size_t>(m_pVariables[i].pType->Elements,1); ++j)
{
assert( CurMemberData < m_MemberDataCount );
ID3D11ClassInstance** ppCI = &(m_pVariables[i].pMemberData + j)->Data.pD3DClassInstance;
@ -1319,7 +1319,7 @@ HRESULT CEffect::BindToDevice(ID3D11Device *pDevice, LPCSTR srcName)
if( m_pVariables[i].pType->TotalSize > 0 )
{
// ignore failures in GetClassInstance;
m_pClassLinkage->GetClassInstance( m_pVariables[i].pName, j, ppCI );
m_pClassLinkage->GetClassInstance( m_pVariables[i].pName, static_cast<UINT>(j), ppCI );
}
else
{

98
build/FX11-SDL.yml Normal file
Просмотреть файл

@ -0,0 +1,98 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=271568
# Runs various SDL recommended tools on the code.
schedules:
- cron: "0 3 * * 0,3,5"
displayName: 'Three times a week'
branches:
include:
- main
trigger: none
pr: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
VS_GENERATOR: 'Visual Studio 17 2022'
pool:
vmImage: windows-2022
jobs:
- job: SDL_BUILD
displayName: 'Build using required SDL tools'
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchTags: false
- task: NodeTool@0
displayName: 'NPM install'
inputs:
versionSpec: 14.x
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: 'Run Credential Scanner'
inputs:
debugMode: false
folderSuppression: false
- task: PoliCheck@2
displayName: 'Run PoliCheck'
inputs:
result: PoliCheck.xml
- task: Armory@2
displayName: Run ARMory
- task: CMake@1
displayName: 'CMake (MSVC): Config x64'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON'
- task: CodeQL3000Init@0
inputs:
Enabled: true
- task: VSBuild@1
displayName: 'Build C++ with CodeQL'
inputs:
solution: '$(Build.SourcesDirectory)/out/Effects11.sln'
vsVersion: 17.0
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: CodeQL3000Finalize@0
condition: always()
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out -v --config RelWithDebInfo
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4
displayName: 'Run AntiMalware'
inputs:
InputType: 'Basic'
ScanType: 'CustomScan'
FileDirPath: $(Agent.BuildDirectory)
EnableSERVICEs: true
SupportLogOnError: false
TreatSignatureUpdateFailureAs: 'Warning'
SignatureFreshness: 'OneDay'
TreatStaleSignatureAs: 'Error'
condition: always()
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
displayName: 'Post Analysis'
inputs:
GdnBreakAllTools: true
GdnBreakPolicy: 'Microsoft'
GdnBreakPolicyMinSev: 'Error'
- task: ComponentGovernanceComponentDetection@0
displayName: Component Detection