Geometry Nodes: expose simulation bake path in UI #108220
|
@ -26,12 +26,20 @@ class HdCyclesVolumeLoader : public VDBImageLoader {
|
|||
HdCyclesVolumeLoader(const std::string &filePath, const std::string &gridName)
|
||||
: VDBImageLoader(gridName)
|
||||
{
|
||||
/* Disable delay loading and file copying, this has poor performance on network drivers. */
|
||||
/* Disable delay loading and file copying, this has poor performance on network drives. */
|
||||
const bool delay_load = false;
|
||||
openvdb::io::File file(filePath);
|
||||
file.setCopyMaxBytes(0);
|
||||
if (file.open(delay_load)) {
|
||||
grid = file.readGrid(gridName);
|
||||
try {
|
||||
openvdb::io::File file(filePath);
|
||||
file.setCopyMaxBytes(0);
|
||||
if (file.open(delay_load)) {
|
||||
grid = file.readGrid(gridName);
|
||||
}
|
||||
}
|
||||
catch (const openvdb::IoError &e) {
|
||||
VLOG_WARNING << "Error loading OpenVDB file: " << e.what();
|
||||
}
|
||||
catch (...) {
|
||||
VLOG_WARNING << "Error loading OpenVDB file: Unknown error";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -72,6 +72,9 @@ struct ToNanoOp {
|
|||
catch (const std::exception &e) {
|
||||
VLOG_WARNING << "Error converting OpenVDB to NanoVDB grid: " << e.what();
|
||||
}
|
||||
catch (...) {
|
||||
VLOG_WARNING << "Error converting OpenVDB to NanoVDB grid: Unknown error";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1651,7 +1651,7 @@ class SEQUENCER_PT_source(SequencerButtonsPanel, Panel):
|
|||
col = col.column(align=True)
|
||||
split = col.split(factor=0.5, align=False)
|
||||
split.alignment = 'RIGHT'
|
||||
split.label(text="Samplerate")
|
||||
split.label(text="Sample Rate")
|
||||
split.alignment = 'LEFT'
|
||||
if sound.samplerate <= 0:
|
||||
split.label(text="Unknown")
|
||||
|
|
|
@ -1346,14 +1346,18 @@ void BKE_libblock_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int ori
|
|||
ID *new_id = *r_newid;
|
||||
int flag = orig_flag;
|
||||
|
||||
const bool is_private_id_data = (id->flag & LIB_EMBEDDED_DATA) != 0;
|
||||
const bool is_embedded_id = (id->flag & LIB_EMBEDDED_DATA) != 0;
|
||||
|
||||
BLI_assert((flag & LIB_ID_CREATE_NO_MAIN) != 0 || bmain != NULL);
|
||||
BLI_assert((flag & LIB_ID_CREATE_NO_MAIN) != 0 || (flag & LIB_ID_CREATE_NO_ALLOCATE) == 0);
|
||||
BLI_assert((flag & LIB_ID_CREATE_NO_MAIN) != 0 || (flag & LIB_ID_CREATE_LOCAL) == 0);
|
||||
|
||||
/* 'Private ID' data handling. */
|
||||
if ((bmain != NULL) && is_private_id_data) {
|
||||
/* Embedded ID handling.
|
||||
*
|
||||
* NOTE: This makes copying code of embedded IDs non-reentrant (i.e. copying an embedded ID as
|
||||
* part of another embedded ID would not work properly). This is not an issue currently, but may
|
||||
* need to be addressed in the future. */
|
||||
if ((bmain != NULL) && is_embedded_id) {
|
||||
flag |= LIB_ID_CREATE_NO_MAIN;
|
||||
}
|
||||
|
||||
|
@ -1391,6 +1395,11 @@ void BKE_libblock_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int ori
|
|||
|
||||
new_id->flag = (new_id->flag & ~copy_idflag_mask) | (id->flag & copy_idflag_mask);
|
||||
|
||||
/* 'Private ID' data handling. */
|
||||
if (is_embedded_id && (orig_flag & LIB_ID_CREATE_NO_MAIN) == 0) {
|
||||
new_id->tag &= ~LIB_TAG_NO_MAIN;
|
||||
}
|
||||
|
||||
/* We do not want any handling of user-count in code duplicating the data here, we do that all
|
||||
* at once in id_copy_libmanagement_cb() at the end. */
|
||||
const int copy_data_flag = orig_flag | LIB_ID_CREATE_NO_USER_REFCOUNT;
|
||||
|
|
|
@ -2667,8 +2667,8 @@ static bool lib_override_library_main_resync_id_skip_check(ID *id,
|
|||
/**
|
||||
* Clear 'unreachable' tag of existing liboverrides if they are using another reachable liboverride
|
||||
* (typical case: Mesh object which only relationship to the rest of the liboverride hierarchy is
|
||||
* though its 'parent' pointer (i.e. rest of the hierarchy has no actual relationship to this mesh
|
||||
* object). Sadge.
|
||||
* through its 'parent' pointer (i.e. rest of the hierarchy has no actual relationship to this mesh
|
||||
* object).
|
||||
*
|
||||
* Logic and rational of this function are very similar to these of
|
||||
* #lib_override_hierarchy_dependencies_recursive_tag_from, but withing specific resync context.
|
||||
|
@ -4440,10 +4440,20 @@ void BKE_lib_override_library_main_unused_cleanup(Main *bmain)
|
|||
|
||||
static void lib_override_id_swap(Main *bmain, ID *id_local, ID *id_temp)
|
||||
{
|
||||
/* Ensure ViewLayers are in sync in case a Scene is being swapped, and prevent any further resync
|
||||
* during the swapping itself. */
|
||||
if (GS(id_local->name) == ID_SCE) {
|
||||
BKE_scene_view_layers_synced_ensure(reinterpret_cast<Scene *>(id_local));
|
||||
BKE_scene_view_layers_synced_ensure(reinterpret_cast<Scene *>(id_temp));
|
||||
}
|
||||
BKE_layer_collection_resync_forbid();
|
||||
|
||||
BKE_lib_id_swap(bmain, id_local, id_temp, true, 0);
|
||||
/* We need to keep these tags from temp ID into orig one.
|
||||
* ID swap does not swap most of ID data itself. */
|
||||
id_local->tag |= (id_temp->tag & LIB_TAG_LIBOVERRIDE_NEED_RESYNC);
|
||||
|
||||
BKE_layer_collection_resync_allow();
|
||||
}
|
||||
|
||||
void BKE_lib_override_library_update(Main *bmain, ID *local)
|
||||
|
|
|
@ -1236,6 +1236,7 @@ void strip_loose_polysloops(Mesh *me, blender::BitSpan polys_to_remove)
|
|||
|
||||
if (size >= 3 && !invalid) {
|
||||
if (a != b) {
|
||||
poly_offsets[b] = poly_offsets[a];
|
||||
CustomData_copy_data(&me->pdata, &me->pdata, a, b, 1);
|
||||
}
|
||||
b++;
|
||||
|
|
|
@ -335,6 +335,9 @@ struct VolumeGrid {
|
|||
catch (const openvdb::IoError &e) {
|
||||
entry->error_msg = e.what();
|
||||
}
|
||||
catch (...) {
|
||||
entry->error_msg = "Unknown error reading VDB file";
|
||||
}
|
||||
});
|
||||
|
||||
std::atomic_thread_fence(std::memory_order_release);
|
||||
|
@ -879,7 +882,7 @@ bool BKE_volume_load(const Volume *volume, const Main *bmain)
|
|||
|
||||
try {
|
||||
/* Disable delay loading and file copying, this has poor performance
|
||||
* on network drivers. */
|
||||
* on network drives. */
|
||||
const bool delay_load = false;
|
||||
file.setCopyMaxBytes(0);
|
||||
file.open(delay_load);
|
||||
|
@ -890,6 +893,10 @@ bool BKE_volume_load(const Volume *volume, const Main *bmain)
|
|||
grids.error_msg = e.what();
|
||||
CLOG_INFO(&LOG, 1, "Volume %s: %s", volume_name, grids.error_msg.c_str());
|
||||
}
|
||||
catch (...) {
|
||||
grids.error_msg = "Unknown error reading VDB file";
|
||||
CLOG_INFO(&LOG, 1, "Volume %s: %s", volume_name, grids.error_msg.c_str());
|
||||
}
|
||||
|
||||
/* Add grids read from file to own vector, filtering out any NULL pointers. */
|
||||
for (const openvdb::GridBase::Ptr &vdb_grid : vdb_grids) {
|
||||
|
@ -959,6 +966,10 @@ bool BKE_volume_save(const Volume *volume,
|
|||
BKE_reportf(reports, RPT_ERROR, "Could not write volume: %s", e.what());
|
||||
return false;
|
||||
}
|
||||
catch (...) {
|
||||
BKE_reportf(reports, RPT_ERROR, "Could not write volume: Unknown error writing VDB file");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
|
|
|
@ -3956,15 +3956,30 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
|
|||
|
||||
BKE_main_id_tag_all(bfd->main, LIB_TAG_NEW, false);
|
||||
|
||||
/* Must happen before applying liboverrides, as this process may fully invalidate e.g. view
|
||||
* layer pointers in case a Scene is a liboverride. */
|
||||
link_global(fd, bfd);
|
||||
|
||||
/* Now that all our data-blocks are loaded,
|
||||
* we can re-generate overrides from their references. */
|
||||
if ((fd->flags & FD_FLAGS_IS_MEMFILE) == 0) {
|
||||
/* Do not apply in undo case! */
|
||||
fd->reports->duration.lib_overrides = PIL_check_seconds_timer();
|
||||
|
||||
std::string cur_view_layer_name = bfd->cur_view_layer != nullptr ?
|
||||
bfd->cur_view_layer->name :
|
||||
"";
|
||||
|
||||
BKE_lib_override_library_main_validate(bfd->main, fd->reports->reports);
|
||||
BKE_lib_override_library_main_update(bfd->main);
|
||||
|
||||
/* In case the current scene is a liboverride, while the ID pointer itself remains valid,
|
||||
* above update of liboverrides will have completely invalidated its old content, so the
|
||||
* current viewlayer needs to be searched for again. */
|
||||
if (bfd->cur_view_layer != nullptr) {
|
||||
bfd->cur_view_layer = BKE_view_layer_find(bfd->curscene, cur_view_layer_name.c_str());
|
||||
}
|
||||
|
||||
/* FIXME Temporary 'fix' to a problem in how temp ID are copied in
|
||||
* `BKE_lib_override_library_main_update`, see #103062.
|
||||
* Proper fix involves first addressing #90610. */
|
||||
|
@ -3978,8 +3993,6 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
|
|||
|
||||
/* Make all relative paths, relative to the open blend file. */
|
||||
fix_relpaths_library(fd->relabase, bfd->main);
|
||||
|
||||
link_global(fd, bfd); /* as last */
|
||||
}
|
||||
|
||||
fd->mainlist = nullptr; /* Safety, this is local variable, shall not be used afterward. */
|
||||
|
|
|
@ -884,7 +884,7 @@ static void camera_view3d_reconstruction(
|
|||
/* Index must start in 1, to mimic BKE_tracking_track_get_for_selection_index. */
|
||||
int track_index = 1;
|
||||
|
||||
float bundle_color_custom[3];
|
||||
float bundle_color_custom[4];
|
||||
float *bundle_color_solid = G_draw.block.color_bundle_solid;
|
||||
float *bundle_color_unselected = G_draw.block.color_wire;
|
||||
uchar text_color_selected[4], text_color_unselected[4];
|
||||
|
@ -930,6 +930,8 @@ static void camera_view3d_reconstruction(
|
|||
/* Meh, hardcoded srgb transform here. */
|
||||
/* TODO: change the actual DNA color to be linear. */
|
||||
srgb_to_linearrgb_v3_v3(bundle_color_custom, track->color);
|
||||
bundle_color_custom[3] = 1.0;
|
||||
|
||||
bundle_color = bundle_color_custom;
|
||||
}
|
||||
else if (is_solid_bundle) {
|
||||
|
|
|
@ -755,7 +755,7 @@ void MESH_OT_loopcut(wmOperatorType *ot)
|
|||
prop = RNA_def_property(ot->srna, "falloff", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_curve_only_items);
|
||||
RNA_def_property_enum_default(prop, PROP_INVSQUARE);
|
||||
RNA_def_property_ui_text(prop, "Falloff", "Falloff type the feather");
|
||||
RNA_def_property_ui_text(prop, "Falloff", "Falloff type of the feather");
|
||||
RNA_def_property_translation_context(prop,
|
||||
BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */
|
||||
|
||||
|
|
|
@ -3405,9 +3405,6 @@ static void draw_background_color(const SpaceNode &snode)
|
|||
|
||||
void node_draw_space(const bContext &C, ARegion ®ion)
|
||||
{
|
||||
if (G.is_rendering) {
|
||||
return;
|
||||
}
|
||||
wmWindow *win = CTX_wm_window(&C);
|
||||
SpaceNode &snode = *CTX_wm_space_node(&C);
|
||||
View2D &v2d = region.v2d;
|
||||
|
|
|
@ -1155,6 +1155,7 @@ void ED_spacetype_node()
|
|||
art->cursor = node_cursor;
|
||||
art->event_cursor = true;
|
||||
art->clip_gizmo_events_by_ui = true;
|
||||
art->lock = 1;
|
||||
|
||||
BLI_addhead(&st->regiontypes, art);
|
||||
|
||||
|
|
|
@ -1043,6 +1043,14 @@ static void id_override_library_create_hierarchy_pre_process_fn(bContext *C,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!ID_IS_OVERRIDABLE_LIBRARY_HIERARCHY(id_root_reference)) {
|
||||
BKE_reportf(reports,
|
||||
RPT_WARNING,
|
||||
"Could not create library override from data-block '%s', as it is not overridable",
|
||||
id_root_reference->name);
|
||||
return;
|
||||
}
|
||||
|
||||
BLI_assert(do_hierarchy);
|
||||
UNUSED_VARS_NDEBUG(do_hierarchy);
|
||||
|
||||
|
|
|
@ -418,10 +418,6 @@ static void update_visible_columns(ListBase &columns, DataSource &data_source)
|
|||
|
||||
static void spreadsheet_main_region_draw(const bContext *C, ARegion *region)
|
||||
{
|
||||
if (G.is_rendering) {
|
||||
return;
|
||||
}
|
||||
|
||||
SpaceSpreadsheet *sspreadsheet = CTX_wm_space_spreadsheet(C);
|
||||
sspreadsheet->runtime->cache.set_all_unused();
|
||||
spreadsheet_update_context(C);
|
||||
|
@ -518,9 +514,6 @@ static void spreadsheet_header_region_init(wmWindowManager * /*wm*/, ARegion *re
|
|||
|
||||
static void spreadsheet_header_region_draw(const bContext *C, ARegion *region)
|
||||
{
|
||||
if (G.is_rendering) {
|
||||
return;
|
||||
}
|
||||
spreadsheet_update_context(C);
|
||||
ED_region_header(C, region);
|
||||
}
|
||||
|
@ -574,9 +567,6 @@ static void spreadsheet_footer_region_init(wmWindowManager * /*wm*/, ARegion *re
|
|||
|
||||
static void spreadsheet_footer_region_draw(const bContext *C, ARegion *region)
|
||||
{
|
||||
if (G.is_rendering) {
|
||||
return;
|
||||
}
|
||||
SpaceSpreadsheet *sspreadsheet = CTX_wm_space_spreadsheet(C);
|
||||
SpaceSpreadsheet_Runtime *runtime = sspreadsheet->runtime;
|
||||
std::stringstream ss;
|
||||
|
@ -641,9 +631,6 @@ static void spreadsheet_dataset_region_listener(const wmRegionListenerParams *pa
|
|||
|
||||
static void spreadsheet_dataset_region_draw(const bContext *C, ARegion *region)
|
||||
{
|
||||
if (G.is_rendering) {
|
||||
return;
|
||||
}
|
||||
spreadsheet_update_context(C);
|
||||
ED_region_panels(C, region);
|
||||
}
|
||||
|
@ -736,6 +723,7 @@ void ED_spacetype_spreadsheet()
|
|||
art = MEM_cnew<ARegionType>("spacetype spreadsheet region");
|
||||
art->regionid = RGN_TYPE_WINDOW;
|
||||
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
|
||||
art->lock = 1;
|
||||
|
||||
art->init = spreadsheet_main_region_init;
|
||||
art->draw = spreadsheet_main_region_draw;
|
||||
|
@ -748,6 +736,7 @@ void ED_spacetype_spreadsheet()
|
|||
art->prefsizey = HEADERY;
|
||||
art->keymapflag = 0;
|
||||
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
|
||||
art->lock = 1;
|
||||
|
||||
art->init = spreadsheet_header_region_init;
|
||||
art->draw = spreadsheet_header_region_draw;
|
||||
|
@ -761,6 +750,7 @@ void ED_spacetype_spreadsheet()
|
|||
art->prefsizey = HEADERY;
|
||||
art->keymapflag = 0;
|
||||
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
|
||||
art->lock = 1;
|
||||
|
||||
art->init = spreadsheet_footer_region_init;
|
||||
art->draw = spreadsheet_footer_region_draw;
|
||||
|
@ -773,6 +763,7 @@ void ED_spacetype_spreadsheet()
|
|||
art->regionid = RGN_TYPE_UI;
|
||||
art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
|
||||
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES;
|
||||
art->lock = 1;
|
||||
|
||||
art->init = spreadsheet_sidebar_init;
|
||||
art->layout = ED_region_panels_layout;
|
||||
|
@ -788,6 +779,7 @@ void ED_spacetype_spreadsheet()
|
|||
art->regionid = RGN_TYPE_TOOLS;
|
||||
art->prefsizex = 150 + V2D_SCROLL_WIDTH;
|
||||
art->keymapflag = ED_KEYMAP_UI;
|
||||
art->lock = 1;
|
||||
art->init = ED_region_panels_init;
|
||||
art->draw = spreadsheet_dataset_region_draw;
|
||||
art->listener = spreadsheet_dataset_region_listener;
|
||||
|
|
|
@ -1081,7 +1081,7 @@ typedef struct GPUPixelBuffer GPUPixelBuffer;
|
|||
/**
|
||||
* Creates a #GPUPixelBuffer object with \a byte_size worth of storage.
|
||||
*/
|
||||
GPUPixelBuffer *GPU_pixel_buffer_create(uint byte_size);
|
||||
GPUPixelBuffer *GPU_pixel_buffer_create(size_t byte_size);
|
||||
|
||||
/**
|
||||
* Free a #GPUPixelBuffer object.
|
||||
|
@ -1106,7 +1106,7 @@ void GPU_pixel_buffer_unmap(GPUPixelBuffer *pixel_buf);
|
|||
/**
|
||||
* Return size in bytes of the \a pix_buf .
|
||||
*/
|
||||
uint GPU_pixel_buffer_size(GPUPixelBuffer *pixel_buf);
|
||||
size_t GPU_pixel_buffer_size(GPUPixelBuffer *pixel_buf);
|
||||
|
||||
/**
|
||||
* Return the native handle of the \a pix_buf to use for graphic interoperability registration.
|
||||
|
|
|
@ -956,7 +956,7 @@ void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *r_size)
|
|||
* Pixel buffer utility functions.
|
||||
* \{ */
|
||||
|
||||
GPUPixelBuffer *GPU_pixel_buffer_create(uint size)
|
||||
GPUPixelBuffer *GPU_pixel_buffer_create(size_t size)
|
||||
{
|
||||
/* Ensure buffer satisfies the alignment of 256 bytes for copying
|
||||
* data between buffers and textures. As specified in:
|
||||
|
@ -985,7 +985,7 @@ void GPU_pixel_buffer_unmap(GPUPixelBuffer *pix_buf)
|
|||
reinterpret_cast<PixelBuffer *>(pix_buf)->unmap();
|
||||
}
|
||||
|
||||
uint GPU_pixel_buffer_size(GPUPixelBuffer *pix_buf)
|
||||
size_t GPU_pixel_buffer_size(GPUPixelBuffer *pix_buf)
|
||||
{
|
||||
return reinterpret_cast<PixelBuffer *>(pix_buf)->get_size();
|
||||
}
|
||||
|
|
|
@ -333,16 +333,16 @@ static inline const Texture *unwrap(const GPUTexture *vert)
|
|||
/* GPU pixel Buffer. */
|
||||
class PixelBuffer {
|
||||
protected:
|
||||
uint size_ = 0;
|
||||
size_t size_ = 0;
|
||||
|
||||
public:
|
||||
PixelBuffer(uint size) : size_(size){};
|
||||
PixelBuffer(size_t size) : size_(size){};
|
||||
virtual ~PixelBuffer(){};
|
||||
|
||||
virtual void *map() = 0;
|
||||
virtual void unmap() = 0;
|
||||
virtual int64_t get_native_handle() = 0;
|
||||
virtual uint get_size() = 0;
|
||||
virtual size_t get_size() = 0;
|
||||
};
|
||||
|
||||
/* Syntactic sugar. */
|
||||
|
|
|
@ -828,7 +828,9 @@ void MTLComputeState::bind_compute_sampler(MTLSamplerBinding &sampler_binding,
|
|||
}
|
||||
}
|
||||
|
||||
void MTLRenderPassState::bind_vertex_buffer(id<MTLBuffer> buffer, uint buffer_offset, uint index)
|
||||
void MTLRenderPassState::bind_vertex_buffer(id<MTLBuffer> buffer,
|
||||
uint64_t buffer_offset,
|
||||
uint index)
|
||||
{
|
||||
BLI_assert(index >= 0 && index < MTL_MAX_BUFFER_BINDINGS);
|
||||
BLI_assert(buffer_offset >= 0);
|
||||
|
@ -858,7 +860,9 @@ void MTLRenderPassState::bind_vertex_buffer(id<MTLBuffer> buffer, uint buffer_of
|
|||
}
|
||||
}
|
||||
|
||||
void MTLRenderPassState::bind_fragment_buffer(id<MTLBuffer> buffer, uint buffer_offset, uint index)
|
||||
void MTLRenderPassState::bind_fragment_buffer(id<MTLBuffer> buffer,
|
||||
uint64_t buffer_offset,
|
||||
uint index)
|
||||
{
|
||||
BLI_assert(index >= 0 && index < MTL_MAX_BUFFER_BINDINGS);
|
||||
BLI_assert(buffer_offset >= 0);
|
||||
|
@ -889,7 +893,7 @@ void MTLRenderPassState::bind_fragment_buffer(id<MTLBuffer> buffer, uint buffer_
|
|||
}
|
||||
|
||||
void MTLComputeState::bind_compute_buffer(id<MTLBuffer> buffer,
|
||||
uint buffer_offset,
|
||||
uint64_t buffer_offset,
|
||||
uint index,
|
||||
bool writeable)
|
||||
{
|
||||
|
@ -924,7 +928,7 @@ void MTLComputeState::bind_compute_buffer(id<MTLBuffer> buffer,
|
|||
}
|
||||
}
|
||||
|
||||
void MTLRenderPassState::bind_vertex_bytes(void *bytes, uint length, uint index)
|
||||
void MTLRenderPassState::bind_vertex_bytes(void *bytes, uint64_t length, uint index)
|
||||
{
|
||||
/* Bytes always updated as source data may have changed. */
|
||||
BLI_assert(index >= 0 && index < MTL_MAX_BUFFER_BINDINGS);
|
||||
|
@ -949,7 +953,7 @@ void MTLRenderPassState::bind_vertex_bytes(void *bytes, uint length, uint index)
|
|||
this->cached_vertex_buffer_bindings[index].offset = -1;
|
||||
}
|
||||
|
||||
void MTLRenderPassState::bind_fragment_bytes(void *bytes, uint length, uint index)
|
||||
void MTLRenderPassState::bind_fragment_bytes(void *bytes, uint64_t length, uint index)
|
||||
{
|
||||
/* Bytes always updated as source data may have changed. */
|
||||
BLI_assert(index >= 0 && index < MTL_MAX_BUFFER_BINDINGS);
|
||||
|
@ -974,7 +978,7 @@ void MTLRenderPassState::bind_fragment_bytes(void *bytes, uint length, uint inde
|
|||
this->cached_fragment_buffer_bindings[index].offset = -1;
|
||||
}
|
||||
|
||||
void MTLComputeState::bind_compute_bytes(void *bytes, uint length, uint index)
|
||||
void MTLComputeState::bind_compute_bytes(void *bytes, uint64_t length, uint index)
|
||||
{
|
||||
/* Bytes always updated as source data may have changed. */
|
||||
BLI_assert(index >= 0 && index < MTL_MAX_BUFFER_BINDINGS);
|
||||
|
|
|
@ -86,7 +86,7 @@ struct BufferBindingCached {
|
|||
* or an MTLBuffer. */
|
||||
bool is_bytes;
|
||||
id<MTLBuffer> metal_buffer;
|
||||
int offset;
|
||||
uint64_t offset;
|
||||
};
|
||||
|
||||
/* Caching of CommandEncoder textures bindings. */
|
||||
|
@ -144,10 +144,10 @@ class MTLRenderPassState {
|
|||
uint slot);
|
||||
|
||||
/* Buffer binding (RenderCommandEncoder). */
|
||||
void bind_vertex_buffer(id<MTLBuffer> buffer, uint buffer_offset, uint index);
|
||||
void bind_fragment_buffer(id<MTLBuffer> buffer, uint buffer_offset, uint index);
|
||||
void bind_vertex_bytes(void *bytes, uint length, uint index);
|
||||
void bind_fragment_bytes(void *bytes, uint length, uint index);
|
||||
void bind_vertex_buffer(id<MTLBuffer> buffer, uint64_t buffer_offset, uint index);
|
||||
void bind_fragment_buffer(id<MTLBuffer> buffer, uint64_t buffer_offset, uint index);
|
||||
void bind_vertex_bytes(void *bytes, uint64_t length, uint index);
|
||||
void bind_fragment_bytes(void *bytes, uint64_t length, uint index);
|
||||
};
|
||||
|
||||
/* Metal Context Compute Pass State -- Used to track active ComputeCommandEncoder state. */
|
||||
|
@ -182,10 +182,10 @@ class MTLComputeState {
|
|||
uint slot);
|
||||
/* Buffer binding (ComputeCommandEncoder). */
|
||||
void bind_compute_buffer(id<MTLBuffer> buffer,
|
||||
uint buffer_offset,
|
||||
uint64_t buffer_offset,
|
||||
uint index,
|
||||
bool writeable = false);
|
||||
void bind_compute_bytes(void *bytes, uint length, uint index);
|
||||
void bind_compute_bytes(void *bytes, uint64_t length, uint index);
|
||||
};
|
||||
|
||||
/* Depth Stencil State */
|
||||
|
|
|
@ -1148,7 +1148,7 @@ bool MTLContext::ensure_buffer_bindings(
|
|||
/* buffer(N) index of where to bind the UBO. */
|
||||
const uint32_t buffer_index = ubo.buffer_index;
|
||||
id<MTLBuffer> ubo_buffer = nil;
|
||||
int ubo_size = 0;
|
||||
size_t ubo_size = 0;
|
||||
|
||||
bool bind_dummy_buffer = false;
|
||||
if (this->pipeline_state.ubo_bindings[ubo_location].bound) {
|
||||
|
@ -1196,7 +1196,7 @@ bool MTLContext::ensure_buffer_bindings(
|
|||
if (ubo_size < expected_size) {
|
||||
MTL_LOG_UBO_ERROR(
|
||||
"[Error][UBO] UBO (UBO Name: %s) bound at location: %d (buffer[[%d]]) with size "
|
||||
"%d (Expected size "
|
||||
"%lu (Expected size "
|
||||
"%d) (Shader Name: %s) is too small -- binding NULL buffer. This is likely an "
|
||||
"over-binding, which is not used, but we need this to avoid validation "
|
||||
"issues\n",
|
||||
|
@ -1270,7 +1270,7 @@ bool MTLContext::ensure_buffer_bindings(
|
|||
/* buffer(N) index of where to bind the SSBO. */
|
||||
const uint32_t buffer_index = ssbo.buffer_index;
|
||||
id<MTLBuffer> ssbo_buffer = nil;
|
||||
int ssbo_size = 0;
|
||||
size_t ssbo_size = 0;
|
||||
UNUSED_VARS_NDEBUG(ssbo_size);
|
||||
|
||||
if (this->pipeline_state.ssbo_bindings[ssbo_location].bound) {
|
||||
|
@ -1378,7 +1378,7 @@ bool MTLContext::ensure_buffer_bindings(
|
|||
/* buffer(N) index of where to bind the UBO. */
|
||||
const uint32_t buffer_index = ubo.buffer_index;
|
||||
id<MTLBuffer> ubo_buffer = nil;
|
||||
int ubo_size = 0;
|
||||
size_t ubo_size = 0;
|
||||
|
||||
bool bind_dummy_buffer = false;
|
||||
if (this->pipeline_state.ubo_bindings[ubo_location].bound) {
|
||||
|
@ -1700,12 +1700,12 @@ void MTLContext::ensure_texture_bindings(
|
|||
}
|
||||
else {
|
||||
/* Populate argument buffer with current global sampler bindings. */
|
||||
int size = [argument_encoder encodedLength];
|
||||
int alignment = max_uu([argument_encoder alignment], 256);
|
||||
int size_align_delta = (size % alignment);
|
||||
int aligned_alloc_size = ((alignment > 1) && (size_align_delta > 0)) ?
|
||||
size + (alignment - (size % alignment)) :
|
||||
size;
|
||||
size_t size = [argument_encoder encodedLength];
|
||||
size_t alignment = max_uu([argument_encoder alignment], 256);
|
||||
size_t size_align_delta = (size % alignment);
|
||||
size_t aligned_alloc_size = ((alignment > 1) && (size_align_delta > 0)) ?
|
||||
size + (alignment - (size % alignment)) :
|
||||
size;
|
||||
|
||||
/* Allocate buffer to store encoded sampler arguments. */
|
||||
encoder_buffer = MTLContext::get_global_memory_manager()->allocate(aligned_alloc_size,
|
||||
|
@ -1921,12 +1921,12 @@ void MTLContext::ensure_texture_bindings(
|
|||
}
|
||||
else {
|
||||
/* Populate argument buffer with current global sampler bindings. */
|
||||
int size = [argument_encoder encodedLength];
|
||||
int alignment = max_uu([argument_encoder alignment], 256);
|
||||
int size_align_delta = (size % alignment);
|
||||
int aligned_alloc_size = ((alignment > 1) && (size_align_delta > 0)) ?
|
||||
size + (alignment - (size % alignment)) :
|
||||
size;
|
||||
size_t size = [argument_encoder encodedLength];
|
||||
size_t alignment = max_uu([argument_encoder alignment], 256);
|
||||
size_t size_align_delta = (size % alignment);
|
||||
size_t aligned_alloc_size = ((alignment > 1) && (size_align_delta > 0)) ?
|
||||
size + (alignment - (size % alignment)) :
|
||||
size;
|
||||
|
||||
/* Allocate buffer to store encoded sampler arguments. */
|
||||
encoder_buffer = MTLContext::get_global_memory_manager()->allocate(aligned_alloc_size,
|
||||
|
|
|
@ -494,7 +494,7 @@ void MTLFrameBuffer::read(eGPUFrameBufferBits planes,
|
|||
if (tex) {
|
||||
size_t sample_len = area[2] * area[3];
|
||||
size_t sample_size = to_bytesize(tex->format_, format);
|
||||
int debug_data_size = sample_len * sample_size;
|
||||
size_t debug_data_size = sample_len * sample_size;
|
||||
tex->read_internal(0,
|
||||
area[0],
|
||||
area[1],
|
||||
|
@ -523,7 +523,7 @@ void MTLFrameBuffer::read(eGPUFrameBufferBits planes,
|
|||
if (tex) {
|
||||
size_t sample_len = area[2] * area[3];
|
||||
size_t sample_size = to_bytesize(tex->format_, format);
|
||||
int debug_data_size = sample_len * sample_size * channel_len;
|
||||
size_t debug_data_size = sample_len * sample_size * channel_len;
|
||||
tex->read_internal(0,
|
||||
area[0],
|
||||
area[1],
|
||||
|
|
|
@ -322,7 +322,7 @@ void MTLImmediate::end()
|
|||
@autoreleasepool {
|
||||
|
||||
id<MTLBuffer> index_buffer_mtl = nil;
|
||||
uint32_t index_buffer_offset = 0;
|
||||
uint64_t index_buffer_offset = 0;
|
||||
|
||||
/* Region of scratch buffer used for topology emulation element data.
|
||||
* NOTE(Metal): We do not need to manually flush as the entire scratch
|
||||
|
|
|
@ -777,7 +777,7 @@ MTLTemporaryBuffer MTLCircularBuffer::allocate_range_aligned(uint64_t alloc_size
|
|||
|
||||
/* Ensure alignment of an allocation is aligned to compatible offset boundaries. */
|
||||
BLI_assert(alignment > 0);
|
||||
alignment = max_ulul(alignment, 256);
|
||||
alignment = max_uu(alignment, 256);
|
||||
|
||||
/* Align current offset and allocation size to desired alignment */
|
||||
uint64_t aligned_current_offset = ceil_to_multiple_ul(current_offset_, alignment);
|
||||
|
|
|
@ -71,7 +71,7 @@ class MTLStorageBuf : public StorageBuf {
|
|||
void init();
|
||||
|
||||
id<MTLBuffer> get_metal_buffer();
|
||||
int get_size();
|
||||
size_t get_size();
|
||||
const char *get_name()
|
||||
{
|
||||
return name_;
|
||||
|
|
|
@ -296,7 +296,7 @@ id<MTLBuffer> MTLStorageBuf::get_metal_buffer()
|
|||
return source_buffer->get_metal_buffer();
|
||||
}
|
||||
|
||||
int MTLStorageBuf::get_size()
|
||||
size_t MTLStorageBuf::get_size()
|
||||
{
|
||||
BLI_assert(this);
|
||||
return size_in_bytes_;
|
||||
|
|
|
@ -184,7 +184,7 @@ class MTLTexture : public Texture {
|
|||
|
||||
/* Texture Storage. */
|
||||
id<MTLBuffer> texture_buffer_ = nil;
|
||||
uint aligned_w_ = 0;
|
||||
size_t aligned_w_ = 0;
|
||||
|
||||
/* Blit Frame-buffer. */
|
||||
GPUFrameBuffer *blit_fb_ = nullptr;
|
||||
|
@ -314,7 +314,7 @@ class MTLTexture : public Texture {
|
|||
int depth,
|
||||
eGPUDataFormat desired_output_format,
|
||||
int num_output_components,
|
||||
int debug_data_size,
|
||||
size_t debug_data_size,
|
||||
void *r_data);
|
||||
void bake_mip_swizzle_view();
|
||||
|
||||
|
@ -453,7 +453,7 @@ class MTLPixelBuffer : public PixelBuffer {
|
|||
void *map() override;
|
||||
void unmap() override;
|
||||
int64_t get_native_handle() override;
|
||||
uint get_size() override;
|
||||
size_t get_size() override;
|
||||
|
||||
id<MTLBuffer> get_metal_buffer();
|
||||
|
||||
|
@ -462,7 +462,7 @@ class MTLPixelBuffer : public PixelBuffer {
|
|||
|
||||
/* Utility */
|
||||
MTLPixelFormat gpu_texture_format_to_metal(eGPUTextureFormat tex_format);
|
||||
int get_mtl_format_bytesize(MTLPixelFormat tex_format);
|
||||
size_t get_mtl_format_bytesize(MTLPixelFormat tex_format);
|
||||
int get_mtl_format_num_components(MTLPixelFormat tex_format);
|
||||
bool mtl_format_supports_blending(MTLPixelFormat format);
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ gpu::MTLTexture::MTLTexture(const char *name,
|
|||
BLI_assert(metal_texture != nil);
|
||||
BLI_assert(type == GPU_TEXTURE_2D);
|
||||
type_ = type;
|
||||
init_2D(metal_texture.width, metal_texture.height, 0, 1, format);
|
||||
init_2D((int)metal_texture.width, (int)metal_texture.height, 0, 1, format);
|
||||
|
||||
/* Assign MTLTexture. */
|
||||
texture_ = metal_texture;
|
||||
|
@ -160,7 +160,7 @@ void gpu::MTLTexture::bake_mip_swizzle_view()
|
|||
}
|
||||
|
||||
int range_len = min_ii((mip_texture_max_level_ - mip_texture_base_level_) + 1,
|
||||
texture_.mipmapLevelCount - mip_texture_base_level_);
|
||||
(int)texture_.mipmapLevelCount - mip_texture_base_level_);
|
||||
BLI_assert(range_len > 0);
|
||||
BLI_assert(mip_texture_base_level_ < texture_.mipmapLevelCount);
|
||||
BLI_assert(mip_texture_base_layer_ < num_slices);
|
||||
|
@ -173,7 +173,7 @@ void gpu::MTLTexture::bake_mip_swizzle_view()
|
|||
MTL_LOG_INFO(
|
||||
"Updating texture view - MIP TEXTURE BASE LEVEL: %d, MAX LEVEL: %d (Range len: %d)\n",
|
||||
mip_texture_base_level_,
|
||||
min_ii(mip_texture_max_level_, texture_.mipmapLevelCount),
|
||||
min_ii(mip_texture_max_level_, (int)texture_.mipmapLevelCount),
|
||||
range_len);
|
||||
mip_swizzle_view_.label = [texture_ label];
|
||||
texture_view_dirty_flags_ = TEXTURE_VIEW_NOT_DIRTY;
|
||||
|
@ -472,25 +472,26 @@ void gpu::MTLTexture::update_sub(
|
|||
@autoreleasepool {
|
||||
/* Determine totalsize of INPUT Data. */
|
||||
int num_channels = to_component_len(format_);
|
||||
int input_bytes_per_pixel = to_bytesize(format_, type);
|
||||
int totalsize = 0;
|
||||
size_t input_bytes_per_pixel = to_bytesize(format_, type);
|
||||
size_t totalsize = 0;
|
||||
|
||||
/* If unpack row length is used, size of input data uses the unpack row length, rather than the
|
||||
* image length. */
|
||||
int expected_update_w = ((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
size_t expected_update_w = ((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
|
||||
/* Ensure calculated total size isn't larger than remaining image data size */
|
||||
switch (this->dimensions_count()) {
|
||||
case 1:
|
||||
totalsize = input_bytes_per_pixel * max_ii(expected_update_w, 1);
|
||||
totalsize = input_bytes_per_pixel * max_ulul(expected_update_w, 1);
|
||||
break;
|
||||
case 2:
|
||||
totalsize = input_bytes_per_pixel * max_ii(expected_update_w, 1) * extent[1];
|
||||
totalsize = input_bytes_per_pixel * max_ulul(expected_update_w, 1) * (size_t)extent[1];
|
||||
break;
|
||||
case 3:
|
||||
totalsize = input_bytes_per_pixel * max_ii(expected_update_w, 1) * extent[1] * extent[2];
|
||||
totalsize = input_bytes_per_pixel * max_ulul(expected_update_w, 1) * (size_t)extent[1] *
|
||||
(size_t)extent[2];
|
||||
break;
|
||||
default:
|
||||
BLI_assert(false);
|
||||
|
@ -522,7 +523,7 @@ void gpu::MTLTexture::update_sub(
|
|||
|
||||
/* Determine expected destination data size. */
|
||||
MTLPixelFormat destination_format = gpu_texture_format_to_metal(format_);
|
||||
int expected_dst_bytes_per_pixel = get_mtl_format_bytesize(destination_format);
|
||||
size_t expected_dst_bytes_per_pixel = get_mtl_format_bytesize(destination_format);
|
||||
int destination_num_channels = get_mtl_format_num_components(destination_format);
|
||||
|
||||
/* Prepare specialization struct (For texture update routine). */
|
||||
|
@ -567,8 +568,8 @@ void gpu::MTLTexture::update_sub(
|
|||
/* Debug and verification. */
|
||||
if (!can_use_direct_blit) {
|
||||
MTL_LOG_WARNING(
|
||||
"gpu::MTLTexture::update_sub supplied bpp is %d bytes (%d components per "
|
||||
"pixel), but backing texture bpp is %d bytes (%d components per pixel) "
|
||||
"gpu::MTLTexture::update_sub supplied bpp is %lu bytes (%d components per "
|
||||
"pixel), but backing texture bpp is %lu bytes (%d components per pixel) "
|
||||
"(TODO(Metal): Channel Conversion needed) (w: %d, h: %d, d: %d)\n",
|
||||
input_bytes_per_pixel,
|
||||
num_channels,
|
||||
|
@ -687,15 +688,15 @@ void gpu::MTLTexture::update_sub(
|
|||
case GPU_TEXTURE_1D_ARRAY: {
|
||||
if (can_use_direct_blit) {
|
||||
/* Use Blit based update. */
|
||||
int bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
int bytes_per_image = bytes_per_row;
|
||||
size_t bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
size_t bytes_per_image = bytes_per_row;
|
||||
int max_array_index = ((type_ == GPU_TEXTURE_1D_ARRAY) ? extent[1] : 1);
|
||||
for (int array_index = 0; array_index < max_array_index; array_index++) {
|
||||
|
||||
int buffer_array_offset = (bytes_per_image * array_index);
|
||||
size_t buffer_array_offset = (bytes_per_image * (size_t)array_index);
|
||||
[blit_encoder
|
||||
copyFromBuffer:staging_buffer
|
||||
sourceOffset:buffer_array_offset
|
||||
|
@ -759,13 +760,13 @@ void gpu::MTLTexture::update_sub(
|
|||
case GPU_TEXTURE_2D_ARRAY: {
|
||||
if (can_use_direct_blit) {
|
||||
/* Use Blit encoder update. */
|
||||
int bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
int bytes_per_image = bytes_per_row * extent[1];
|
||||
size_t bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
size_t bytes_per_image = bytes_per_row * extent[1];
|
||||
|
||||
int texture_array_relative_offset = 0;
|
||||
size_t texture_array_relative_offset = 0;
|
||||
int base_slice = (type_ == GPU_TEXTURE_2D_ARRAY) ? offset[2] : 0;
|
||||
int final_slice = base_slice + ((type_ == GPU_TEXTURE_2D_ARRAY) ? extent[2] : 1);
|
||||
|
||||
|
@ -840,11 +841,11 @@ void gpu::MTLTexture::update_sub(
|
|||
/* 3D */
|
||||
case GPU_TEXTURE_3D: {
|
||||
if (can_use_direct_blit) {
|
||||
int bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
int bytes_per_image = bytes_per_row * extent[1];
|
||||
size_t bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
size_t bytes_per_image = bytes_per_row * extent[1];
|
||||
[blit_encoder copyFromBuffer:staging_buffer
|
||||
sourceOffset:0
|
||||
sourceBytesPerRow:bytes_per_row
|
||||
|
@ -881,13 +882,12 @@ void gpu::MTLTexture::update_sub(
|
|||
/* CUBE */
|
||||
case GPU_TEXTURE_CUBE: {
|
||||
if (can_use_direct_blit) {
|
||||
int bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
int bytes_per_image = bytes_per_row * extent[1];
|
||||
|
||||
int texture_array_relative_offset = 0;
|
||||
size_t bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
size_t bytes_per_image = bytes_per_row * extent[1];
|
||||
size_t texture_array_relative_offset = 0;
|
||||
|
||||
/* Iterate over all cube faces in range (offset[2], offset[2] + extent[2]). */
|
||||
for (int i = 0; i < extent[2]; i++) {
|
||||
|
@ -917,14 +917,14 @@ void gpu::MTLTexture::update_sub(
|
|||
case GPU_TEXTURE_CUBE_ARRAY: {
|
||||
if (can_use_direct_blit) {
|
||||
|
||||
int bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
int bytes_per_image = bytes_per_row * extent[1];
|
||||
size_t bytes_per_row = expected_dst_bytes_per_pixel *
|
||||
((ctx->pipeline_state.unpack_row_length == 0) ?
|
||||
extent[0] :
|
||||
ctx->pipeline_state.unpack_row_length);
|
||||
size_t bytes_per_image = bytes_per_row * extent[1];
|
||||
|
||||
/* Upload to all faces between offset[2] (which is zero in most cases) AND extent[2]. */
|
||||
int texture_array_relative_offset = 0;
|
||||
size_t texture_array_relative_offset = 0;
|
||||
for (int i = 0; i < extent[2]; i++) {
|
||||
int face_index = offset[2] + i;
|
||||
[blit_encoder copyFromBuffer:staging_buffer
|
||||
|
@ -1091,9 +1091,9 @@ void MTLTexture::update_sub(int offset[3],
|
|||
/* Calculate dimensions. */
|
||||
int num_image_channels = to_component_len(format_);
|
||||
|
||||
uint bits_per_pixel = num_image_channels * to_bytesize(format);
|
||||
uint bytes_per_row = bits_per_pixel * extent[0];
|
||||
uint bytes_per_image = bytes_per_row * extent[1];
|
||||
size_t bits_per_pixel = num_image_channels * to_bytesize(format);
|
||||
size_t bytes_per_row = bits_per_pixel * extent[0];
|
||||
size_t bytes_per_image = bytes_per_row * extent[1];
|
||||
|
||||
/* Currently only required for 2D textures. */
|
||||
if (type_ == GPU_TEXTURE_2D) {
|
||||
|
@ -1393,7 +1393,7 @@ void gpu::MTLTexture::read_internal(int mip,
|
|||
int depth,
|
||||
eGPUDataFormat desired_output_format,
|
||||
int num_output_components,
|
||||
int debug_data_size,
|
||||
size_t debug_data_size,
|
||||
void *r_data)
|
||||
{
|
||||
/* Verify textures are baked. */
|
||||
|
@ -1408,10 +1408,10 @@ void gpu::MTLTexture::read_internal(int mip,
|
|||
/* Calculate Desired output size. */
|
||||
int num_channels = to_component_len(format_);
|
||||
BLI_assert(num_output_components <= num_channels);
|
||||
uint desired_output_bpp = num_output_components * to_bytesize(desired_output_format);
|
||||
size_t desired_output_bpp = num_output_components * to_bytesize(desired_output_format);
|
||||
|
||||
/* Calculate Metal data output for trivial copy. */
|
||||
uint image_bpp = get_mtl_format_bytesize(texture_.pixelFormat);
|
||||
size_t image_bpp = get_mtl_format_bytesize(texture_.pixelFormat);
|
||||
uint image_components = get_mtl_format_num_components(texture_.pixelFormat);
|
||||
bool is_depth_format = (format_flag_ & GPU_FORMAT_DEPTH);
|
||||
|
||||
|
@ -1449,9 +1449,9 @@ void gpu::MTLTexture::read_internal(int mip,
|
|||
}
|
||||
|
||||
/* Determine size of output data. */
|
||||
uint bytes_per_row = desired_output_bpp * width;
|
||||
uint bytes_per_image = bytes_per_row * height;
|
||||
uint total_bytes = bytes_per_image * depth;
|
||||
size_t bytes_per_row = desired_output_bpp * width;
|
||||
size_t bytes_per_image = bytes_per_row * height;
|
||||
size_t total_bytes = bytes_per_image * depth;
|
||||
|
||||
if (can_use_simple_read) {
|
||||
/* DEBUG check that if direct copy is being used, then both the expected output size matches
|
||||
|
@ -1568,7 +1568,7 @@ void gpu::MTLTexture::read_internal(int mip,
|
|||
}
|
||||
int base_slice = z_off;
|
||||
int final_slice = base_slice + depth;
|
||||
int texture_array_relative_offset = 0;
|
||||
size_t texture_array_relative_offset = 0;
|
||||
|
||||
for (int array_slice = base_slice; array_slice < final_slice; array_slice++) {
|
||||
[enc copyFromTexture:read_texture
|
||||
|
@ -1618,7 +1618,7 @@ void gpu::MTLTexture::read_internal(int mip,
|
|||
}
|
||||
int base_slice = z_off;
|
||||
int final_slice = base_slice + depth;
|
||||
int texture_array_relative_offset = 0;
|
||||
size_t texture_array_relative_offset = 0;
|
||||
|
||||
for (int array_slice = base_slice; array_slice < final_slice; array_slice++) {
|
||||
[enc copyFromTexture:read_texture
|
||||
|
@ -1665,12 +1665,12 @@ void gpu::MTLTexture::read_internal(int mip,
|
|||
|
||||
/* Copy data from Shared Memory into ptr. */
|
||||
memcpy(r_data, destination_buffer_host_ptr, total_bytes);
|
||||
MTL_LOG_INFO("gpu::MTLTexture::read_internal success! %d bytes read\n", total_bytes);
|
||||
MTL_LOG_INFO("gpu::MTLTexture::read_internal success! %lu bytes read\n", total_bytes);
|
||||
}
|
||||
else {
|
||||
MTL_LOG_WARNING(
|
||||
"[Warning] gpu::MTLTexture::read_internal not yet supported for this config -- data "
|
||||
"format different (src %d bytes, dst %d bytes) (src format: %d, dst format: %d), or "
|
||||
"format different (src %lu bytes, dst %lu bytes) (src format: %d, dst format: %d), or "
|
||||
"varying component counts (src %d, dst %d)\n",
|
||||
image_bpp,
|
||||
desired_output_bpp,
|
||||
|
@ -1731,8 +1731,8 @@ bool gpu::MTLTexture::init_internal(GPUVertBuf *vbo)
|
|||
|
||||
/* Verify Texture and vertex buffer alignment. */
|
||||
const GPUVertFormat *format = GPU_vertbuf_get_format(vbo);
|
||||
int bytes_per_pixel = get_mtl_format_bytesize(mtl_format);
|
||||
int bytes_per_row = bytes_per_pixel * w_;
|
||||
size_t bytes_per_pixel = get_mtl_format_bytesize(mtl_format);
|
||||
size_t bytes_per_row = bytes_per_pixel * w_;
|
||||
|
||||
MTLContext *mtl_ctx = MTLContext::get();
|
||||
uint32_t align_requirement = static_cast<uint32_t>(
|
||||
|
@ -1794,7 +1794,7 @@ bool gpu::MTLTexture::init_internal(GPUVertBuf *vbo)
|
|||
texture_ = [source_buffer
|
||||
newTextureWithDescriptor:texture_descriptor_
|
||||
offset:0
|
||||
bytesPerRow:ceil_to_multiple_u(bytes_per_row, align_requirement)];
|
||||
bytesPerRow:ceil_to_multiple_ul(bytes_per_row, align_requirement)];
|
||||
aligned_w_ = bytes_per_row / bytes_per_pixel;
|
||||
|
||||
BLI_assert(texture_);
|
||||
|
@ -2159,7 +2159,7 @@ int64_t MTLPixelBuffer::get_native_handle()
|
|||
return reinterpret_cast<int64_t>(buffer_);
|
||||
}
|
||||
|
||||
uint MTLPixelBuffer::get_size()
|
||||
size_t MTLPixelBuffer::get_size()
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ MTLPixelFormat gpu_texture_format_to_metal(eGPUTextureFormat tex_format)
|
|||
return MTLPixelFormatRGBA8Unorm;
|
||||
}
|
||||
|
||||
int get_mtl_format_bytesize(MTLPixelFormat tex_format)
|
||||
size_t get_mtl_format_bytesize(MTLPixelFormat tex_format)
|
||||
{
|
||||
switch (tex_format) {
|
||||
case MTLPixelFormatRGBA8Uint:
|
||||
|
|
|
@ -47,7 +47,7 @@ class MTLUniformBuf : public UniformBuf {
|
|||
void clear_to_zero() override;
|
||||
|
||||
id<MTLBuffer> get_metal_buffer();
|
||||
int get_size();
|
||||
size_t get_size();
|
||||
const char *get_name()
|
||||
{
|
||||
return name_;
|
||||
|
|
|
@ -190,7 +190,7 @@ id<MTLBuffer> MTLUniformBuf::get_metal_buffer()
|
|||
return nil;
|
||||
}
|
||||
|
||||
int MTLUniformBuf::get_size()
|
||||
size_t MTLUniformBuf::get_size()
|
||||
{
|
||||
BLI_assert(this);
|
||||
return size_in_bytes_;
|
||||
|
|
|
@ -75,7 +75,7 @@ void MTLVertBuf::duplicate_data(VertBuf *dst_)
|
|||
BLI_assert(dst->vbo_ == nullptr);
|
||||
|
||||
/* Allocate VBO for destination vertbuf. */
|
||||
uint length = src->vbo_->get_size();
|
||||
uint64_t length = src->vbo_->get_size();
|
||||
dst->vbo_ = MTLContext::get_global_memory_manager()->allocate(
|
||||
length, (dst->get_usage_type() != GPU_USAGE_DEVICE_ONLY));
|
||||
dst->alloc_size_ = length;
|
||||
|
@ -225,7 +225,7 @@ void MTLVertBuf::bind()
|
|||
sourceOffset:0
|
||||
toBuffer:copy_new_buffer
|
||||
destinationOffset:0
|
||||
size:min_ii([copy_new_buffer length], [copy_prev_buffer length])];
|
||||
size:min_ulul([copy_new_buffer length], [copy_prev_buffer length])];
|
||||
|
||||
/* Flush newly copied data back to host-side buffer, if one exists.
|
||||
* Ensures data and cache coherency for managed MTLBuffers. */
|
||||
|
@ -274,7 +274,7 @@ void MTLVertBuf::update_sub(uint start, uint len, const void *data)
|
|||
[scratch_allocation.metal_buffer
|
||||
didModifyRange:NSMakeRange(scratch_allocation.buffer_offset, len)];
|
||||
id<MTLBuffer> data_buffer = scratch_allocation.metal_buffer;
|
||||
uint data_buffer_offset = scratch_allocation.buffer_offset;
|
||||
uint64_t data_buffer_offset = scratch_allocation.buffer_offset;
|
||||
|
||||
BLI_assert(vbo_ != nullptr && data != nullptr);
|
||||
BLI_assert((start + len) <= vbo_->get_size());
|
||||
|
|
|
@ -886,7 +886,7 @@ int64_t GLPixelBuffer::get_native_handle()
|
|||
return int64_t(gl_id_);
|
||||
}
|
||||
|
||||
uint GLPixelBuffer::get_size()
|
||||
size_t GLPixelBuffer::get_size()
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ class GLPixelBuffer : public PixelBuffer {
|
|||
void *map() override;
|
||||
void unmap() override;
|
||||
int64_t get_native_handle() override;
|
||||
uint get_size() override;
|
||||
size_t get_size() override;
|
||||
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("GLPixelBuffer")
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ int64_t VKPixelBuffer::get_native_handle()
|
|||
return int64_t(buffer_.vk_handle());
|
||||
}
|
||||
|
||||
uint VKPixelBuffer::get_size()
|
||||
size_t VKPixelBuffer::get_size()
|
||||
{
|
||||
return size_;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class VKPixelBuffer : public PixelBuffer {
|
|||
void *map() override;
|
||||
void unmap() override;
|
||||
int64_t get_native_handle() override;
|
||||
uint get_size() override;
|
||||
size_t get_size() override;
|
||||
};
|
||||
|
||||
} // namespace blender::gpu
|
||||
|
|
|
@ -1135,7 +1135,7 @@ static void rna_def_scopes(BlenderRNA *brna)
|
|||
{SCOPES_WAVEFRM_RGB_PARADE, "PARADE", ICON_COLOR, "Parade", ""},
|
||||
{SCOPES_WAVEFRM_YCC_601, "YCBCR601", ICON_COLOR, "YCbCr (ITU 601)", ""},
|
||||
{SCOPES_WAVEFRM_YCC_709, "YCBCR709", ICON_COLOR, "YCbCr (ITU 709)", ""},
|
||||
{SCOPES_WAVEFRM_YCC_JPEG, "YCBCRJPG", ICON_COLOR, "YCbCr (Jpeg)", ""},
|
||||
{SCOPES_WAVEFRM_YCC_JPEG, "YCBCRJPG", ICON_COLOR, "YCbCr (JPEG)", ""},
|
||||
{SCOPES_WAVEFRM_RGB, "RGB", ICON_COLOR, "Red Green Blue", ""},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
|
|
@ -3968,7 +3968,7 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Image Boundary Trimming",
|
||||
"Trim all edges right at the boundary of image(including overscan region)");
|
||||
"Trim all edges right at the boundary of image (including overscan region)");
|
||||
|
||||
prop = RNA_def_property(srna, "use_back_face_culling", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_USE_BACK_FACE_CULLING);
|
||||
|
|
|
@ -311,7 +311,7 @@ static void rna_def_lattice(BlenderRNA *brna)
|
|||
RNA_def_property_range(prop, 1, 64);
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "U", "Point in U direction (can't be changed when there are shape keys)");
|
||||
prop, "U", "Points in U direction (cannot be changed when there are shape keys)");
|
||||
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
|
||||
RNA_def_property_editable_func(prop, "rna_Lattice_size_editable");
|
||||
|
||||
|
@ -321,7 +321,7 @@ static void rna_def_lattice(BlenderRNA *brna)
|
|||
RNA_def_property_range(prop, 1, 64);
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "V", "Point in V direction (can't be changed when there are shape keys)");
|
||||
prop, "V", "Points in V direction (cannot be changed when there are shape keys)");
|
||||
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
|
||||
RNA_def_property_editable_func(prop, "rna_Lattice_size_editable");
|
||||
|
||||
|
@ -331,7 +331,7 @@ static void rna_def_lattice(BlenderRNA *brna)
|
|||
RNA_def_property_range(prop, 1, 64);
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "W", "Point in W direction (can't be changed when there are shape keys)");
|
||||
prop, "W", "Points in W direction (cannot be changed when there are shape keys)");
|
||||
RNA_def_property_update(prop, 0, "rna_Lattice_update_size");
|
||||
RNA_def_property_editable_func(prop, "rna_Lattice_size_editable");
|
||||
|
||||
|
|
|
@ -2792,7 +2792,7 @@ static void rna_def_mvert(BlenderRNA *brna)
|
|||
RNA_def_property_float_funcs(
|
||||
prop, "rna_MeshVertex_bevel_weight_get", "rna_MeshVertex_bevel_weight_set", NULL);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Bevel Weight", "Weight used by the Bevel modifier 'Only Vertices' option");
|
||||
prop, "Bevel Weight", "Weight used by the Bevel modifier Vertices mode");
|
||||
RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all");
|
||||
|
||||
prop = RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
|
||||
|
|
|
@ -189,7 +189,7 @@ static void rna_def_metaelement(BlenderRNA *brna)
|
|||
/* enums */
|
||||
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, rna_enum_metaelem_type_items);
|
||||
RNA_def_property_ui_text(prop, "Type", "Metaball types");
|
||||
RNA_def_property_ui_text(prop, "Type", "Metaball type");
|
||||
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
|
||||
|
||||
/* number values */
|
||||
|
@ -319,7 +319,7 @@ static void rna_def_metaball(BlenderRNA *brna)
|
|||
};
|
||||
|
||||
srna = RNA_def_struct(brna, "MetaBall", "ID");
|
||||
RNA_def_struct_ui_text(srna, "MetaBall", "Metaball data-block to defined blobby surfaces");
|
||||
RNA_def_struct_ui_text(srna, "MetaBall", "Metaball data-block to define blobby surfaces");
|
||||
RNA_def_struct_ui_icon(srna, ICON_META_DATA);
|
||||
|
||||
prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
|
||||
|
@ -340,7 +340,7 @@ static void rna_def_metaball(BlenderRNA *brna)
|
|||
RNA_def_property_float_sdna(prop, NULL, "wiresize");
|
||||
RNA_def_property_range(prop, 0.005f, 10000.0f);
|
||||
RNA_def_property_ui_range(prop, 0.05f, 1000.0f, 2.5f, 3);
|
||||
RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport");
|
||||
RNA_def_property_ui_text(prop, "Viewport Size", "Polygonization resolution in the 3D viewport");
|
||||
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
|
||||
|
||||
prop = RNA_def_property(srna, "render_resolution", PROP_FLOAT, PROP_DISTANCE);
|
||||
|
|
|
@ -2431,7 +2431,7 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Time Offset",
|
||||
"Either the starting frame (for positive speed) or ending frame (for negative speed.)");
|
||||
"Either the starting frame (for positive speed) or ending frame (for negative speed)");
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
|
||||
|
@ -3336,7 +3336,7 @@ static void rna_def_modifier_correctivesmooth(BlenderRNA *brna)
|
|||
RNA_def_property_float_sdna(prop, NULL, "lambda");
|
||||
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0, 1.0, 5, 3);
|
||||
RNA_def_property_ui_text(prop, "Lambda Factor", "Smooth factor effect");
|
||||
RNA_def_property_ui_text(prop, "Lambda Factor", "Smooth effect factor");
|
||||
RNA_def_property_update(prop, 0, "rna_CorrectiveSmoothModifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
|
||||
|
@ -3440,7 +3440,7 @@ static void rna_def_modifier_laplaciansmooth(BlenderRNA *brna)
|
|||
RNA_def_property_float_sdna(prop, NULL, "lambda");
|
||||
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, -1000.0, 1000.0, 5, 3);
|
||||
RNA_def_property_ui_text(prop, "Lambda Factor", "Smooth factor effect");
|
||||
RNA_def_property_ui_text(prop, "Lambda Factor", "Smooth effect factor");
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "lambda_border", PROP_FLOAT, PROP_NONE);
|
||||
|
@ -4768,7 +4768,7 @@ static void rna_def_modifier_solidify(BlenderRNA *brna)
|
|||
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SOLIDIFY_NONMANIFOLD_FLAT_FACES);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Flat Faces",
|
||||
"Make faces use the minimal vertex weight assigned to their vertices"
|
||||
"Make faces use the minimal vertex weight assigned to their vertices "
|
||||
"(ensures new faces remain parallel to their original ones, slow, "
|
||||
"disable when not needed)");
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
|
|
@ -4742,7 +4742,7 @@ static const EnumPropertyItem node_flip_items[] = {
|
|||
static const EnumPropertyItem node_ycc_items[] = {
|
||||
{0, "ITUBT601", 0, "ITU 601", ""},
|
||||
{1, "ITUBT709", 0, "ITU 709", ""},
|
||||
{2, "JFIF", 0, "Jpeg", ""},
|
||||
{2, "JFIF", 0, "JPEG", ""},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
|
@ -3641,7 +3641,7 @@ static void rna_def_object(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled");
|
||||
prop, "Color", "Object color and alpha, used when the Object Color mode is enabled");
|
||||
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update_draw");
|
||||
|
||||
/* physics */
|
||||
|
|
|
@ -2576,7 +2576,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "apply_effector_to_children", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_EFFECT);
|
||||
RNA_def_property_ui_text(prop, "Effect Children", "Apply effectors to children");
|
||||
RNA_def_property_ui_text(prop, "Affect Children", "Apply effectors to children");
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
||||
|
||||
prop = RNA_def_property(srna, "create_long_hair_children", PROP_BOOLEAN, PROP_NONE);
|
||||
|
|
|
@ -4247,7 +4247,7 @@ static void rna_def_statvis(BlenderRNA *brna)
|
|||
RNA_def_property_float_sdna(prop, NULL, "sharp_min");
|
||||
RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f));
|
||||
RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3);
|
||||
RNA_def_property_ui_text(prop, "Distort Min", "Minimum angle to display");
|
||||
RNA_def_property_ui_text(prop, "Sharpness Min", "Minimum angle to display");
|
||||
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
|
||||
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
||||
|
||||
|
@ -4255,7 +4255,7 @@ static void rna_def_statvis(BlenderRNA *brna)
|
|||
RNA_def_property_float_sdna(prop, NULL, "sharp_max");
|
||||
RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f));
|
||||
RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3);
|
||||
RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display");
|
||||
RNA_def_property_ui_text(prop, "Sharpness Max", "Maximum angle to display");
|
||||
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
|
||||
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
||||
}
|
||||
|
@ -5917,18 +5917,18 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_PRESET);
|
||||
RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset");
|
||||
RNA_def_property_ui_text(prop, "Cinema", "Use OpenJPEG Cinema Preset");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_48);
|
||||
RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Preset (48fps)");
|
||||
RNA_def_property_ui_text(prop, "Cinema (48)", "Use OpenJPEG Cinema Preset (48fps)");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "jpeg2k_codec", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "jp2_codec");
|
||||
RNA_def_property_enum_items(prop, jp2_codec_items);
|
||||
RNA_def_property_ui_text(prop, "Codec", "Codec settings for Jpeg2000");
|
||||
RNA_def_property_ui_text(prop, "Codec", "Codec settings for JPEG 2000");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
# endif
|
||||
|
||||
|
@ -6257,7 +6257,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
|
|||
RNA_def_property_int_sdna(prop, NULL, "audio_mixrate");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
||||
RNA_def_property_range(prop, 8000, 192000);
|
||||
RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
|
||||
RNA_def_property_ui_text(prop, "Sample Rate", "Audio sample rate (samples/s)");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
|
||||
|
|
|
@ -89,7 +89,7 @@ static void rna_def_sound(BlenderRNA *brna)
|
|||
prop = RNA_def_property(srna, "samplerate", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "samplerate");
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Samplerate", "Samplerate of the audio in Hz");
|
||||
RNA_def_property_ui_text(prop, "Sample Rate", "Sample rate of the audio in Hz");
|
||||
|
||||
prop = RNA_def_property(srna, "channels", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, NULL, "audio_channels");
|
||||
|
|
|
@ -4775,7 +4775,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
|
|||
RNA_def_property_range(prop, 0, 1000);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Tap Key Timeout",
|
||||
"Pie menu button held longer than this will dismiss menu on release."
|
||||
"Pie menu button held longer than this will dismiss menu on release "
|
||||
"(in 1/100ths of sec)");
|
||||
|
||||
prop = RNA_def_property(srna, "pie_animation_timeout", PROP_INT, PROP_NONE);
|
||||
|
|
|
@ -13,7 +13,7 @@ static void node_declare(NodeDeclarationBuilder &b)
|
|||
|
||||
class ResolutionFieldInput final : public bke::CurvesFieldInput {
|
||||
public:
|
||||
ResolutionFieldInput() : bke::CurvesFieldInput(CPPType::get<int>(), "resolution")
|
||||
ResolutionFieldInput() : bke::CurvesFieldInput(CPPType::get<int>(), "Resolution")
|
||||
{
|
||||
category_ = Category::NamedAttribute;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue