Commit 3dc6f1ff authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Allow direct mapping of non-textures

parent ce989615
...@@ -1423,7 +1423,6 @@ panfrost_bind_sampler_states( ...@@ -1423,7 +1423,6 @@ panfrost_bind_sampler_states(
unsigned start_slot, unsigned num_sampler, unsigned start_slot, unsigned num_sampler,
void **sampler) void **sampler)
{ {
/* TODO: Investigate textures in other shader types */
assert(start_slot == 0); assert(start_slot == 0);
struct panfrost_context *ctx = panfrost_context(pctx); struct panfrost_context *ctx = panfrost_context(pctx);
...@@ -1738,11 +1737,16 @@ panfrost_transfer_map(struct pipe_context *pctx, ...@@ -1738,11 +1737,16 @@ panfrost_transfer_map(struct pipe_context *pctx,
/* If non-zero level, it's a mipmapped resource and needs to be treated as such */ /* If non-zero level, it's a mipmapped resource and needs to be treated as such */
rsrc->is_mipmap |= transfer->level; rsrc->is_mipmap |= transfer->level;
/* Direct mapping are not possible with tiled textures. TODO: Allow /* Direct mapping are not possible with tiled textures. */
* direct access of linear resources */
if (transfer->usage & PIPE_TRANSFER_MAP_DIRECTLY) if (transfer->usage & PIPE_TRANSFER_MAP_DIRECTLY) {
switch (resource->target) {
case PIPE_TEXTURE_2D:
return NULL; return NULL;
default:
break;
}
}
return rsrc->cpu[level] + transfer->box.x + transfer->box.y * transfer->stride; return rsrc->cpu[level] + transfer->box.x + transfer->box.y * transfer->stride;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment