RetroArch
Classes | Macros | Typedefs | Functions | Variables
metal_common.m File Reference
#import <Foundation/Foundation.h>
#import "metal_common.h"
#import "../../ui/drivers/cocoa/cocoa_common_metal.h"
#import <memory.h>
#import <gfx/video_frame.h>
#import <Metal/Metal.h>
#import <QuartzCore/QuartzCore.h>
#import <stddef.h>
#include <simd/simd.h>
#import "Context.h"
Include dependency graph for metal_common.m:

Classes

struct  float4_t
 
struct  texture
 

Macros

#define STRUCT_ASSIGN(x, y)
 
#define MTLALIGN(x)   __attribute__((aligned(x)))
 
#define FMT2(x, y)   case SLANG_FORMAT_##x: return MTLPixelFormat##y
 

Typedefs

typedef struct texture texture_t
 

Functions

struct MTLALIGN (16)
 
MTLPixelFormat glslang_format_to_metal (glslang_format fmt)
 
MTLPixelFormat SelectOptimalPixelFormat (MTLPixelFormat fmt)
 

Variables

MetalMenu_menu
 
Overlay_overlay
 
video_info_t _video
 
id< MTLDevice > _device
 
id< MTLLibrary > _library
 
Context_context
 
CAMetalLayer * _layer
 
id< MTLRenderPipelineState > _t_pipelineState
 
id< MTLRenderPipelineState > _t_pipelineStateNoAlpha
 
id< MTLSamplerState > _samplerStateLinear
 
id< MTLSamplerState > _samplerStateNearest
 
Uniforms _uniforms
 
Uniforms _viewportMVP
 
TexturedView_view
 
bool _enabled
 
 engine_t
 
id< MTLTexture > _texture
 
Vertex _v [4]
 
VertexSlang _vertex [4]
 
CGSize _size
 
CGRect _frame
 
NSUInteger _bpp
 
id< MTLTexture > _src
 
bool _srcDirty
 
id< MTLSamplerState > _samplers [RARCH_FILTER_MAX][RARCH_WRAP_MAX]
 
struct video_shader_shader
 
engine_t _engine
 
bool resize_render_targets
 
bool init_history
 
video_viewport_t_viewport
 
NSMutableArray< id< MTLTexture > > * _images
 
id< MTLBuffer > _vert
 
bool _vertDirty
 

Macro Definition Documentation

◆ FMT2

#define FMT2 (   x,
  y 
)    case SLANG_FORMAT_##x: return MTLPixelFormat##y

◆ MTLALIGN

#define MTLALIGN (   x)    __attribute__((aligned(x)))

◆ STRUCT_ASSIGN

#define STRUCT_ASSIGN (   x,
  y 
)
Value:
{ \
NSObject * __y = y; \
if (x != nil) { \
NSObject * __foo = (__bridge_transfer NSObject *)(__bridge void *)(x); \
__foo = nil; \
x = (__bridge __typeof__(x))nil; \
} \
if (__y != nil) \
x = (__bridge __typeof__(x))(__bridge_retained void *)((NSObject *)__y); \
}
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
GLint GLint GLint GLint GLint x
Definition: glext.h:6295

Typedef Documentation

◆ texture_t

typedef struct texture texture_t

Function Documentation

◆ glslang_format_to_metal()

MTLPixelFormat glslang_format_to_metal ( glslang_format  fmt)
Here is the caller graph for this function:

◆ MTLALIGN()

struct MTLALIGN ( 16  )

◆ SelectOptimalPixelFormat()

MTLPixelFormat SelectOptimalPixelFormat ( MTLPixelFormat  fmt)
Here is the caller graph for this function:

Variable Documentation

◆ _bpp

NSUInteger _bpp

◆ _context

Context* _context

◆ _device

id<MTLDevice> _device

◆ _enabled

bool _enabled

◆ _engine

engine_t _engine

◆ _frame

CGRect _frame

◆ _images

NSMutableArray<id<MTLTexture> >* _images
Initial value:
{
Context * _context
Definition: metal_common.m:63
Context contains the render state used by various components.
Definition: Context.h:26

◆ _layer

CAMetalLayer* _layer

◆ _library

id<MTLLibrary> _library

◆ _menu

MetalMenu* _menu
Initial value:
{
FrameView *_frameView
Definition: metal_common.h:29

◆ _overlay

Overlay* _overlay

◆ _samplers

id<MTLSamplerState> _samplers[RARCH_FILTER_MAX][RARCH_WRAP_MAX]

◆ _samplerStateLinear

id<MTLSamplerState> _samplerStateLinear

◆ _samplerStateNearest

id<MTLSamplerState> _samplerStateNearest

◆ _shader

struct video_shader* _shader

◆ _size

CGSize _size

◆ _src

id<MTLTexture> _src

◆ _srcDirty

bool _srcDirty

◆ _t_pipelineState

id<MTLRenderPipelineState> _t_pipelineState

◆ _t_pipelineStateNoAlpha

id<MTLRenderPipelineState> _t_pipelineStateNoAlpha

◆ _texture

id<MTLTexture> _texture
Initial value:
{
Context * _context
Definition: metal_common.m:63
Context contains the render state used by various components.
Definition: Context.h:26

◆ _uniforms

Uniforms _uniforms

◆ _v

Vertex _v[4]

◆ _vert

id<MTLBuffer> _vert

◆ _vertDirty

bool _vertDirty

◆ _vertex

VertexSlang _vertex[4]

◆ _video

video_info_t _video

◆ _view

TexturedView* _view
Initial value:
{
Context * _context
Definition: metal_common.m:63
Context contains the render state used by various components.
Definition: Context.h:26

◆ _viewport

video_viewport_t* _viewport

◆ _viewportMVP

Uniforms _viewportMVP

◆ engine_t

engine_t

◆ init_history

bool init_history

◆ resize_render_targets

bool resize_render_targets