#include "util/set.h"
#include "broadcom/clif/clif_dump.h"
-static void
-remove_from_ht(struct hash_table *ht, void *key)
-{
- struct hash_entry *entry = _mesa_hash_table_search(ht, key);
- _mesa_hash_table_remove(ht, entry);
-}
-
static void
v3d_job_free(struct v3d_context *v3d, struct v3d_job *job)
{
v3d_bo_unreference(&bo);
}
- remove_from_ht(v3d->jobs, &job->key);
+ _mesa_hash_table_remove_key(v3d->jobs, &job->key);
if (job->write_prscs) {
set_foreach(job->write_prscs, entry) {
const struct pipe_resource *prsc = entry->key;
- remove_from_ht(v3d->write_jobs, (void *)prsc);
+ _mesa_hash_table_remove_key(v3d->write_jobs, prsc);
}
}
- for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) {
+ for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) {
if (job->cbufs[i]) {
- remove_from_ht(v3d->write_jobs, job->cbufs[i]->texture);
+ _mesa_hash_table_remove_key(v3d->write_jobs,
+ job->cbufs[i]->texture);
pipe_surface_reference(&job->cbufs[i], NULL);
}
}
if (job->zsbuf) {
struct v3d_resource *rsc = v3d_resource(job->zsbuf->texture);
if (rsc->separate_stencil)
- remove_from_ht(v3d->write_jobs,
- &rsc->separate_stencil->base);
+ _mesa_hash_table_remove_key(v3d->write_jobs,
+ &rsc->separate_stencil->base);
- remove_from_ht(v3d->write_jobs, job->zsbuf->texture);
+ _mesa_hash_table_remove_key(v3d->write_jobs,
+ job->zsbuf->texture);
pipe_surface_reference(&job->zsbuf, NULL);
}
tile_size_index++;
int max_bpp = RENDER_TARGET_MAXIMUM_32BPP;
- for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) {
+ for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) {
if (job->cbufs[i]) {
struct v3d_surface *surf = v3d_surface(job->cbufs[i]);
max_bpp = MAX2(max_bpp, surf->internal_bpp);
*/
struct v3d_job *job = v3d_job_create(v3d);
- for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) {
+ for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) {
if (cbufs[i]) {
v3d_flush_jobs_reading_resource(v3d, cbufs[i]->texture);
pipe_surface_reference(&job->cbufs[i], cbufs[i]);
job->msaa = true;
}
- v3d_job_set_tile_buffer_size(job);
-
- for (int i = 0; i < VC5_MAX_DRAW_BUFFERS; i++) {
+ for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) {
if (cbufs[i])
_mesa_hash_table_insert(v3d->write_jobs,
cbufs[i]->texture, job);
struct pipe_surface *zsbuf = v3d->framebuffer.zsbuf;
struct v3d_job *job = v3d_get_job(v3d, cbufs, zsbuf);
+ if (v3d->framebuffer.samples >= 1)
+ job->msaa = true;
+
+ v3d_job_set_tile_buffer_size(job);
+
/* The dirty flags are tracking what's been updated while v3d->job has
* been bound, so set them all to ~0 when switching between jobs. We
* also need to reset all state at the start of rendering.