updating to latest VEFontCache... tested 10k draw call target (worked)
This commit is contained in:
@ -90,6 +90,7 @@ startup :: proc( prof : ^SpallProfiler, persistent_mem, frame_mem, transient_mem
|
||||
push( policy_ptr, SlabSizeClass { 64 * Megabyte, 64 * Megabyte, alignment })
|
||||
push( policy_ptr, SlabSizeClass { 128 * Megabyte, 128 * Megabyte, alignment })
|
||||
push( policy_ptr, SlabSizeClass { 256 * Megabyte, 256 * Megabyte, alignment })
|
||||
push( policy_ptr, SlabSizeClass { 512 * Megabyte, 512 * Megabyte, alignment })
|
||||
// Anything above 128 meg needs to have its own setup looked into.
|
||||
|
||||
alloc_error : AllocatorError
|
||||
@ -355,19 +356,21 @@ startup :: proc( prof : ^SpallProfiler, persistent_mem, frame_mem, transient_mem
|
||||
// }
|
||||
|
||||
// Setup workspace UI state
|
||||
ui_startup( & workspace.ui, cache_table_size = 8 * Kilo, cache_allocator = persistent_slab_allocator() )
|
||||
ui_startup( & workspace.ui, cache_table_size = 64 * Kilo, cache_allocator = persistent_slab_allocator() )
|
||||
}
|
||||
|
||||
// debug.path_lorem = str_fmt("C:/projects/SectrPrototype/examples/Lorem Ipsum (197).txt", allocator = persistent_slab_allocator())
|
||||
// debug.path_lorem = str_fmt("C:/projects/SectrPrototype/examples/Lorem Ipsum (1022).txt", allocator = persistent_slab_allocator())
|
||||
// debug.path_lorem = str_fmt("C:/projects/SectrPrototype/examples/ve_fontcache.h", allocator = persistent_slab_allocator())
|
||||
debug.path_lorem = str_fmt("C:/projects/SectrPrototype/examples/sokol_gp.h", allocator = persistent_slab_allocator())
|
||||
// debug.path_lorem = str_fmt("C:/projects/SectrPrototype/examples/sokol_gp.h", allocator = persistent_slab_allocator())
|
||||
// debug.path_lorem = str_fmt("C:/projects/SectrPrototype/examples/sokol_gl.h", allocator = persistent_slab_allocator())
|
||||
debug.path_lorem = str_fmt("C:\\projects\\SectrPrototype\\examples\\gencpp_singleheader.hpp", allocator = persistent_slab_allocator())
|
||||
|
||||
alloc_error : AllocatorError; success : bool
|
||||
debug.lorem_content, success = os.read_entire_file( debug.path_lorem, persistent_slab_allocator() )
|
||||
debug.lorem_content, success = os.read_entire_file( debug.path_lorem, persistent_allocator() )
|
||||
assert(success)
|
||||
|
||||
debug.lorem_parse, alloc_error = pws_parser_parse( transmute(string) debug.lorem_content, persistent_slab_allocator() )
|
||||
debug.lorem_parse, alloc_error = pws_parser_parse( transmute(string) debug.lorem_content, persistent_allocator() )
|
||||
verify( alloc_error == .None, "Faield to parse due to allocation failure" )
|
||||
|
||||
// Render texture test
|
||||
|
@ -67,14 +67,14 @@ font_provider_setup_sokol_gfx_objects :: proc( ctx : ^VE_RenderData, ve_ctx : ve
|
||||
screen_shader = sokol_gfx.make_shader(ve_draw_text_shader_desc(backend) )
|
||||
|
||||
draw_list_vbuf = sokol_gfx.make_buffer( BufferDesciption {
|
||||
size = size_of([4]f32) * 2 * Mega,
|
||||
size = size_of([4]f32) * 4 * Mega,
|
||||
usage = BufferUsage.STREAM,
|
||||
type = BufferType.VERTEXBUFFER,
|
||||
})
|
||||
verify( sokol_gfx.query_buffer_state( draw_list_vbuf) < ResourceState.FAILED, "Failed to make draw_list_vbuf" )
|
||||
|
||||
draw_list_ibuf = sokol_gfx.make_buffer( BufferDesciption {
|
||||
size = size_of(u32) * 3 * Mega,
|
||||
size = size_of(u32) * 6 * Mega,
|
||||
usage = BufferUsage.STREAM,
|
||||
type = BufferType.INDEXBUFFER,
|
||||
})
|
||||
|
@ -190,13 +190,13 @@ test_whitespace_ast :: proc( default_layout : ^UI_Layout, frame_style_default :
|
||||
// index := 0
|
||||
widgets : Array(UI_Widget)
|
||||
// widgets, alloc_error = array_init_reserve( UI_Widget, frame_slab_allocator(), 8 )
|
||||
widgets, alloc_error = make( Array(UI_Widget), 8 * Kilobyte )
|
||||
widgets, alloc_error = make( Array(UI_Widget), 64 * Kilobyte )
|
||||
widgets_ptr := & widgets
|
||||
|
||||
label_id := 0
|
||||
|
||||
builder : StringBuilder
|
||||
str.builder_init_len_cap( & builder, len = 0, cap = 16 * Kilobyte )
|
||||
str.builder_init_len_cap( & builder, len = 0, cap = 64 * Kilobyte )
|
||||
|
||||
line_id := 0
|
||||
for line in array_to_slice( debug.lorem_parse.lines )
|
||||
|
Reference in New Issue
Block a user