This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <stdint.h> | |
//fnv1a 32 and 64 bit hash functions | |
// key is the data to hash, len is the size of the data (or how much of it to hash against) | |
// code license: public domain or equivalent | |
// post: https://notes.underscorediscovery.com/constexpr-fnv1a/ | |
inline const uint32_t hash_32_fnv1a(const void* key, const uint32_t len) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdatomic.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <stdbool.h> | |
typedef _Atomic(uint64_t) a64; | |
typedef _Atomic(uint32_t) a32; | |
#define atomicCompareExchange64(DESTPTR, COMPERAND, EXCHANGE) atomic_compare_exchange_weak(DESTPTR, COMPERAND, EXCHANGE) | |
#define atomicCompareExchange32(DESTPTR, COMPERAND, EXCHANGE) atomicCompareExchange64(DESTPTR, COMPERAND, EXCHANGE) | |
#define atomicLoad64(VALPTR) atomic_load(VALPTR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define HANDLE_SIZE 32 | |
#define HANDLE_GEN_BITS 8 | |
static const uint32_t handleIndexMask32 = (1 << (32 - HANDLE_GEN_BITS)) - 1; | |
static const uint32_t handleGenMask32 = ((1 << HANDLE_GEN_BITS) - 1); | |
static const uint32_t handleGenShift32 = (32 - HANDLE_GEN_BITS); | |
#define _handleIndex32(HANDLE) ((ui_u32)((HANDLE) & handleIndexMask32)) | |
#define handleGeneration32(HANDLE) ((ui_u8)(((HANDLE) >> handleGenShift32) & handleGenMask32)) | |
#define handleSameGeneration32(HANDLE, GENERATION) (((uint8_t)(((HANDLE) >> handleGenShift32) & handleGenShift32)) == (GENERATION % 255)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ... */ | |
#=== EXECUTABLE func | |
function(app app_name) | |
if(APPLE) | |
add_executable(${app_name} MACOSX_BUNDLE ${ARGN} ) | |
elseif(WIN32) | |
add_executable(${app_name} WIN32 ${ARGN}) | |
else() | |
add_executable(${app_name} ${ARGN}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------ | |
// triangle-emsc.c | |
// Vertex buffer, simple shader, pipeline state object. | |
//------------------------------------------------------------------------------ | |
#define SOKOL_IMPL | |
#define SOKOL_GLES2 | |
#include "sokol_gfx.h" | |
sg_draw_state draw_state; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------ | |
// triangle-emsc.c | |
// Vertex buffer, simple shader, pipeline state object. | |
//------------------------------------------------------------------------------ | |
#define SOKOL_IMPL | |
#define SOKOL_GLES2 | |
#include "sokol_gfx.h" | |
sg_draw_state draw_state; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://courses.cms.caltech.edu/cs179/ | |
http://www.amd.com/Documents/GCN_Architecture_whitepaper.pdf | |
https://community.arm.com/graphics/b/blog | |
http://cdn.imgtec.com/sdk-documentation/PowerVR+Hardware.Architecture+Overview+for+Developers.pdf | |
http://cdn.imgtec.com/sdk-documentation/PowerVR+Series5.Architecture+Guide+for+Developers.pdf | |
https://www.imgtec.com/blog/a-look-at-the-powervr-graphics-architecture-tile-based-rendering/ | |
https://www.imgtec.com/blog/the-dr-in-tbdr-deferred-rendering-in-rogue/ | |
http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/opencl-optimization-guide/#50401334_pgfId-412605 | |
https://fgiesen.wordpress.com/2011/07/09/a-trip-through-the-graphics-pipeline-2011-index/ | |
https://community.arm.com/graphics/b/documents/posts/moving-mobile-graphics#siggraph2015 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import('dart:io'); | |
final String PATH_TO_DARTSDK = "/Users/XYZ/dart-sdk"; | |
final String SUBDIRECTORY = ""; | |
final String LIBRARY_DARTFILE = "XYZ.dart"; | |