anv/pipeline: Store the (set, binding, index) tripple in the bind map
This way the the bind map (which we're caching) is mostly independent of the pipeline layout. The only coupling remaining is that we pull the array size of a binding out of the layout. However, that size is also specified in the shader and should always match so it's not really coupled. This rendering issues in Dota 2. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
@@ -646,7 +646,8 @@ anv_pipeline_compile_fs(struct anv_pipeline *pipeline,
|
||||
for (unsigned i = 0; i < array_len; i++) {
|
||||
rt_bindings[num_rts] = (struct anv_pipeline_binding) {
|
||||
.set = ANV_DESCRIPTOR_SET_COLOR_ATTACHMENTS,
|
||||
.offset = rt + i,
|
||||
.binding = 0,
|
||||
.index = rt + i,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -662,7 +663,8 @@ anv_pipeline_compile_fs(struct anv_pipeline *pipeline,
|
||||
/* If we have no render targets, we need a null render target */
|
||||
rt_bindings[0] = (struct anv_pipeline_binding) {
|
||||
.set = ANV_DESCRIPTOR_SET_COLOR_ATTACHMENTS,
|
||||
.offset = UINT16_MAX,
|
||||
.binding = 0,
|
||||
.index = UINT16_MAX,
|
||||
};
|
||||
num_rts = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user