video_core: Generate mipmap texture by drawing
This commit is contained in:
parent
cbc2761f11
commit
9a95c7fa14
29 changed files with 259 additions and 8 deletions
|
@ -378,6 +378,14 @@ F32 IREmitter::ResolutionDownFactor() {
|
|||
return Inst<F32>(Opcode::ResolutionDownFactor);
|
||||
}
|
||||
|
||||
F32 IREmitter::RenderAreaWidth() {
|
||||
return F32(CompositeExtract(Inst<Value>(Opcode::RenderArea), 0));
|
||||
}
|
||||
|
||||
F32 IREmitter::RenderAreaHeight() {
|
||||
return F32(CompositeExtract(Inst<Value>(Opcode::RenderArea), 1));
|
||||
}
|
||||
|
||||
U32 IREmitter::LaneId() {
|
||||
return Inst<U32>(Opcode::LaneId);
|
||||
}
|
||||
|
|
|
@ -103,6 +103,9 @@ public:
|
|||
|
||||
[[nodiscard]] F32 ResolutionDownFactor();
|
||||
|
||||
[[nodiscard]] F32 RenderAreaWidth();
|
||||
[[nodiscard]] F32 RenderAreaHeight();
|
||||
|
||||
[[nodiscard]] U32 LaneId();
|
||||
|
||||
[[nodiscard]] U32 LoadGlobalU8(const U64& address);
|
||||
|
|
|
@ -63,6 +63,7 @@ OPCODE(SampleId, U32,
|
|||
OPCODE(IsHelperInvocation, U1, )
|
||||
OPCODE(YDirection, F32, )
|
||||
OPCODE(ResolutionDownFactor, F32, )
|
||||
OPCODE(RenderArea, F32x4, )
|
||||
|
||||
// Undefined
|
||||
OPCODE(UndefU1, U1, )
|
||||
|
|
|
@ -213,6 +213,8 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo
|
|||
|
||||
Optimization::ConstantPropagationPass(program);
|
||||
|
||||
Optimization::PositionPass(env, program);
|
||||
|
||||
Optimization::GlobalMemoryToStorageBufferPass(program);
|
||||
Optimization::TexturePass(env, program);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue