Code Monkey home page Code Monkey logo

Comments (5)

EvilTrev avatar EvilTrev commented on September 26, 2024

Here are the fixes:

g_caps.limits.maxTextureSize = m_device.supportsFamily( (MTLGPUFamily)1003 /* iOS_GPUFamily3_v1 */) ? 16384 : 8192;

g_caps.supported |= m_device.supportsFamily( (MTLGPUFamily)1003 /* MTLGPUFamily_iOS_GPUFamily3_v1 */)
	? BGFX_CAPS_DRAW_INDIRECT
	: 0
	;

g_caps.supported |= m_device.supportsFamily( (MTLGPUFamily)1004 /* MTLGPUFamily_iOS_GPUFamily4_v1 */)
	? BGFX_CAPS_TEXTURE_CUBE_ARRAY
	: 0
	;

g_caps.supported |= m_device.supportsFamily( (MTLGPUFamily)2002 /* MTLGPUFamily_macOS_GPUFamily1_v2 */)
	? BGFX_CAPS_DRAW_INDIRECT
	: 0
	;

if (m_macOS11Runtime
	|| [m_device supportsFamily:(MTLGPUFamily)1003 /*MTLGPUFamilyApple3*/]
	|| [m_device supportsFamily:(MTLGPUFamily)3002 /*MTLGPUFamilyCommon2*/])
	{
		const uint32_t cmpFunc = (_flags&BGFX_SAMPLER_COMPARE_MASK)>>BGFX_SAMPLER_COMPARE_SHIFT;
		m_samplerDescriptor.compareFunction = 0 == cmpFunc
			? MTLCompareFunctionNever
			: s_cmpFunc[cmpFunc]
			;
	}

from bgfx.

bkaradzic avatar bkaradzic commented on September 26, 2024

Good catch, Just submit PR with fixes.

from bgfx.

EvilTrev avatar EvilTrev commented on September 26, 2024

@bkaradzic my codebase isn't in a place where I can easily submit PRs unfortunately, so I'm just passing along the info for now :)

from bgfx.

bkaradzic avatar bkaradzic commented on September 26, 2024

Metal feature set tables
https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf

from bgfx.

fiserj avatar fiserj commented on September 26, 2024

@bkaradzic I think c43c447 and using the MTLGPUFamily enum values directly made the compilation fail on older versions of Xcode.

Would it make sense to add Xcode version detection like in MoltenVK (version macros defined here)?

from bgfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.