forked from blender/blender
WIP: uv-simple-select #1
@ -1000,7 +1000,7 @@ typedef struct EEVEE_PrivateData {
|
|||||||
/* Compiling shaders count. This is to track if a shader has finished compiling. */
|
/* Compiling shaders count. This is to track if a shader has finished compiling. */
|
||||||
int queued_shaders_count;
|
int queued_shaders_count;
|
||||||
int queued_shaders_count_prev;
|
int queued_shaders_count_prev;
|
||||||
/* Optimising shaders count. */
|
/* Optimizing shaders count. */
|
||||||
int queued_optimise_shaders_count;
|
int queued_optimise_shaders_count;
|
||||||
|
|
||||||
/* LookDev Settings */
|
/* LookDev Settings */
|
||||||
|
@ -237,13 +237,14 @@ void GPU_shader_transform_feedback_disable(GPUShader *shader);
|
|||||||
*
|
*
|
||||||
* PSOs require descriptors containing information on the render state for a given shader, which
|
* PSOs require descriptors containing information on the render state for a given shader, which
|
||||||
* includes input vertex data layout and output pixel formats, along with some state such as
|
* includes input vertex data layout and output pixel formats, along with some state such as
|
||||||
* blend mode and colour output masks. As this state information is usually consistent between
|
* blend mode and color output masks. As this state information is usually consistent between
|
||||||
* similar draws, we can assign a parent shader and use this shader's cached pipeline state's to
|
* similar draws, we can assign a parent shader and use this shader's cached pipeline state's to
|
||||||
* prime compilations.
|
* prime compilations.
|
||||||
*
|
*
|
||||||
* Shaders do not necessarily have to be similar in functionality to be used as a parent, so long
|
* Shaders do not necessarily have to be similar in functionality to be used as a parent, so long
|
||||||
* as the GPUVertFormt and GPUFrameBuffer which they are used with remain the same. Other bindings
|
* as the #GPUVertFormt and #GPUFrameBuffer which they are used with remain the same.
|
||||||
* such as textures, uniforms and UBOs are all assigned independently as dynamic state.
|
* Other bindings such as textures, uniforms and UBOs are all assigned independently as dynamic
|
||||||
|
* state.
|
||||||
*
|
*
|
||||||
* This function should be called asynchronously, mitigating the impact of run-time stuttering from
|
* This function should be called asynchronously, mitigating the impact of run-time stuttering from
|
||||||
* dynamic compilation of PSOs during normal rendering.
|
* dynamic compilation of PSOs during normal rendering.
|
||||||
|
@ -256,7 +256,7 @@ class GPUCodegen {
|
|||||||
ListBase ubo_inputs_ = {nullptr, nullptr};
|
ListBase ubo_inputs_ = {nullptr, nullptr};
|
||||||
GPUInput *cryptomatte_input_ = nullptr;
|
GPUInput *cryptomatte_input_ = nullptr;
|
||||||
|
|
||||||
/** Cache paramters for complexity heuristic. */
|
/** Cache parameters for complexity heuristic. */
|
||||||
uint nodes_total_ = 0;
|
uint nodes_total_ = 0;
|
||||||
uint textures_total_ = 0;
|
uint textures_total_ = 0;
|
||||||
uint uniforms_total_ = 0;
|
uint uniforms_total_ = 0;
|
||||||
@ -477,7 +477,7 @@ void GPUCodegen::generate_library()
|
|||||||
GPUCodegenCreateInfo &info = *create_info;
|
GPUCodegenCreateInfo &info = *create_info;
|
||||||
|
|
||||||
void *value;
|
void *value;
|
||||||
/* Iterate over libraries. We need to keep this struct intact incase
|
/* Iterate over libraries. We need to keep this struct intact in case
|
||||||
* it is required for the optimization pass. */
|
* it is required for the optimization pass. */
|
||||||
GHashIterator *ihash = BLI_ghashIterator_new((GHash *)graph.used_libraries);
|
GHashIterator *ihash = BLI_ghashIterator_new((GHash *)graph.used_libraries);
|
||||||
while (!BLI_ghashIterator_done(ihash)) {
|
while (!BLI_ghashIterator_done(ihash)) {
|
||||||
@ -721,7 +721,7 @@ GPUPass *GPU_generate_pass(GPUMaterial *material,
|
|||||||
|
|
||||||
/** Cache lookup: Reuse shaders already compiled.
|
/** Cache lookup: Reuse shaders already compiled.
|
||||||
* NOTE: We only perform cache look-up for non-optimized shader
|
* NOTE: We only perform cache look-up for non-optimized shader
|
||||||
* graphs, as baked constant data amongst other optimizations will generate too many
|
* graphs, as baked constant data among other optimizations will generate too many
|
||||||
* shader source permutations, with minimal re-usability. */
|
* shader source permutations, with minimal re-usability. */
|
||||||
pass_hash = gpu_pass_cache_lookup(codegen.hash_get());
|
pass_hash = gpu_pass_cache_lookup(codegen.hash_get());
|
||||||
|
|
||||||
@ -777,7 +777,7 @@ GPUPass *GPU_generate_pass(GPUMaterial *material,
|
|||||||
pass->compiled = false;
|
pass->compiled = false;
|
||||||
/* Only flag pass optimization hint if this is the first generated pass for a material.
|
/* Only flag pass optimization hint if this is the first generated pass for a material.
|
||||||
* Optimized passes cannot be optimized further, even if the heuristic is still not
|
* Optimized passes cannot be optimized further, even if the heuristic is still not
|
||||||
* favourable. */
|
* favorable. */
|
||||||
pass->should_optimize = (!optimize_graph) && codegen.should_optimize_heuristic();
|
pass->should_optimize = (!optimize_graph) && codegen.should_optimize_heuristic();
|
||||||
|
|
||||||
codegen.create_info = nullptr;
|
codegen.create_info = nullptr;
|
||||||
|
@ -122,7 +122,7 @@ struct GPUMaterial {
|
|||||||
|
|
||||||
/** Default material reference used for PSO cache warming. Default materials may perform
|
/** Default material reference used for PSO cache warming. Default materials may perform
|
||||||
* different operations, but the permutation will frequently share the same input PSO
|
* different operations, but the permutation will frequently share the same input PSO
|
||||||
* descriptors. This enables async PSO compilation as part of the deferred compiltion
|
* descriptors. This enables asynchronous PSO compilation as part of the deferred compilation
|
||||||
* pass, reducing runtime stuttering and responsiveness while compiling materials. */
|
* pass, reducing runtime stuttering and responsiveness while compiling materials. */
|
||||||
GPUMaterial *default_mat;
|
GPUMaterial *default_mat;
|
||||||
|
|
||||||
@ -951,7 +951,7 @@ void GPU_material_compile(GPUMaterial *mat)
|
|||||||
*
|
*
|
||||||
* As PSOs do not always match for default shaders, we limit warming for PSO
|
* As PSOs do not always match for default shaders, we limit warming for PSO
|
||||||
* configurations to ensure compile time remains fast, as these first
|
* configurations to ensure compile time remains fast, as these first
|
||||||
* entries will be the most commonly used PSOs. As not all PSOs are necesasrily
|
* entries will be the most commonly used PSOs. As not all PSOs are necessarily
|
||||||
* required immediately, this limit should remain low (1-3 at most).
|
* required immediately, this limit should remain low (1-3 at most).
|
||||||
* */
|
* */
|
||||||
if (mat->default_mat != NULL && mat->default_mat != mat) {
|
if (mat->default_mat != NULL && mat->default_mat != mat) {
|
||||||
|
@ -793,7 +793,7 @@ MTLRenderPipelineStateInstance *MTLShader::bake_current_pipeline_state(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Variant which bakes a pipeline state based on an an existing MTLRenderPipelineStateDescriptor.
|
/* Variant which bakes a pipeline state based on an an existing MTLRenderPipelineStateDescriptor.
|
||||||
* This function should be callable from a secondary compilatiom thread. */
|
* This function should be callable from a secondary compilation thread. */
|
||||||
MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state(
|
MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state(
|
||||||
MTLContext *ctx,
|
MTLContext *ctx,
|
||||||
MTLPrimitiveTopologyClass prim_type,
|
MTLPrimitiveTopologyClass prim_type,
|
||||||
|
Loading…
Reference in New Issue
Block a user