mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
removing D3D11, adding metal base
This commit is contained in:
16
Sources/Backends/Metal/Metal.h
git.filemode.normal_file
16
Sources/Backends/Metal/Metal.h
git.filemode.normal_file
@@ -0,0 +1,16 @@
|
||||
// Copyright (C) 2024 kanel
|
||||
// This file is part of "Pulse"
|
||||
// For conditions of distribution and use, see copyright notice in LICENSE
|
||||
|
||||
#include <Pulse.h>
|
||||
|
||||
#ifdef PULSE_ENABLE_METAL_BACKEND
|
||||
|
||||
#ifndef PULSE_METAL_H_
|
||||
#define PULSE_METAL_H_
|
||||
|
||||
PulseBackendFlags MetalCheckSupport(PulseBackendFlags candidates, PulseShaderFormatsFlags shader_formats_used); // Return PULSE_BACKEND_METAL in case of success and PULSE_BACKEND_INVALID otherwise
|
||||
|
||||
#endif // PULSE_METAL_H_
|
||||
|
||||
#endif // PULSE_ENABLE_METAL_BACKEND
|
||||
26
Sources/Backends/Metal/Metal.m
git.filemode.normal_file
26
Sources/Backends/Metal/Metal.m
git.filemode.normal_file
@@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2024 kanel
|
||||
// This file is part of "Pulse"
|
||||
// For conditions of distribution and use, see copyright notice in LICENSE
|
||||
|
||||
#include <Pulse.h>
|
||||
#include "../../PulseInternal.h"
|
||||
|
||||
#include "Metal.h"
|
||||
|
||||
PulseBackendFlags MetalCheckSupport(PulseBackendFlags candidates, PulseShaderFormatsFlags shader_formats_used)
|
||||
{
|
||||
if(candidates != PULSE_BACKEND_ANY && (candidates & PULSE_BACKEND_METAL) == 0)
|
||||
return PULSE_BACKEND_INVALID;
|
||||
if((shader_formats_used & PULSE_SHADER_FORMAT_MSL_BIT) == 0 && (shader_formats_used & PULSE_SHADER_FORMAT_METALLIB_BIT) == 0)
|
||||
return PULSE_BACKEND_INVALID;
|
||||
return PULSE_BACKEND_INVALID; // Not supported yet
|
||||
}
|
||||
|
||||
PulseBackendHandler MetalDriver = {
|
||||
.PFN_LoadBackend = PULSE_NULLPTR,
|
||||
.PFN_UnloadBackend = PULSE_NULLPTR,
|
||||
.PFN_CreateDevice = PULSE_NULLPTR,
|
||||
.backend = PULSE_BACKEND_METAL,
|
||||
.supported_shader_formats = PULSE_SHADER_FORMAT_MSL_BIT | PULSE_SHADER_FORMAT_METALLIB_BIT,
|
||||
.driver_data = PULSE_NULLPTR
|
||||
};
|
||||
Reference in New Issue
Block a user